2222import guru .nidi .codeassert .dependency .*;
2323import guru .nidi .codeassert .findbugs .*;
2424import guru .nidi .codeassert .junit .CodeAssertJunit5Test ;
25- import guru .nidi .codeassert .junit .PredefConfig ;
2625import guru .nidi .codeassert .pmd .*;
2726import guru .nidi .graphviz .attribute .*;
2827import guru .nidi .graphviz .engine .*;
@@ -64,7 +63,7 @@ public void defineRules() {
6463 @ Override
6564 protected FindBugsResult analyzeFindBugs () {
6665 final BugCollector collector = new BugCollector ().minPriority (Priorities .NORMAL_PRIORITY )
67- .apply (PredefConfig .dependencyTestIgnore (CodeAnalysisTest .class ))
66+ .apply (FindBugsConfigs .dependencyTestIgnore (CodeAnalysisTest .class ))
6867 .because ("It's examples" , In .loc ("ReadmeTest" ).ignore ("DLS_DEAD_LOCAL_STORE" ))
6968 .because ("GraphvizServer is on localhost" ,
7069 In .locs ("GraphvizServer" , "GraphvizServerEngine" )
@@ -85,7 +84,7 @@ protected FindBugsResult analyzeFindBugs() {
8584 @ Override
8685 protected PmdResult analyzePmd () {
8786 final PmdViolationCollector collector = new PmdViolationCollector ().minPriority (RulePriority .MEDIUM )
88- .apply (PredefConfig .minimalPmdIgnore ())
87+ .apply (PmdConfigs .minimalPmdIgnore ())
8988 .because ("It's examples" , In .locs ("ExampleTest" , "ReadmeTest" )
9089 .ignore ("JUnitTestsShouldIncludeAssert" , "LocalVariableCouldBeFinal" , "UnusedLocalVariable" ))
9190 .because ("It's a test" , In .loc ("*Test" )
@@ -120,14 +119,14 @@ protected PmdResult analyzePmd() {
120119 .because ("It's wrapping an Exception with a RuntimeException" ,
121120 In .classes (Graphviz .class , CreationContext .class ).ignore ("AvoidCatchingGenericException" ));
122121 return new PmdAnalyzer (AnalyzerConfig .maven ().mainAndTest (), collector )
123- .withRulesets (PredefConfig .defaultPmdRulesets ())
122+ .withRulesets (PmdConfigs .defaultPmdRulesets ())
124123 .analyze ();
125124 }
126125
127126 @ Override
128127 protected CpdResult analyzeCpd () {
129128 final CpdMatchCollector collector = new CpdMatchCollector ()
130- .apply (PredefConfig .cpdIgnoreEqualsHashCodeToString ())
129+ .apply (PmdConfigs .cpdIgnoreEqualsHashCodeToString ())
131130 .because ("It's java" ,
132131 In .loc ("*Graph" ).ignore ("Graph(strict, directed, cluster, name," , "if (strict != graph.strict) {" ))
133132 .just (In .locs ("GraphvizGraalEngine" ,"GraphvizNashornEngine" ).ignore ("void doInit()" ));
@@ -137,10 +136,10 @@ protected CpdResult analyzeCpd() {
137136 @ Override
138137 protected CheckstyleResult analyzeCheckstyle () {
139138 final StyleEventCollector collector = new StyleEventCollector ()
140- .apply (PredefConfig .minimalCheckstyleIgnore ())
139+ .apply (CheckstyleConfigs .minimalCheckstyleIgnore ())
141140 .just (In .locs ("Color" , "Arrow" , "Rank" , "RankDir" , "Shape" , "Token" , "Style" , "Options" , "Records" , "SystemUtils" , "GraphAttr" ).ignore ("empty.line.separator" ))
142141 .just (In .clazz (For .class ).ignore ("one.top.level.class" ));
143- final StyleChecks checks = PredefConfig .adjustedGoogleStyleChecks ();
142+ final StyleChecks checks = CheckstyleConfigs .adjustedGoogleStyleChecks ();
144143 return new CheckstyleAnalyzer (AnalyzerConfig .maven ().main (), checks , collector ).analyze ();
145144 }
146145}
0 commit comments