Merge "Update Pylint config file for development"

This commit is contained in:
Zuul 2021-12-14 08:47:19 +00:00 committed by Gerrit Code Review
commit 65b7fa8cd5
2 changed files with 48 additions and 5 deletions

View File

@ -2,15 +2,17 @@
[MASTER]
# Add <file or directory> to the black list. It should be a base name, not a
# path. You may set this option multiple times.
ignore=test
ignore=tests
init-hook="import sys; sys.path.append('.')"
[Messages Control]
# NOTE(justinsb): We might want to have a 2nd strict pylintrc in future
# C0111: Don't require docstrings on every method
# The below section disables specified items.
# C0116: Don't require docstrings on every method
# C0411: Import order is not considered (but will be checked by hacking in tox)
# W0511: TODOs in code comments are fine.
# W0142: *args and **kwargs are fine.
# W0622: Redefining id is fine.
disable=C0111,W0511,W0142,W0622
disable=C0116,C0411,W0511,W0622
[Basic]
# Variable names can be 1 to 31 characters long, with lowercase and underscores
@ -40,3 +42,11 @@ max-args=6
# you should avoid to define new builtins when possible.
# _ is used by our localization
additional-builtins=_
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,
XXX,
TODO,
NOTE

View File

@ -46,3 +46,36 @@ Grab the code::
.. include:: ../../../TESTING.rst
Linting
-------
Tacker project supports the configuration of `Pylint`_, a lint tool for
Python code.
You can get Pylint CLI tool from PyPI:
.. code-block:: console
$ pip install pylint
Then you can check your code with Pylint like:
.. code-block:: console
$ pylint path/to/code
If you want to check the entire Tacker code:
.. code-block:: console
$ pylint tacker/
``.pylintrc`` in Tacker repository root is a configuration file of Pylint.
If you want to check Pylint messages, detailed CLI configurations
and configurations in ``.pylintrc``, please refer to
`Pylint official reference`_.
.. _Pylint: https://pylint.org/
.. _Pylint official reference: https://pylint.pycqa.org/en/latest/