Update Pylint config file for development
Current Tacker repository contains .pylintrc, which is a configuration file of Pylint [1]. [1] https://pylint.org/ However, it is not maintained for 8 years ago, so it contains some out-of-date configurations for current Pylint version. This patch removes those out-of-date configurations, and introduces some useful configurations for IDE integration. Signed-off-by: Masaki UENO <masaki.ueno.up@hco.ntt.co.jp> Change-Id: I9e09a6befef2ef22e09f1a0b0ed2a75bf173a4f6
This commit is contained in:
parent
92b892a03c
commit
4f25101c17
20
.pylintrc
20
.pylintrc
@ -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
|
||||
|
@ -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/
|
||||
|
Loading…
Reference in New Issue
Block a user