A PyLint plugin to add CNES specific checks
Project description
cnes-pylint-extension
cnes-pylint-extension is a python checker, which adds CNES specific checks to pylint.
cnes-pylint-extension checks the following rules :
- R5101 - multiple-exit-statements
- R5102 - too-many-decorators
- R5103 - bad-exit-condition
- R5104 - builtin-name-used
- R5105 - recursive-call
- R5106 - use-context-manager
- R5401 - sys-exit-used
- R5402 - os-environ-used
- R5403 - sys-argv-used
- W9095 - missing-docstring-field
- W9096 - malformed-docstring-field
- W9097 - missing-docstring-description
cnes-pylint-extension checks the following metrics :
- R5301 - too-high-complexity (default < 25)
- R5302 - too-high-complexity-simplified (default < 20)
- R5201 - too-few-comments (default > 20%)
Available versions :
- Version 1.0 - compatible pylint 1.5
- Version 2.0 - compatible pylint 1.6
- Version 3.0 - compatible pylint 1.7.4 and 1.9.1
- Version 4.0 - compatible pylint 2.1.1
- Version 5.0 - compatible pylint >=2.5.0,<2.12.0
- Version 6.0 - compatible pylint >=2.12,<3.0.0
- warning: At 6.0.0 release, latest pylint was 2.13.5. If you encounter issue with pylint>2.13.5 and <3.0.0 please open an issue.
To use these checkers:
Install from PIP
pip install cnes-pylint-extension
Install from sources
Install Pylint
pip install pylint==2.13.5
Install CNES Pylint extension checkers
Download the project's code source then add the checkers subdirectory to your PYTHONPATH :
unzip cnes-pylint-extension.zip
cd cnes-pylint-extension
echo export PYTHONPATH=$PYTHONPATH:$PWD/checkers >> ~/.bashrc
source ~/.bashrc
To enable Pylint to use the extension, you need to edit your pylintrc file, and add "cnes_checker" to the plugins list.
[MASTER]
load-plugins=cnes_checker
...
Usage
Pylint is now able to use the extension.
Otherwise, add --load-plugins=cnes_checker
to your pylint command line in order to activate it.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cnes-pylint-extension-6.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0849c993925e50017fba4ac2d1f3569787526e5d0c1d50a9c41e05bf0948d249 |
|
MD5 | 90ae4deb7ea30ba9843863856c914380 |
|
BLAKE2b-256 | 14d301eb26ce012c3a471c5ffe4ab2ad6d29c7c834d156a67e0637df61b5d9b2 |
Hashes for cnes_pylint_extension-6.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9e6384e06fd8b6d99922d274284682c54ed0921ea85662b34e08dcf5a74f2f5 |
|
MD5 | 58290833f149a20c938ede7bc0f13792 |
|
BLAKE2b-256 | a6233a205dca4b2d28b97c207d621d91eb045dde033c7cee79fff02385a7ba79 |