1 /* 2 LineLength 3 fileExtensions = (default)"" 4 ignorePattern = ^.*is OK.*regexp.*$ 5 max = (default)80 6 7 8 */ 9 10 package com.puppycrawl.tools.checkstyle.checks.sizes.linelength; 11 12 /** 13 * Contains simple mistakes: 14 * - Long lines 15 * - Tabs 16 * - Format of variables and parameters 17 * - Order of modifiers 18 * @author Oliver Burn 19 **/ 20 final class InputLineLengthSimpleOne 21 { 22 // Long line --------------------------------------------------- // violation 23 // Contains a tab ->\t<- 24 // Contains trailing whitespace -> 25 26 // Name format tests 27 // 28 /** Invalid format **/ 29 public static final int badConstant = 2; 30 /** Valid format **/ 31 public static final int MAX_ROWS = 2; 32 33 /** Invalid format **/ 34 private static int badStatic = 2; 35 /** Valid format **/ 36 private static int sNumCreated = 0; 37 38 /** Invalid format **/ 39 private int badMember = 2; 40 /** Valid format **/ 41 private int mNumCreated1 = 0; 42 /** Valid format **/ 43 protected int mNumCreated2 = 0; 44 45 /** commas are wrong **/ 46 private int[] mInts = new int[] {1,2, 3, 47 4}; 48 49 // 50 // Accessor tests 51 // 52 /** should be private **/ 53 public static int sTest1; 54 /** should be private **/ 55 protected static int sTest3; 56 /** should be private **/ 57 static int sTest2; 58 59 /** should be private **/ 60 int mTest1; 61 /** should be private **/ 62 public int mTest2; 63 64 // 65 // Parameter name format tests 66 // 67 68 /** 69 * @return hack 70 * @param badFormat1 bad format 71 * @param badFormat2 bad format 72 * @param badFormat3 bad format 73 * @throws Exception abc 74 **/ 75 int test1(int badFormat1,int badFormat2, 76 final int badFormat3) 77 throws Exception 78 { 79 return 0; 80 } 81 }