Browse Source

Ensure Hamcrest imports are properly banned

pull/23580/head
Sam Brannen 5 years ago
parent
commit
652db21d3e
  1. 30
      src/checkstyle/checkstyle-suppressions.xml
  2. 2
      src/checkstyle/checkstyle.xml

30
src/checkstyle/checkstyle-suppressions.xml

@ -65,14 +65,34 @@ @@ -65,14 +65,34 @@
<suppress files="org[\\/]springframework[\\/]test[\\/]context[\\/]support[\\/]ContextLoaderUtilsContextHierarchyTests" checks="RegexpSinglelineJava" id="expectedExceptionAnnotation" />
<suppress files="org[\\/]springframework[\\/]test[\\/]context[\\/]testng[\\/]transaction[\\/]programmatic/ProgrammaticTxMgmtTestNGTests" checks="RegexpSinglelineJava" id="expectedExceptionAnnotation" />
<suppress files="org[\\/]springframework[\\/]test[\\/]context[\\/]transaction[\\/]programmatic[\\/]ProgrammaticTxMgmtTests" checks="RegexpSinglelineJava" id="expectedExceptionAnnotation" />
<suppress files="JsonPathExpectationsHelper" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="XpathExpectationsHelper" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="org[\\/]springframework[\\/]test[\\/].+Tests" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="ContentRequestMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="ContentResultMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="CookieResultMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="DefaultWebTestClient" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="FlashAttributeResultMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="HandlerResultMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="HeaderAssertions" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="StatusAssertions" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="HeaderResultMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="JsonPathAssertions" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="JsonPathExpectationsHelper" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="JsonPathRequestMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="JsonPathResultMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="src[\\/]test[\\/]java[\\/]org[\\/]springframework[\\/]test[\\/]context[\\/]junit4" checks="SpringJUnit5"/>
<suppress files="ContextHierarchyDirtiesContextTests|ClassLevelDirtiesContextTests|ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests|ContextConfigurationWithPropertiesExtendingPropertiesTests|DirtiesContextInterfaceTests|.*WacTests|JUnit4SpringContextWebTests" checks="SpringJUnit5"/>
<suppress files="MockMvcResultMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="MockRestRequestMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="ModelResultMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="RequestResultMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="StatusAssertions" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="StatusResultMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="ViewResultMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="WebTestClient" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="XmlExpectationsHelper" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="XpathAssertions" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="XpathExpectationsHelper" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="XpathRequestMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="XpathResultMatchers" checks="IllegalImport" id="bannedHamcrestImports" />
<suppress files="src[\\/]test[\\/]java[\\/]org[\\/]springframework[\\/]test[\\/]context[\\/]junit4" checks="SpringJUnit5" />
<suppress files="ContextHierarchyDirtiesContextTests|ClassLevelDirtiesContextTests|ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests|ContextConfigurationWithPropertiesExtendingPropertiesTests|DirtiesContextInterfaceTests|.*WacTests|JUnit4SpringContextWebTests" checks="SpringJUnit5" />
<!-- spring-web -->
<suppress files="SpringHandlerInstantiator" checks="JavadocStyle" />

2
src/checkstyle/checkstyle.xml

@ -106,7 +106,7 @@ @@ -106,7 +106,7 @@
<property name="id" value="bannedHamcrestImports"/>
<property name="regexp" value="true" />
<property name="illegalClasses"
value="^org\.hamcrest\.MatcherAssert" />
value="^org\.hamcrest\..+" />
</module>
<!-- Javadoc Comments -->

Loading…
Cancel
Save