ignore checkstyle AvoidStaticImport for test frameworks

For whatever reason, both JUnit and Google recommend using static method
imports when writing tests.
This commit is contained in:
Hans-Christoph Steiner 2016-03-23 15:16:19 +01:00
parent 3fcdfe85bb
commit 538830d5a3

View File

@ -31,7 +31,10 @@
<module name="ClassTypeParameterName" /> <module name="ClassTypeParameterName" />
<module name="AvoidStarImport" /> <module name="AvoidStarImport" />
<module name="AvoidStaticImport" /> <module name="AvoidStaticImport">
<property name="excludes"
value="org.assertj.core.api.Assertions.*, org.junit.Assert.*, org.junit.Assume.*, org.junit.internal.matchers.ThrowableMessageMatcher.*, org.hamcrest.CoreMatchers.*, org.hamcrest.Matchers.*, org.springframework.boot.configurationprocessor.ConfigurationMetadataMatchers.*, org.springframework.boot.configurationprocessor.TestCompiler.*, org.mockito.Mockito.*, org.mockito.BDDMockito.*, org.mockito.Matchers.*, org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*, org.springframework.test.web.servlet.result.MockMvcResultMatchers.*, org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.*, org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.*, org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo" />
</module>
<module name="RedundantImport" /> <module name="RedundantImport" />
<module name="UnusedImports" /> <module name="UnusedImports" />
<module name="OuterTypeFilename" /> <module name="OuterTypeFilename" />