@@ -322,7 +322,7 @@ If it does so, these standard checks will be executed:
322322[ // ] : # ( codeTest )
323323``` java
324324// extend CodeAssertTest if you still use JUnit 4
325- public class CodeTest extends CodeAssertCoreJunit5Test {
325+ public class CodeTest extends CodeAssertJunit5Test {
326326
327327 private static final AnalyzerConfig CONFIG = AnalyzerConfig . maven(). main();
328328
@@ -340,6 +340,27 @@ public class CodeTest extends CodeAssertCoreJunit5Test {
340340 final DependencyRules rules = denyAll(). withExternals(" java.*" ). withRelativeRules(new MyProject ());
341341 return new DependencyAnalyzer (CONFIG ). rules(rules). analyze();
342342 }
343+
344+ @Override
345+ protected FindBugsResult analyzeFindBugs () {
346+ final BugCollector bugCollector = new BugCollector (). just(
347+ In . classes(" *Exception" ). ignore(" SE_BAD_FIELD" ));
348+ return new FindBugsAnalyzer (CONFIG , bugCollector). analyze();
349+ }
350+
351+ @Override
352+ protected CheckstyleResult analyzeCheckstyle () {
353+ final StyleEventCollector bugCollector = new StyleEventCollector (). just(
354+ In . everywhere(). ignore(" javadoc.missing" ));
355+ return new CheckstyleAnalyzer (CONFIG , StyleChecks . google(), bugCollector). analyze();
356+ }
357+
358+ @Override
359+ protected PmdResult analyzePmd () {
360+ final PmdViolationCollector collector = new PmdViolationCollector (). just(
361+ In . everywhere(). ignore(" MethodArgumentCouldBeFinal" ));
362+ return new PmdAnalyzer (CONFIG , collector). withRulesets(basic(), braces()). analyze();
363+ }
343364}
344365```
345366[ // ] : # ( end )
0 commit comments