File tree Expand file tree Collapse file tree 9 files changed +33
-33
lines changed
qulice-checkstyle/src/test/resources/com/qulice/checkstyle/ChecksTest
CurlyBracketsStructureCheck
ProhibitNonFinalClassesCheck
ProhibitUnusedPrivateConstructorCheck
ProtectedMethodInFinalClassCheck
qulice-maven-plugin/src/it/checkstyle-violations
qulice-pmd/src/test/java/com/qulice/pmd Expand file tree Collapse file tree 9 files changed +33
-33
lines changed Original file line number Diff line number Diff line change 1+ 15:Closing bracket should be on a new line
2+ 18:Closing bracket should be on a new line
3+ 19:Parameters should start on a new line
4+ 23:Closing bracket should be on a new line
5+ 28:Closing bracket should be on a new line
6+ 31:Closing bracket should be on a new line
7+ 32:Parameters should start on a new line
8+ 36:Closing bracket should be on a new line
1941:Closing bracket should be on a new line
21044:Closing bracket should be on a new line
31145:Parameters should start on a new line
41249:Closing bracket should be on a new line
5- 54:Closing bracket should be on a new line
6- 57:Closing bracket should be on a new line
7- 58:Parameters should start on a new line
8- 62:Closing bracket should be on a new line
9- 67:Closing bracket should be on a new line
10- 70:Closing bracket should be on a new line
11- 71:Parameters should start on a new line
12- 75:Closing bracket should be on a new line
Original file line number Diff line number Diff line change 1- 42 :Wrong method declaration order
2- 44 :Wrong method declaration order
3- 55 :Wrong method declaration order
4- 57 :Wrong method declaration order
5- 72 :Wrong method declaration order
1+ 16 :Wrong method declaration order
2+ 18 :Wrong method declaration order
3+ 29 :Wrong method declaration order
4+ 31 :Wrong method declaration order
5+ 46 :Wrong method declaration order
Original file line number Diff line number Diff line change 1- 37 :Classes should be final
2- 40 :Classes should be final
1+ 11 :Classes should be final
2+ 14 :Classes should be final
Original file line number Diff line number Diff line change 1- 45 :Unused private constructor.
1+ 19 :Unused private constructor.
Original file line number Diff line number Diff line change 1- 39 :Final class should not contain protected methods
2- 41 :Final class should not contain protected methods
3- 44 :Final class should not contain protected methods
4- 52 :Protected method is overriding default scoped method
1+ 13 :Final class should not contain protected methods
2+ 15 :Final class should not contain protected methods
3+ 18 :Final class should not contain protected methods
4+ 26 :Protected method is overriding default scoped method
Original file line number Diff line number Diff line change 66
77def log = new File (basedir, ' build.log' )
88assert log. text. findAll(' .*Brackets.java.*BracketsStructureCheck' ). size() == 4
9- assert log. text. contains(' Tabs.java[34 ]: Line contains a tab character. (FileTabCharacterCheck)' )
9+ assert log. text. contains(' Tabs.java[8 ]: Line contains a tab character. (FileTabCharacterCheck)' )
1010assert log. text. findAll(' Brackets.java.*(HeaderCheck)' ). empty
1111// assert log.text.contains('Violations.java[6]: This method must be static, because it does not refer to "this"')
12- assert log. text. contains(' Brackets.java[54 ]: Closing bracket should be on a new line (BracketsStructureCheck)' )
13- assert log. text. contains(' Violations.java[44 ]: Parameter txt should be final. (FinalParametersCheck)' )
14- assert log. text. contains(' Violations.java[55 ]: Parameter ex should be final. (FinalParametersCheck)' )
15- assert log. text. contains(' Violations.java[63 ]: ArrayList should be initialized with a size parameter' )
16- assert log. text. contains(' Violations.java[64 ]: ArrayList should be initialized with a size parameter' )
12+ assert log. text. contains(' Brackets.java[28 ]: Closing bracket should be on a new line (BracketsStructureCheck)' )
13+ assert log. text. contains(' Violations.java[18 ]: Parameter txt should be final. (FinalParametersCheck)' )
14+ assert log. text. contains(' Violations.java[29 ]: Parameter ex should be final. (FinalParametersCheck)' )
15+ assert log. text. contains(' Violations.java[37 ]: ArrayList should be initialized with a size parameter' )
16+ assert log. text. contains(' Violations.java[38 ]: ArrayList should be initialized with a size parameter' )
1717assert ! log. text. contains(' Got an exception - java.lang.NullPointerException' )
1818assert log. text. findAll(' SomeTest.java .+ (JavadocMethodCheck)' ). isEmpty()
1919assert ! log. text. contains(' IndentationChecks.java[49]: method call rparen at indentation level 12' )
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ void detectLocalVariableCouldBeFinal() throws Exception {
2929 new StringStartsWith (
3030 String .join (
3131 " " ,
32- "PMD: LocalVariableCouldBeFinal.java[36-36 ]:" ,
32+ "PMD: LocalVariableCouldBeFinal.java[10-10 ]:" ,
3333 "Local variable 'nonfinal' could be declared final" ,
3434 "(LocalVariableCouldBeFinal)"
3535 )
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ void detectUnusedImportLine() throws Exception {
2929 new StringStartsWith (
3030 String .join (
3131 " " ,
32- "PMD: UnusedImports.java[33-33 ]: Unused import" ,
32+ "PMD: UnusedImports.java[7-7 ]: Unused import" ,
3333 "'unused.bar.foo.UnusedImport'" ,
3434 "(UnnecessaryImport)"
3535 ).trim ()
Original file line number Diff line number Diff line change @@ -40,11 +40,11 @@ final class UseStringIsEmptyRuleTest {
4040 void detectLengthComparisons (final String file ) throws Exception {
4141 new PmdAssert (
4242 file , new IsEqual <>(false ),
43- new CombinableMatcher <>(containsMatcher (file , 46 ))
44- .and (containsMatcher (file , 50 ))
45- .and (containsMatcher (file , 54 ))
46- .and (containsMatcher (file , 58 ))
47- .and (containsMatcher (file , 62 ))
43+ new CombinableMatcher <>(containsMatcher (file , 20 ))
44+ .and (containsMatcher (file , 24 ))
45+ .and (containsMatcher (file , 28 ))
46+ .and (containsMatcher (file , 32 ))
47+ .and (containsMatcher (file , 36 ))
4848 ).validate ();
4949 }
5050
You can’t perform that action at this time.
0 commit comments