[JIRA] (JENKINS-60622) Javac parser ignores errorprone warnings/errors

6 views
Skip to first unread message

jon.freedman+jenkins@zoho.com (JIRA)

unread,
Jan 2, 2020, 5:01:02 AM1/2/20
to jenkinsc...@googlegroups.com
Jon Freedman created an issue
 
Jenkins / Story JENKINS-60622
Javac parser ignores errorprone warnings/errors
Issue Type: Story Story
Assignee: Ulli Hafner
Components: analysis-model
Created: 2020-01-02 10:00
Environment: Warnings-NG v7.2.2
Priority: Minor Minor
Reporter: Jon Freedman

This commit stopped errorprone errors/warnings being recognised by the Warnings Next Generation plugin - I don't understand why anyone would want this behavior (if you don't want to see errorprone warnings, don't use it) but if it must be kept I think it should be a flag which can be optionally disabled.

If the regex in edu.hm.hafner.analysis.parser.JavacParser were changed to remove the trailing $ it would then match multi-line errorprone errors if passed directly, but if passed the lines individually would continue to work as expected in the previous version.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jon.freedman+jenkins@zoho.com (JIRA)

unread,
Jan 2, 2020, 5:10:02 AM1/2/20
to jenkinsc...@googlegroups.com

ullrich.hafner@gmail.com (JIRA)

unread,
Jan 2, 2020, 6:47:02 AM1/2/20
to jenkinsc...@googlegroups.com

The reason is that most users want to see the whole error message (including the reasoning) from error prone, this is not possible with the Java parser which shows only a single line. Showing such a warning in both parsers makes no sense for me as well, then you have the same warning twice. You can combine the results of the Java and Error Prone parser if you like, this can be done without changing the code (see aggregation options in the warnings plugin).

If you want to create a PR, you need to add a flag for the Java parser (in the style of the FindBugs/SpotBugs parser) in the analysis model module. As a second step, you need to expose the same parameter in the Java parser of the warnings-ng plugin.

ullrich.hafner@gmail.com (JIRA)

unread,
Jan 2, 2020, 6:48:02 AM1/2/20
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Story JENKINS-60622
The reason is that most users want to see the whole error message (including the reasoning) from error prone, this is not possible with the Java parser which shows only a single line. Therefore we added a specific error prone parser.

Showing such a warning in both parsers makes no sense for me as well, then you have the same warning twice. You can combine the results of the Java and Error Prone parser if you like, this can be done without changing the code (see aggregation options in the warnings plugin).

If you want to create a PR, you need to add a flag for the Java parser (in the style of the FindBugs/SpotBugs parser) in the analysis model module. As a second step, you need to expose the same parameter in the Java parser of the warnings-ng plugin.
Reply all
Reply to author
Forward
0 new messages