File tree Expand file tree Collapse file tree 3 files changed +8
-11
lines changed
it/java/org/checkstyle/plugins/sonar
test/java/org/sonar/plugins/checkstyle Expand file tree Collapse file tree 3 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 2121
2222
2323 <!-- Tone down the checking for test code -->
24+ <suppress checks =" MultipleStringLiteralsExtended" files =" .*[\\/]src[\\/]it[\\/]" />
2425 <suppress checks =" MultipleStringLiteralsExtended" files =" .*[\\/]src[\\/]test[\\/]" />
2526 <suppress checks =" ForbidCCommentsInMethods" files =" .*[\\/]src[\\/]test[\\/]" />
27+ <suppress checks =" AvoidModifiersForTypes" files =" .*[\\/]src[\\/]it[\\/]" />
2628</suppressions >
Original file line number Diff line number Diff line change @@ -103,15 +103,9 @@ public static void afterAll() {
103103 }
104104
105105 @ Test
106- public void testSonarExecution () {
107- try {
108- final MavenBuild build = testProjectBuild ();
109- executeBuildWithCommonProperties (build , true );
110- }
111- catch (IOException exception ) {
112- LOG .error ("Build execution error." , exception );
113- fail ("Failed to execute build." );
114- }
106+ public void testSonarExecution () throws IOException {
107+ final MavenBuild build = testProjectBuild ();
108+ executeBuildWithCommonProperties (build , true );
115109 }
116110
117111 private static void executeBuildWithCommonProperties (Build <?> build , boolean buildQuietly )
Original file line number Diff line number Diff line change 2424import java .util .HashMap ;
2525import java .util .List ;
2626import java .util .Map ;
27+ import java .util .Map .Entry ;
2728import java .util .stream .Collectors ;
2829
2930import org .junit .Rule ;
@@ -71,11 +72,11 @@ public void test() {
7172 });
7273 final List <String > duplicatedRuleWithTemplate = ruleCounts .entrySet ().stream ()
7374 .filter (entry -> entry .getValue () > 1 )
74- .map (entry -> entry . getKey () )
75+ .map (Entry :: getKey )
7576 .collect (Collectors .toList ());
7677 final List <String > rulesWithDuplicateTemplate = ruleCounts .entrySet ().stream ()
7778 .filter (entry -> entry .getValue () == 1 )
78- .map (entry -> entry . getKey () )
79+ .map (Entry :: getKey )
7980 .collect (Collectors .toList ());
8081 // such number should not change during checkstyle version upgrade
8182 assertThat (duplicatedRuleWithTemplate ).hasSize (0 );
You can’t perform that action at this time.
0 commit comments