|
17 | 17 |
|
18 | 18 | import guru.nidi.codeassert.checkstyle.*; |
19 | 19 | import guru.nidi.codeassert.config.AnalyzerConfig; |
| 20 | +import guru.nidi.codeassert.config.In; |
20 | 21 | import guru.nidi.codeassert.dependency.*; |
21 | | -import guru.nidi.codeassert.findbugs.FindBugsResult; |
| 22 | +import guru.nidi.codeassert.findbugs.*; |
22 | 23 | import guru.nidi.codeassert.junit.CodeAssertJunit5Test; |
23 | 24 | import guru.nidi.codeassert.junit.PredefConfig; |
24 | 25 | import guru.nidi.codeassert.pmd.*; |
25 | | -import net.sourceforge.pmd.RulePriority; |
26 | 26 | import org.junit.jupiter.api.Test; |
27 | 27 |
|
28 | 28 | import static guru.nidi.codeassert.dependency.DependencyRules.denyAll; |
@@ -53,18 +53,18 @@ public void defineRules() { |
53 | 53 |
|
54 | 54 | @Override |
55 | 55 | protected FindBugsResult analyzeFindBugs() { |
56 | | - return null; //TODO JVM crashes, WTF!? |
57 | | -// final BugCollector bugCollector = new BugCollector() |
58 | | -// .apply(PredefConfig.minimalFindBugsIgnore()) |
| 56 | +// return null; //TODO JVM crashes, WTF!? |
| 57 | + final BugCollector bugCollector = new BugCollector() |
| 58 | + .apply(PredefConfig.minimalFindBugsIgnore()) |
59 | 59 | // TODO fix |
60 | | -// .just(In.clazz(AppController.class).ignore("PATH_TRAVERSAL_IN")) |
61 | | -// .just(In.everywhere().ignore("SE_NO_SERIALVERSIONID", "SPRING_ENDPOINT")); |
62 | | -// return new FindBugsAnalyzer(AnalyzerConfig.maven().main(), bugCollector).analyze(); |
| 60 | + .just(In.clazz(AppController.class).ignore("PATH_TRAVERSAL_IN")) |
| 61 | + .just(In.everywhere().ignore("SE_NO_SERIALVERSIONID", "SPRING_ENDPOINT")); |
| 62 | + return new FindBugsAnalyzer(AnalyzerConfig.maven().main(), bugCollector).analyze(); |
63 | 63 | } |
64 | 64 |
|
65 | 65 | @Override |
66 | 66 | protected PmdResult analyzePmd() { |
67 | | - final PmdViolationCollector collector = new PmdViolationCollector().minPriority(RulePriority.MEDIUM) |
| 67 | + final PmdViolationCollector collector = new PmdViolationCollector()//.minPriority(RulePriority.MEDIUM) |
68 | 68 | .apply(PredefConfig.minimalPmdIgnore()); |
69 | 69 | return new PmdAnalyzer(AnalyzerConfig.maven().main(), collector) |
70 | 70 | .withRulesets(PredefConfig.defaultPmdRulesets()) |
|
0 commit comments