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

Improve Java and JavaDoc parser by inspecting Maven module

    XMLWordPrintable

Details

    Description

      The Java and JavaDoc parser overlap: some warnings are detected by both parsers. It would make sense to use the Maven module as a start and end marker for warnings of the corresponding type. Maybe we can extract the module detection of the MavenConsoleParser so that it can be used by both parsers. This will at least work for Maven projects.

      Attachments

        Issue Links

          Activity

            drulli Ulli Hafner added a comment - Please also have a look at https://github.com/uhafner/warnings-ng-plugin-devenv
            drulli Ulli Hafner added a comment -

            A good start would be to write a test that actually exposes the problem. https://issues.jenkins.io/browse/JENKINS-67521 shows some examples.

            We need:
            1. Warnings within the maven-compiler-plugin part of the log: Java warnings should be parsed by Java Parser, but not JavaDoc Parser.
            2. Warnings within the maven-javadoc-plugin part of the log: Java warnings should be parsed by JavaDoc Parser, but not Java Parser.
            3. Warnings outside of those parts of the log: Java warnings should be parsed by JavaDoc Parser and Java Parser.

            Then you can create a new base class that handles the module scanning: https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/parser/JavacParser.java#L57

            drulli Ulli Hafner added a comment - A good start would be to write a test that actually exposes the problem. https://issues.jenkins.io/browse/JENKINS-67521 shows some examples. We need: 1. Warnings within the maven-compiler-plugin part of the log: Java warnings should be parsed by Java Parser, but not JavaDoc Parser. 2. Warnings within the maven-javadoc-plugin part of the log: Java warnings should be parsed by JavaDoc Parser, but not Java Parser. 3. Warnings outside of those parts of the log: Java warnings should be parsed by JavaDoc Parser and Java Parser. Then you can create a new base class that handles the module scanning: https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/parser/JavacParser.java#L57
            elmodeer Hesham Hussen added a comment - - edited

            HI Ulli, I would like to work on this issue, could u elaborate more on the issue and point me where I could start ? drulli

            elmodeer Hesham Hussen added a comment - - edited HI Ulli, I would like to work on this issue, could u elaborate more on the issue and point me where I could start ? drulli
            drulli Ulli Hafner added a comment -

            See also improvement of the AntJavaParser in https://github.com/jenkinsci/analysis-model/pull/486.

            drulli Ulli Hafner added a comment - See also improvement of the AntJavaParser in https://github.com/jenkinsci/analysis-model/pull/486 .

            People

              elmodeer Hesham Hussen
              drulli Ulli Hafner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: