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

Some javadoc warnings are not detected

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Following javadoc warnings is not detected:

      [javadoc] javadoc: warning - Text of tag @sys.prop in class ch.post.pf.mw.service.common.alarm.AlarmingService is too long!
      

      I checked the source code and could verify that the regexp used in the JavaDocParser does not match this line.

      I reproduced the problem using following simple test class. You may say that I could fix the regexp myself but it's very complicated so I didn't try it

      import java.util.regex.Matcher;
      import java.util.regex.Pattern;
      
      public class TestWarningPattern
      {
          private static final String JAVA_DOC_WARNING_PATTERN = "^\\s*(?:\\[javadoc\\]\\s*(.*):(\\d+):.*-\\s*(.*)|\\[WARNING\\]\\s*javadoc\\s*.*\\s*-\\s*(.*\\\"(.*)\\\")|\\[WARNING\\]\\s*(.*):(\\d+):warning\\s*-\\s*(.*))$";
          
          
          /**
           * @param args
           */
          public static void main(String[] args)
          {
              Pattern pattern = Pattern.compile(JAVA_DOC_WARNING_PATTERN);
              String line = "[javadoc] javadoc: warning - Text of tag @sys.prop in class ch.post.pf.mw.service.common.alarm.AlarmingService is too long!";
              //String line = "[javadoc] /appl/home/aplatest/hudson/workspace/APLAT_JDK16_00_init/APLAT_JDK16_snapshot/vob/aplat/Se/comp/AplatFileTransfer/src/ch/post/pf/mw/service/filetransfer/FileTransferConnection.java:704: warning - Tag @link: reference not found: java.util.regex.Pattern";
              Matcher matcher = pattern.matcher(line);
              System.out.println(matcher.matches());
          }
      }
      
      

        Attachments

          Activity

          Hide
          starburst Patrick Lemmens added a comment - - edited

          I haven't seen it pick up any javadoc warnings?

          Examples of javadoc warnings in the log:

          Constructing Javadoc information...
          /u01/src/stubs/code/com/abc/AbcXMLLoader.java:13: package org.apache.xmlbeans does not exist
          import org.apache.xmlbeans.XmlException;
                                    ^
          
          /u01/src/KinePolygon.java:57: warning - @(#) is an unknown tag.
          
          /u01/src/SpeedUnit.java:26: warning - @param argument "wBuffer" is not a parameter name.
          
          /u01/src/code/com/abc/Argument.java:65: warning - @return tag cannot be used in method with void return type.
          
          /u01/src/code/com/abc/acPerformance/AcPerformanceServicesImpl.java:1005: warning - Tag @see: can't find climb(int,
                com.abc.env.PerformanceRateE, double,
                com.abc.env.IOptTakeOffWeight,
                com.abc.env.CelsiusTemperature) in com.abc.services.IAcPerformanceServices
          
          /u01/src/code/com/abc/CodedRouteFormat.java:517: warning - Tag @return cannot be used in field documentation.  It can only be used in the following types of documentation: method.
          
          /u01/src/code/com/abc/adasupport/EnhancedListIterator.java:64: warning - @List is an unknown tag.
          
          Show
          starburst Patrick Lemmens added a comment - - edited I haven't seen it pick up any javadoc warnings? Examples of javadoc warnings in the log: Constructing Javadoc information... /u01/src/stubs/code/com/abc/AbcXMLLoader.java:13: package org.apache.xmlbeans does not exist import org.apache.xmlbeans.XmlException; ^ /u01/src/KinePolygon.java:57: warning - @(#) is an unknown tag. /u01/src/SpeedUnit.java:26: warning - @param argument "wBuffer" is not a parameter name. /u01/src/code/com/abc/Argument.java:65: warning - @return tag cannot be used in method with void return type. /u01/src/code/com/abc/acPerformance/AcPerformanceServicesImpl.java:1005: warning - Tag @see: can't find climb(int, com.abc.env.PerformanceRateE, double, com.abc.env.IOptTakeOffWeight, com.abc.env.CelsiusTemperature) in com.abc.services.IAcPerformanceServices /u01/src/code/com/abc/CodedRouteFormat.java:517: warning - Tag @return cannot be used in field documentation. It can only be used in the following types of documentation: method. /u01/src/code/com/abc/adasupport/EnhancedListIterator.java:64: warning - @List is an unknown tag.
          Hide
          drulli Ulli Hafner added a comment -

          @starburst: can you please use the 'noformat' tag for the log in your comment so I can see if where the newlines are in your warnings.

          Show
          drulli Ulli Hafner added a comment - @starburst: can you please use the 'noformat' tag for the log in your comment so I can see if where the newlines are in your warnings.
          Hide
          starburst Patrick Lemmens added a comment - - edited

          @drulli Added 'noformat' tag

          Show
          starburst Patrick Lemmens added a comment - - edited @drulli Added 'noformat' tag

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              viretp viretp
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: