pytest plugin to check source code with pylint
.. image:: https://github.com/carsongee/pytest-pylint/actions/workflows/tests.yml/badge.svg :target: https://github.com/carsongee/pytest-pylint/actions/workflows/tests.yml .. image:: https://img.shields.io/coveralls/carsongee/pytest-pylint.svg :target: https://coveralls.io/r/carsongee/pytest-pylint .. image:: https://img.shields.io/pypi/v/pytest-pylint.svg :target: https://pypi.python.org/pypi/pytest-pylint .. image:: https://anaconda.org/conda-forge/pytest-pylint/badges/version.svg :target: https://anaconda.org/conda-forge/pytest-pylint .. image:: https://anaconda.org/conda-forge/pytest-pylint/badges/downloads.svg :target: https://anaconda.org/conda-forge/pytest-pylint .. image:: https://img.shields.io/pypi/l/pytest-pylint.svg :target: https://pypi.python.org/pypi/pytest-pylint
Run pylint with pytest and have configurable rule types (i.e. Convention, Warn, and Error) fail the build. You can also specify a pylintrc file.
.. code-block:: shell
py.test --pylint
would be the most simple usage and would run pylint for all error messages.
.. code-block:: shell
py.test --pylint --pylint-rcfile=/my/pyrc --pylint-error-types=EF --pylint-jobs=4
This would use the pylintrc file at /my/pyrc, only error on pylint Errors and Failures, and use 4 cores for running pylint.
You can restrict your test run to only perform pylint checks and not any other tests by typing:
.. code-block:: shell
py.test --pylint -m pylint
This code is heavily based on
pytest-flakes <https://github.com/fschulze/pytest-flakes>
__
If you want to help development, there is
overview documentation <https://github.com/carsongee/pytest-pylint/blob/master/DEVELOPMENT.rst>
_
0.21.0
- Dropped support for pytest < 7.0 in preparation for pytest 8.0 (should work with it when it comes out)
- Dropped support for pylint < 2.15 to work better with Python 3.11 and drop backwards compatibility code
- Use baked in TOML support with fallback to newer tomli library thanks to `mgorny <https://github.com/mgorny>`__
0.20.0
0.19.0
- Switched to GitHub Actions for CI thanks to `michael-k <https://github.com/michael-k>`__
- Switched to using smart PyLint RC discovery thanks to `bennyrowland <https://github.com/bennyrowland>`__
- Correcting rootdir/rootpath issues in pytest >7.x
- Deprecated support for Python <3.7
0.18.0
--pylint-output-file
ignore_patterns
is blank, we don't ignore all filesyanqd0 <https://github.com/yanqd0>
__sbraz <https://github.com/sbraz>
__0.17.0
- Added support for latest pylint API >=2.5.1
0.16.1
0.16.0
- Switched to new ``from_parent`` API and added development documentation `dineshtrivedi <https://github.com/dineshtrivedi>`_
- Added support for toml based configuration of pylint thanks to `michael-k <https://github.com/michael-k>`_
0.15.1
--no-pylint
functional again0.15.0
- Added support for Python 3.8 thanks to `michael-k <https://github.com/michael-k>`_
- Implemented option to output Pylint results to a reports file thanks to `jose-lpa <https://github.com/jose-lpa>`_
- Refactored into simpler plugin structure
0.14.1
-p no:cacheprovider
thanks to yanqd0 <https://github.com/yanqd0>
__0.14.0
- Added support for Pylint's ignore-patterns for regex based ignores
thanks to `khokhlin <https://github.com/khokhlin>`__
- pytest-pylint now caches successful pylint checks to speedup test
reruns when files haven't changed thanks to `yanqd0
<https://github.com/yanqd0>`__
0.13.0
heoga <https://github.com/heoga>
__0.12.3
- `jamur2 <https://github.com/jamur2>`__ corrected issue where file
paths where not being output properly on lint failures.
0.12.2
skirpichev <https://github.com/skirpichev>
__ and jamur2 <https://github.com/jamur2>
__0.12.1
- Corrected a bug preventing this plugin from working with py.test >= 3.7.0.
0.12.0
jwkvam <https://github.com/jwkvam>
__ added progress output during linting.0.11.0
- Added option ``--no-pylint`` to override ``--pylint`` for cases when
it's turned on by default.
0.10.0
jwkvam <https://github.com/jwkvam>
__ provided support for pylint 2.00.9.0
- `noisecapella <https://github.com/noisecapella>`__ added an option to
run pylint with multiple processes
0.8.0
bdrung <https://github.com/bdrung>
__ corrected inconsistent returns in a function0.7.1
- Corrected path issue reported by `Kargathia <https://github.com/Kargathia>`_
0.7.0