Save pylint message to file

Is there a built-in way to save a pylint report to a file? It seems that it would be useful to do this in order to record the progress in the project and compare the report items for several files when making changes.

+6
source share
2 answers

Note: This option is deprecated and will be removed in Pylint 2.0.

You can use the command line option --file-output=y . 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 output format is determined by the option --output-format=<format> , where the format can be text , parseable , colorized , msvs (visual studio) and html .

+10
source

You can redirect your output to your shell using > somefile.txt
If it writes stderr use 2>&1 > somefile.txt

+7
source

Source: https://habr.com/ru/post/914846/


All Articles