Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #3678: update ITs to load certain config by id if there few of …
…them in file
- Loading branch information
Showing
7 changed files
with
192 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...oogle/checkstyle/test/chapter4formatting/rule451wheretobreak/InputSeparatorWrapComma.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.google.checkstyle.test.chapter4formatting.rule451wheretobreak; | ||
|
||
public class InputSeparatorWrapComma { | ||
public void goodCase() | ||
{ | ||
int i = 0; | ||
String s = "ffffooooString"; | ||
s | ||
.isEmpty(); //ok | ||
s.isEmpty(); | ||
|
||
foo(i, | ||
s); //ok | ||
} | ||
public static void foo(int i, String s) | ||
{ | ||
|
||
} | ||
} | ||
|
||
class badCaseComma { | ||
|
||
public void goodCase(int... aFoo) | ||
{ | ||
int i = 0; | ||
|
||
String s = "ffffooooString"; | ||
boolean b = s. | ||
isEmpty(); | ||
foo(i | ||
,s); //warn | ||
int[] j; | ||
} | ||
public static String foo(int i, String s) | ||
{ | ||
String maxLength = "123"; | ||
int truncationLength = 1; | ||
CharSequence seq = null; | ||
Object truncationIndicator = null; | ||
return new StringBuilder(maxLength ) | ||
.append(seq, 0, truncationLength ) | ||
.append(truncationIndicator) | ||
.toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
...eckstyle/test/chapter4formatting/rule485annotations/InputAnnotationLocationVariables.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
package com.google.checkstyle.test.chapter4formatting.rule485annotations; | ||
|
||
@MyAnnotation2 @MyAnnotation1 // ok - in variables config | ||
class InputAnnotationLocationVariables | ||
{ | ||
|
||
@MyAnnotation2 @MyAnnotation1 | ||
public int a; | ||
|
||
@MyAnnotation1 public int b; | ||
|
||
@MyAnnotation2 | ||
@MyAnnotation1 | ||
public int c; | ||
|
||
@MyAnnotation1 | ||
public int d; | ||
|
||
@MyAnnotation2 | ||
@MyAnnotation1 // ok - in variables config | ||
public InputAnnotationLocationVariables() {} | ||
|
||
@MyAnnotationWithParam("foo") | ||
@MyAnnotation2 void foo1() {} | ||
|
||
@MyAnnotation1 | ||
@MyAnnotation2 // ok - in variables config | ||
void foo2() {} | ||
|
||
@MyAnnotation1 | ||
@MyAnnotation2 // ok - in variables config | ||
@MyAnnotation3 // ok - in variables configwarn | ||
@MyAnnotation4 // ok - in variables config | ||
class InnerClass | ||
{ | ||
@MyAnnotation2 @MyAnnotation1 | ||
public int a; | ||
|
||
@MyAnnotation1 public int b; | ||
|
||
@MyAnnotation2 | ||
@MyAnnotation1 | ||
public int c; | ||
|
||
@MyAnnotation1 | ||
public int d; | ||
|
||
@MyAnnotation2 | ||
@MyAnnotation1 public InnerClass() | ||
{ | ||
// TODO Auto-generated constructor stub | ||
} | ||
@MyAnnotation1 | ||
@MyAnnotation2 // ok - in variables config | ||
void foo1() {} | ||
|
||
@MyAnnotation1 | ||
@MyAnnotation2 // ok - in variables config | ||
void foo2() {} | ||
} | ||
|
||
@MyAnnotation1 | ||
@MyAnnotation2 //warn | ||
InnerClass anon = new InnerClass() | ||
{ | ||
@MyAnnotation2 @MyAnnotation1 public int a; | ||
|
||
@MyAnnotation1 public int b; | ||
|
||
@MyAnnotation2 | ||
@MyAnnotation1 | ||
public int c; | ||
|
||
@MyAnnotation1 | ||
public int d; | ||
|
||
@MyAnnotation1 | ||
@MyAnnotation2 void foo1() {} // ok - in variables config | ||
|
||
@MyAnnotation1 | ||
@MyAnnotation2 // ok - in variables config | ||
void foo2() {} | ||
|
||
@MyAnnotation1 void foo42() {} | ||
}; | ||
|
||
} | ||
|
||
@MyAnnotation1 | ||
@MyAnnotation2 // ok - in variables config | ||
class FooVariables {} | ||
|
||
@interface MyAnnotationVariables1 {} | ||
|
||
@interface MyAnnotationVariables2 {} | ||
|
||
@interface MyAnnotationVariables3 {} | ||
|
||
@interface MyAnnotationVariables4 {} | ||
|
||
@interface MyAnnotationWithParamVariables { | ||
|
||
String value();} |