Bug 1811850 - [lint] Replace pylint linter with ruff, r=linter-reviewers,marco
This is enabling the PLE and PLC rules across a much larger swatch of the code base. The PLR and PLW are additionally enabled at the warning level (introduces ~2500 new warnings). To avoid extraneous changes in people's patches, rules at the warning level are excluded from --fix. Differential Revision: https://phabricator.services.mozilla.com/D172358
This commit is contained in:
@@ -100,11 +100,6 @@ In this document, we try to list these all tools.
|
||||
- `bug 1555560 <https://bugzilla.mozilla.org/show_bug.cgi?id=1555560>`__
|
||||
- :ref:`black`
|
||||
- https://black.readthedocs.io/en/stable
|
||||
* - pylint
|
||||
-
|
||||
- `bug 1623024 <https://bugzilla.mozilla.org/show_bug.cgi?id=1623024>`__
|
||||
- :ref:`pylint`
|
||||
- https://www.pylint.org/
|
||||
|
||||
.. list-table:: Rust
|
||||
:widths: 20 20 20 20 20
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
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>`_
|
||||
Reference in New Issue
Block a user