Skip to content

Commit

Permalink
Document how to use Pylint reports (#16399)
Browse files Browse the repository at this point in the history
Closes #16268.

[ci skip-rust]
[ci skip-build-wheels]
  • Loading branch information
Eric-Arellano authored Aug 4, 2022
1 parent dcbb795 commit 3791133
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/markdown/Python/python/python-linters-and-formatters.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,23 @@ backend_packages = [
]
```

### Bandit and Flake8: report files
### Bandit, Flake8, and Pylint: report files

Flake8 and Bandit can both generate report files saved to disk.
Flake8, Bandit, and Pylint can generate report files saved to disk.

For Pants to properly preserve the reports, instruct both tools to write to the `reports/` folder by updating their config files or `--flake8-args` and `--bandit-args`. For example, in your `pants.toml`:
For Pants to properly preserve the reports, instruct the tools to write to the `reports/` folder
by updating their config files, or `--flake8-args`, `--bandit-args`, and `--pylint-args`. For
example, in your `pants.toml`:

```toml
[bandit]
args = ["--output=reports/report.txt"]

[flake8]
args = ["--output-file=reports/report.txt"]

[pylint]
args = ["--output-format=text:reports/report.txt"]
```

Pants will copy all reports into the folder `dist/lint/<linter_name>`.
Expand Down

0 comments on commit 3791133

Please sign in to comment.