... | @@ -4,16 +4,16 @@ We use [pylint](https://pylint.readthedocs.io/en/latest/), a standard tool to ch |
... | @@ -4,16 +4,16 @@ We use [pylint](https://pylint.readthedocs.io/en/latest/), a standard tool to ch |
|
|
|
|
|
We adopt the [standard configuration proposed by the Python extension Visual Studio Code](https://code.visualstudio.com/docs/python/linting#_default-pylint-rules) and enrich it with some custom [pylint features](https://pylint.readthedocs.io/en/latest/technical_reference/features.html) like `unused-import`.
|
|
We adopt the [standard configuration proposed by the Python extension Visual Studio Code](https://code.visualstudio.com/docs/python/linting#_default-pylint-rules) and enrich it with some custom [pylint features](https://pylint.readthedocs.io/en/latest/technical_reference/features.html) like `unused-import`.
|
|
|
|
|
|
The same `pylintrc` is shared by all the developers.
|
|
The same `pylintrc` file is shared by all the developers.
|
|
|
|
|
|
First, download [pylintrc](/uploads/d79c288785480a2fe375c5bd63651c11/pylintrc) and save it in your working directory specific to DBnomics (like `~/Dev/dbnomics`)
|
|
First, clone the [code-style](https://git.nomics.world/dbnomics/code-style) repository.
|
|
|
|
|
|
For each project (fetcher, API, data-model, etc.), configure your editor to call pylint with the following option: `--rcfile ~/Dev/dbnomics/pylintrc`. For example, in Visual Studio Code, the configuration is done by adding the following key to `.vscode/settings.json`:
|
|
For each project (fetcher, API, data-model, etc.), configure your editor to call pylint with the following option: `--rcfile /path/to/code-style/pylintrc`. For example, in Visual Studio Code, the configuration is done by adding the following key to `.vscode/settings.json`:
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
"python.linting.pylintArgs": [
|
|
"python.linting.pylintArgs": [
|
|
"--rcfile", "~/Dev/dbnomics/pylintrc"
|
|
"--rcfile", "/path/to/code-style/pylintrc"
|
|
]
|
|
]
|
|
}
|
|
}
|
|
``` |
|
``` |
|
|
|
\ No newline at end of file |