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