From 91c8b634e92af722ce6f41d7448e2e1fe9aa7640 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Thu, 3 Jan 2019 15:53:27 -0500 Subject: CONTRIBUTING.rst: Adding instructions to run the linter separately --- CONTRIBUTING.rst | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'CONTRIBUTING.rst') diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 0079cb4b5..ddcc4130d 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1498,6 +1498,18 @@ option when running tox:: tox -e py37 +Linting is performed separately from testing. In order to run the linting step which +consists of running the ``pycodestyle`` and ``pylint`` tools, run the following:: + + tox -e lint + +.. tip:: + + The project specific pylint and pycodestyle configurations are stored in the + toplevel buildstream directory in the ``.pylintrc`` file and ``setup.cfg`` files + respectively. These configurations can be interesting to use with IDEs and + other developer tooling. + The output of all failing tests will always be printed in the summary, but if you want to observe the stdout and stderr generated by a passing test, you can pass the ``-s`` option to pytest as such:: @@ -1532,15 +1544,6 @@ output. To run them, you can use:: tox -- --integration -By default, buildstream also runs pylint on all files. Should you want -to run just pylint (these checks are a lot faster), you can do so -with:: - - tox -- -m pylint - -Alternatively, any IDE plugin that uses pytest should automatically -detect the ``.pylintrc`` in the project's root directory. - In case BuildStream's dependencies were updated since you last ran the tests, you might see some errors like ``pytest: error: unrecognized arguments: --codestyle``. If this happens, you -- cgit v1.2.1