Is there a built in way to save the pylint report to a file? It seems it might be useful to do this in order to log progress on a project and compare elements of reports across multiple files as changes are made.
Asked
Active
Viewed 1.3k times
2 Answers
12
You can redirect its output in your shell using > somefile.txt
In case it writes to stderr, use 2>&1 > somefile.txt

ThiefMaster
- 310,957
- 84
- 592
- 636
-
Can I both output to file, and still output to stdout? I'm just running the command twice on my build machine... – Dan Ciborowski - MSFT Jul 22 '20 at 06:58
-
3@DanCiborowski-MSFT pipe it into `tee somefile`; which will write to somefile and also print to stdout – ThiefMaster Jul 25 '20 at 13:30
12
Note: This option is deprecated and it will be removed in Pylint 2.0.
You can use the --file-output=y
command line option. Quoting the man page:
--files-output=<y_or_n>
Put messages in a separate file for each module / package speci‐
fied on the command line instead of printing them on stdout.
Reports (if any) will be written in a file name
"pylint_global.[txt|html]". [current: no]
The format of the output is specified by the --output-format=<format>
option where format can be text
, parseable
, colorized
, msvs
(visual studio) and html
.

phoenix
- 7,988
- 6
- 39
- 45

gurney alex
- 13,247
- 4
- 43
- 57