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   * @author  jrichard                                                         //indent:1 exp:1
16   */                                                                           //indent:1 exp:1
17  public class InputIndentationInvalidLabelIndent { //indent:0 exp:0
18  
19      /** Creates a new instance of InputIndentationInvalidLabelIndent */ //indent:4 exp:4
20      public InputIndentationInvalidLabelIndent() { //indent:4 exp:4
21          boolean test = true; //indent:8 exp:8
22  
23          while (test) { //indent:8 exp:8
24            label: //indent:10 exp:8,12 warn
25              System.identityHashCode("label test"); //indent:12 exp:12
26  
27              if (test) { //indent:12 exp:12
28                  unusedLabel: //indent:16 exp:16
29                  System.identityHashCode("more testing"); //indent:16 exp:16
30              } //indent:12 exp:12
31  
32          } //indent:8 exp:8
33    label2: //indent:2 exp:4,8 warn
34          System.identityHashCode("toplevel"); //indent:8 exp:8
35      label3: //indent:4 exp:4
36                    System.identityHashCode("toplevel"); //indent:18 exp:8,12 warn
37                    System.identityHashCode("toplevel"); //indent:18 exp:8 warn
38      label4: //indent:4 exp:4
39        System.identityHashCode("toplevel"); //indent:6 exp:8,12 warn
40      label5: //indent:4 exp:4
41        String //indent:6 exp:8,12 warn
42              .CASE_INSENSITIVE_ORDER. //indent:12 exp:>=10
43                  equals("toplevel"); //indent:16 exp:>=16
44      } //indent:4 exp:4
45  
46  } //indent:0 exp:0