tomasbjerre / violations-lib

Java library for parsing report files from static code analysis.
Apache License 2.0
148 stars 39 forks source link

FindbugsParser - Remove bug details from message field #167

Open PaulCormier opened 1 year ago

PaulCormier commented 1 year ago

In the FindbugsParser, the details of the bug is being included in the Violation's message field. https://github.com/tomasbjerre/violations-lib/blob/e083e670887819141279f2c11fcedc042a50245a/src/main/java/se/bjurr/violations/lib/parsers/FindbugsParser.java#L73

These messages can be very long, and also include HTML formatting. When viewing the report in GitLab (from a CodeClimate output) the message is difficult to read, and badly formatted.

Instead of including the details in the message field, the specifics map could be used. Or perhaps a new field added to Violation.

This would facilitate emitting the details in a more appropriate output field; for instance, in the CodeClimate's content field.

tomasbjerre commented 1 year ago

If it is removed from message, it would affect all tools using this library. So that is a pretty big thing to do.

Same with changing the Violation model, all tools would need to be adjusted.