Add JUnit 5 checkstyle rules
Add a rule to enforce JUnit 5 usage and conventions. Closes gh-17093
This commit is contained in:
@@ -38,4 +38,11 @@
|
||||
<suppress files="SampleLogbackApplication\.java" checks="IllegalImport" />
|
||||
<suppress files="FlywayAutoConfigurationTests\.java" checks="IllegalImport" />
|
||||
<suppress files="JerseyAutoConfigurationServletContainerTests" checks="RedundantModifier" />
|
||||
<suppress files="ModifiedClassPathRunnerOverridesTests" checks="SpringJUnit5" />
|
||||
<suppress files="ModifiedClassPathRunnerExclusionsTests" checks="SpringJUnit5" />
|
||||
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]org[\\/]springframework[\\/]boot[\\/]test[\\/]rule[\\/]" checks="SpringJUnit5" />
|
||||
<suppress files="OutputCaptureRuleTests" checks="SpringJUnit5" />
|
||||
<suppress files="JavaLoggingSystemTests" checks="SpringJUnit5" />
|
||||
<suppress files="Log4J2LoggingSystemTests" checks="SpringJUnit5" />
|
||||
<suppress files="RestClientTestWithComponentIntegrationTests" checks="SpringJUnit5" />
|
||||
</suppressions>
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
</module>
|
||||
<module name="io.spring.javaformat.checkstyle.SpringChecks" />
|
||||
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
|
||||
<module name="io.spring.javaformat.checkstyle.check.SpringJUnit5Check">
|
||||
<property name="unlessImports" value="org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathRunner" />
|
||||
</module>
|
||||
<module
|
||||
name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
|
||||
<property name="regexp" value="true" />
|
||||
|
||||
Reference in New Issue
Block a user