View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.indentation.indentation; //indent:0 exp:0
2   
3   /**                                                                           //indent:0 exp:0
4    * This test-input is intended to be checked using following configuration:   //indent:1 exp:1
5    *                                                                            //indent:1 exp:1
6    * arrayInitIndent = 4                                                        //indent:1 exp:1
7    * basicOffset = 4                                                            //indent:1 exp:1
8    * braceAdjustment = 0                                                        //indent:1 exp:1
9    * caseIndent = 4                                                             //indent:1 exp:1
10   * forceStrictCondition = false                                               //indent:1 exp:1
11   * lineWrappingIndentation = 4                                                //indent:1 exp:1
12   * tabWidth = 4                                                               //indent:1 exp:1
13   * throwsIndent = 4                                                           //indent:1 exp:1
14   *                                                                            //indent:1 exp:1
15   *                                                                            //indent:1 exp:1
16   */                                                                           //indent:1 exp:1
17  public class InputIndentationInvalidArrayInitIndent { //indent:0 exp:0
18  
19      int[] array = new int[] {1, 2, 3};
20  
21    int[] arrayb = new int[] {1, 2, 3};
22        int[] arrayc = new int[] {1, 2, 3};
23  
24    int[] array2 = new int[] {
25        1, 2, 3
26        };
27  
28        int[] array2b = new int[] {
29          1, 2, 3
30      };
31  
32      int[] array3 = new int[] {
33           1,
34         2,
35           3
36      };
37  
38  
39      int[] array4 = new int[]
40    {
41          1,
42          2,
43          3
44        };
45  
46  
47      int[] array5 = new int[]
48    {1, 2, 3};
49  
50  
51      int[] array6 = new int[] { 1, 2,
52                      3,
53      4,};
54  
55  
56  
57      int[] array7 = new int[] {
58        1, 2,
59          3
60      };
61  
62  
63    int[] array8 = new int[] { };
64  
65        int[] array9 = new int[] {
66    };
67  
68      int[][] array10 = new int[][] {
69        new int[] { 1, 2, 3},
70          new int[] { 1, 2, 3},
71      };
72  
73  
74      int[][] array10b
75          = new int[][] {
76            new int[] { 1, 2, 3},
77              new int[] { 1, 2, 3},
78          };
79  
80      private void func1(int[] arg) {
81  
82      }
83  
84  
85      /** Creates a new instance of InputIndentationValidArrayInitIndent */
86      public InputIndentationInvalidArrayInitIndent() {
87  
88          func1(new int[] {
89          1, 2, 3
90          });
91      }
92  
93      private static char[] sHexChars = {
94          '0', '1', '2', '3', '4', '5', '6', '7',
95          '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
96  
97      private void myFunc3()
98      {
99          char[] sHexChars2 = {
100           '0', '1', '2', '3', '4', '5', '6', '7',
101               '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
102 
103         char[] sHexChars3 = {
104           '0', '1', '2', '3', '4', '5', '6', '7',
105               '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
106       };
107 
108         char[] sHexChars4 =
109       {
110               '0', '1', '2', '3', '4', '5', '6', '7',
111           '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
112       };
113 
114     }
115 
116 }