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