Skip to content

Commit

Permalink
Allow static imports in tests (#240)
Browse files Browse the repository at this point in the history
* Allow static imports in tests

* Line split
  • Loading branch information
iamdanfox authored Feb 6, 2018
1 parent 460e530 commit 9e3988a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<suppress files="[/\\]src[/\\].*[Tt]est[/\\](java|groovy)[/\\]" checks="Javadoc*" />
<suppress files="[/\\]src[/\\].*[Tt]est[/\\](java|groovy)[/\\]" checks="VariableDeclarationUsageDistance" />
<suppress files="[/\\]src[/\\].*[Tt]est[/\\](java|groovy)[/\\]" checks="VisibilityModifier" />
<suppress files="[/\\]src[/\\].*[Tt]est[/\\](java|groovy)[/\\]" checks="AvoidStaticImport" />

<!-- JavadocStyle enforces existence of package-info.java package-level Javadoc; we consider this a bug. -->
<suppress files="package-info.java" checks="JavadocStyle" />
Expand Down
12 changes: 3 additions & 9 deletions gradle-baseline-java-config/resources/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,9 @@
<module name="AvoidStarImport"/> <!-- Java Style Guide: No wildcard imports -->
<module name="AvoidStaticImport"> <!-- Java Style Guide: No static imports -->
<property name="excludes" value="
java.util.Collections.*,java.util.stream.Collectors.*,
org.junit.Assert.*,org.junit.Assume.*,
org.hamcrest.CoreMatchers.*,org.hamcrest.Matchers.*,org.hamcrest.MatcherAssert.*,
org.hamcrest.core.AllOf.*,org.hamcrest.core.Is.*,org.hamcrest.core.StringContains.*,org.hamcrest.core.IsEqual.*,
org.hamcrest.collection.IsMapContaining.*,
org.mockito.ArgumentMatchers.*,org.mockito.Mockito.*,org.mockito.Matchers.*,
org.assertj.core.api.Assertions.*,
org.assertj.guava.api.Assertions.*,
com.google.common.base.Preconditions.*,com.google.common.truth.Truth.*,
java.util.Collections.*,
java.util.stream.Collectors.*,
com.google.common.base.Preconditions.*,
org.apache.commons.lang3.Validate.*"/>
</module>
<module name="ClassTypeParameterName"> <!-- Java Style Guide: Type variable names -->
Expand Down

0 comments on commit 9e3988a

Please sign in to comment.