Tristan Van Berkom pushed to branch tristan/toxic-linting at BuildStream / buildstream
Commits:
-
91c8b634
by Tristan Van Berkom at 2019-01-03T21:04:49Z
1 changed file:
Changes:
... | ... | @@ -1498,6 +1498,18 @@ option when running tox:: |
1498 | 1498 |
|
1499 | 1499 |
tox -e py37
|
1500 | 1500 |
|
1501 |
+Linting is performed separately from testing. In order to run the linting step which
|
|
1502 |
+consists of running the ``pycodestyle`` and ``pylint`` tools, run the following::
|
|
1503 |
+ |
|
1504 |
+ tox -e lint
|
|
1505 |
+ |
|
1506 |
+.. tip::
|
|
1507 |
+ |
|
1508 |
+ The project specific pylint and pycodestyle configurations are stored in the
|
|
1509 |
+ toplevel buildstream directory in the ``.pylintrc`` file and ``setup.cfg`` files
|
|
1510 |
+ respectively. These configurations can be interesting to use with IDEs and
|
|
1511 |
+ other developer tooling.
|
|
1512 |
+ |
|
1501 | 1513 |
The output of all failing tests will always be printed in the summary, but
|
1502 | 1514 |
if you want to observe the stdout and stderr generated by a passing test,
|
1503 | 1515 |
you can pass the ``-s`` option to pytest as such::
|
... | ... | @@ -1532,15 +1544,6 @@ output. To run them, you can use:: |
1532 | 1544 |
|
1533 | 1545 |
tox -- --integration
|
1534 | 1546 |
|
1535 |
-By default, buildstream also runs pylint on all files. Should you want
|
|
1536 |
-to run just pylint (these checks are a lot faster), you can do so
|
|
1537 |
-with::
|
|
1538 |
- |
|
1539 |
- tox -- -m pylint
|
|
1540 |
- |
|
1541 |
-Alternatively, any IDE plugin that uses pytest should automatically
|
|
1542 |
-detect the ``.pylintrc`` in the project's root directory.
|
|
1543 |
- |
|
1544 | 1547 |
In case BuildStream's dependencies were updated since you last ran the
|
1545 | 1548 |
tests, you might see some errors like
|
1546 | 1549 |
``pytest: error: unrecognized arguments: --codestyle``. If this happens, you
|