pmd / pmd

An extensible multilanguage static code analyzer.
https://pmd.github.io
Other
4.84k stars 1.49k forks source link

[core] Include Priority in html & simplehtml reports #5238

Open dschach opened 1 week ago

dschach commented 1 week ago

Is your feature request related to a problem? Please describe. The html renderer does not include the Priority column. The csv renderer does.

Describe the solution you'd like Include the Priority column in the report. To make this extra-special, render it if a property is set to true when executing from the CLI.

Describe alternatives you've considered Have not considered any alternatives, but may use a CSV-to-HTML converter in my GitHub workflows

Additional context I'd like to submit a PR for this if @adangel agrees that this would be a useful addition to PMD.

adangel commented 1 week ago

Sounds like a useful addition. As this is a display only format, it shouldn't be problematic for compatibility (nobody should use it as an output format to parse the results again). So maybe we don't need a property?

Do you mean "summaryhtml" instead of "simplehtml"?

Note that if you want a better/nicer html report, you can also look at the XSLT format. We have some examples here: https://docs.pmd-code.org/latest/pmd_userdocs_report_formats.html#xslt

But adding priority directly to HtmlRenderer sounds like something, we should do anyway, as --format html is easier to use.