View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="LineLength">
4       <property name="ignorePattern" value="^ *\* *[^ ]+$"/>
5     </module>
6   </module>
7   */
8   // xdoc section -- start
9   package com.puppycrawl.tools.checkstyle.checks.sizes.linelength;
10  // violation below, 'Line is longer than 80 characters'
11  import static com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck.MSG_KEY;
12  
13  /**
14   * This is a short Javadoc comment.
15   * ThisJavadocCommentIsAReallyLongWordThatExceedsDefaultLineLimitOfEightyCharacters.
16   */
17  class Example3 {
18  
19    void testMethod(String str) {
20      str = MSG_KEY;
21      System.out.println("This is a short line.");
22      // violation below, 'Line is longer than 80 characters'
23      System.out.println("This line is long and exceeds the default limit of 80 characters.");
24    }
25  }
26  // xdoc section -- end