Skip to content

Commit 128a3d8

Browse files
committed
update parent pom
Signed-off-by: Stefan Niederhauser <[email protected]>
1 parent 3447443 commit 128a3d8

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

graphviz-java/src/test/java/guru/nidi/graphviz/CodeAnalysisTest.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import guru.nidi.codeassert.dependency.*;
2323
import guru.nidi.codeassert.findbugs.*;
2424
import guru.nidi.codeassert.junit.CodeAssertJunit5Test;
25-
import guru.nidi.codeassert.junit.PredefConfig;
2625
import guru.nidi.codeassert.pmd.*;
2726
import guru.nidi.graphviz.attribute.*;
2827
import 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
}

graphviz-kotlin/src/test/kotlin/guru/nidi/graphviz/CodeAnalysisTest.kt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@
1515
*/
1616
package guru.nidi.graphviz
1717

18-
import guru.nidi.codeassert.checkstyle.CheckstyleAnalyzer
19-
import guru.nidi.codeassert.checkstyle.StyleEventCollector
18+
import guru.nidi.codeassert.checkstyle.*
2019
import guru.nidi.codeassert.config.AnalyzerConfig
2120
import guru.nidi.codeassert.config.In
2221
import guru.nidi.codeassert.config.Language.KOTLIN
2322
import guru.nidi.codeassert.dependency.*
2423
import guru.nidi.codeassert.junit.CodeAssertJunit5Test
25-
import guru.nidi.codeassert.junit.PredefConfig
2624
import guru.nidi.codeassert.junit.kotlin.KotlinCodeAssertMatchers.hasNoKtlintIssues
2725
import guru.nidi.codeassert.ktlint.KtlintAnalyzer
2826
import guru.nidi.codeassert.ktlint.KtlintCollector
@@ -45,15 +43,15 @@ class CodeAnalysisTest : CodeAssertJunit5Test() {
4543
.analyze()
4644
}
4745

48-
override fun analyzeCheckstyle() = CheckstyleAnalyzer(config, PredefConfig.adjustedGoogleStyleChecks(), StyleEventCollector()
49-
.apply(PredefConfig.minimalCheckstyleIgnore()))
46+
override fun analyzeCheckstyle() = CheckstyleAnalyzer(config, CheckstyleConfigs.adjustedGoogleStyleChecks(), StyleEventCollector()
47+
.apply(CheckstyleConfigs.minimalCheckstyleIgnore()))
5048
.analyze()!!
5149

5250
override fun analyzeCpd() = CpdAnalyzer(config, 25, CpdMatchCollector()).analyze()!!
5351

5452
override fun analyzePmd() = PmdAnalyzer(config, PmdViolationCollector()
55-
.apply(PredefConfig.minimalPmdIgnore()))
56-
.withRulesets(*PredefConfig.defaultPmdRulesets())
53+
.apply(PmdConfigs.minimalPmdIgnore()))
54+
.withRulesets(*PmdConfigs.defaultPmdRulesets())
5755
.analyze()!!
5856

5957
//TODO findbugs crashed the JVM! WTF!?

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>guru.nidi</groupId>
77
<artifactId>guru-nidi-parent-pom</artifactId>
8-
<version>1.1.21</version>
8+
<version>1.1.24</version>
99
<relativePath />
1010
</parent>
1111

0 commit comments

Comments
 (0)