Skip to content

Commit

Permalink
Merge pull request #7 from lequal/dev
Browse files Browse the repository at this point in the history
Upgrade Pylint Comptaibility & Documentation
  • Loading branch information
Sancretor authored May 6, 2020
2 parents 8b7bd8e + c5a357a commit fcd57ac
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,32 @@ cnes-pylint-extension checks the following metrics :
- 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

# To use these checkers:

- Add the 'checkers/' subdirectory to your PYTHONPATH
- Add the line "load-plugins=cnes_checker" to the [MASTER] section of your .pylintrc
or add "--load-plugins=cnes_checker" to your command line in order to activate them
## Install Pylint

`pip install pylint==2.5.0`

## 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
...
```

Pylint is now able to use the extension.

Otherwise, add `--load-plugins=cnes_checker` to your pylint command line in order to activate it.
2 changes: 1 addition & 1 deletion checkers/cnes_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from pylint.checkers import BaseChecker, BaseTokenChecker
from pylint.checkers.utils import check_messages
from pylint.checkers.raw_metrics import get_type
from pylint.utils import WarningScope
from pylint.constants import WarningScope
import tokenize


Expand Down

0 comments on commit fcd57ac

Please sign in to comment.