forked from mirrors/gecko-dev
Backed out changeset e8fcfc7f8108 (bug 1811850) Backed out changeset f8950d716c9e (bug 1811850) Backed out changeset f650123cc188 (bug 1811850) Backed out changeset d96f90c2c58b (bug 1811850) Backed out changeset c3b0f9666183 (bug 1811850)
33 lines
971 B
ReStructuredText
33 lines
971 B
ReStructuredText
pylint
|
|
======
|
|
|
|
`pylint <https://www.pylint.org/>`__ is a popular linter for python. It is now the default python
|
|
linter in VS Code.
|
|
|
|
Please note that we also have :ref:`Flake8` available as a linter.
|
|
|
|
Run Locally
|
|
-----------
|
|
|
|
The mozlint integration of pylint can be run using mach:
|
|
|
|
.. parsed-literal::
|
|
|
|
$ mach lint --linter pylint <file paths>
|
|
|
|
|
|
|
|
Configuration
|
|
-------------
|
|
|
|
To enable pylint on new directory, add the path to the include
|
|
section in the `pylint.yml <https://searchfox.org/mozilla-central/source/tools/lint/pylint.yml>`_ file.
|
|
|
|
We enabled the same Pylint rules as `VS Code <https://code.visualstudio.com/docs/python/linting#_pylint>`_.
|
|
See in `pylint.py <https://searchfox.org/mozilla-central/source/tools/lint/python/pylint.py>`_ for the full list
|
|
|
|
Sources
|
|
-------
|
|
|
|
* `Configuration (YAML) <https://searchfox.org/mozilla-central/source/tools/lint/pylint.yml>`_
|
|
* `Source <https://searchfox.org/mozilla-central/source/tools/lint/python/pylint.py>`_
|