pylint #21591 html reporter produces no output if reports is set to 'no' [resolved]
When the option for full reports is turned off (either using the -r no command line option, or by setting reports=no in .pylintrc), and the output mode is set to html, pylint produces no output at all (whereas, it should list just the messages). This isn't the case for any of the other output modes (text, parseable, colorized), which behave as expected. | |
priority | minor |
---|---|
type | bug |
done in | 0.21.0 |
load | 0.200 |
load left | 0.000 |
closed by | <not specified> |
Comments
-
2010/03/04 08:01, written by sthenault
-
2010/03/04 20:22, written by cmorris
add commentduh? When html is turned on, output goes to html files. Do you mean you don't have output files when report is set to no ?
I should point out, for the sake of anyone reading, that this is not the case. The default behaviour when pylint is run with the -f html option is to output html to stdout. If you want it to go to a file, you have to redirect the output, or have files_output set to "yes". But when -f html -r no is set, the reporter does absolutely nothing (no output to stdout, no files created).
The crux of the problem seems to be that make_reports does quite different things for a text reporter vs. an html reporter. With a text reporter, make_reports is only responsible for the actual reports (showing the various statistics), and the messages are immediately sent to stdout when they're added with add_message. With an HTML reporter, ALL of the reporting is done by make_reports (including the messages), so if reports are turned off, then no output will be produced, which is obviously not the desired behaviour.