Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60622

Provide option for Javac parser to ignore errorprone warnings/errors

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          If someone wants to provide a PR then please reopen.

          Show
          drulli Ulli Hafner added a comment - If someone wants to provide a PR then please reopen.
          Hide
          jfreedman Jon Freedman added a comment -

          I didn't realise there was a separate errorprone plugin, will just use that...

          Show
          jfreedman Jon Freedman added a comment - I didn't realise there was a separate errorprone plugin, will just use that...
          Hide
          drulli Ulli Hafner added a comment - - edited

          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.

          Show
          drulli Ulli Hafner added a comment - - edited 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.
          Show
          jfreedman Jon Freedman added a comment - See  https://www.regexplanet.com/share/index.html?share=yyyydaffw6r

            People

            • Assignee:
              Unassigned
              Reporter:
              jfreedman Jon Freedman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: