You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
173 lines
11 KiB
XML
173 lines
11 KiB
XML
<?xml version="1.0"?>
|
|
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
|
|
<module name="com.puppycrawl.tools.checkstyle.Checker">
|
|
<!-- Root Checks -->
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.header.RegexpHeaderCheck">
|
|
<property name="headerFile" value="${checkstyle.header.file}" />
|
|
<property name="fileExtensions" value="java" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck">
|
|
<property name="lineSeparator" value="lf"/>
|
|
</module>
|
|
|
|
<!-- TreeWalker Checks -->
|
|
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
|
|
<!-- Annotations -->
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck">
|
|
<property name="elementStyle" value="compact" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.annotation.MissingOverrideCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.annotation.PackageAnnotationCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationLocationCheck">
|
|
<property name="allowSamelineSingleParameterlessAnnotation"
|
|
value="false" />
|
|
</module>
|
|
|
|
<!-- Block Checks -->
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck">
|
|
<property name="option" value="text" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheck">
|
|
<property name="option" value="alone" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.blocks.AvoidNestedBlocksCheck" />
|
|
|
|
<!-- Class Design -->
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.design.FinalClassCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.design.InterfaceIsTypeCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.design.HideUtilityClassConstructorCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.design.MutableExceptionCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.design.InnerTypeLastCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.design.OneTopLevelClassCheck" />
|
|
|
|
<!-- Coding -->
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.CovariantEqualsCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.EmptyStatementCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.EqualsHashCodeCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.InnerAssignmentCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.SimplifyBooleanExpressionCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.SimplifyBooleanReturnCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.StringLiteralEqualityCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.NestedForDepthCheck">
|
|
<property name="max" value="3" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.NestedIfDepthCheck">
|
|
<property name="max" value="3" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.NestedTryDepthCheck">
|
|
<property name="max" value="3" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.MultipleVariableDeclarationsCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck">
|
|
<property name="checkMethods" value="false" />
|
|
<property name="validateOnlyOverlapping" value="false" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck" />
|
|
|
|
<!-- Imports -->
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.imports.AvoidStaticImportCheck">
|
|
<property name="excludes"
|
|
value="io.restassured.RestAssured.*, 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.springframework.boot.test.autoconfigure.AutoConfigurationImportedCondition.*, org.mockito.Mockito.*, org.mockito.BDDMockito.*, org.mockito.ArgumentMatchers.*, org.mockito.Matchers.*, org.springframework.restdocs.hypermedia.HypermediaDocumentation.*, org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.*, org.springframework.restdocs.operation.preprocess.Preprocessors.*, org.springframework.restdocs.payload.PayloadDocumentation.*, org.springframework.restdocs.request.RequestDocumentation.*, org.springframework.restdocs.restassured3.operation.preprocess.RestAssuredPreprocessors.*, org.springframework.restdocs.restassured3.RestAssuredRestDocumentation.*, org.springframework.restdocs.webtestclient.WebTestClientRestDocumentation.*, 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, org.springframework.test.web.client.ExpectedCount.*, org.springframework.test.web.client.match.MockRestRequestMatchers.*, org.springframework.test.web.client.response.MockRestResponseCreators.*" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck" >
|
|
<property name="illegalPkgs" value="sun, org.apache.commons.(?!codec|compress|dbcp2|lang|lang3|logging|pool2).*, com.google.common, org.flywaydb.core.internal, reactor.core.support.Assert"/>
|
|
<property name="regexp" value="true"/>
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.imports.RedundantImportCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.imports.UnusedImportsCheck">
|
|
<property name="processJavadoc" value="true" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.imports.ImportControlCheck">
|
|
<property name="file" value="${main.basedir}/spring-boot-project/spring-boot-parent/src/checkstyle/import-control.xml" />
|
|
<property name="path" value="^.*[\\/]src[\\/]main[\\/].*$" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck">
|
|
<property name="groups" value="java,/^javax?\./,*,org.springframework" />
|
|
<property name="ordered" value="true" />
|
|
<property name="separated" value="true" />
|
|
<property name="option" value="bottom" />
|
|
<property name="sortStaticImportsAlphabetically" value="true" />
|
|
</module>
|
|
|
|
<!-- Javadoc Comments -->
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTypeCheck">
|
|
<property name="scope" value="package"/>
|
|
<property name="authorFormat" value=".+\s.+"/>
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck">
|
|
<property name="allowMissingJavadoc" value="true" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck">
|
|
<property name="scope" value="public"/>
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck">
|
|
<property name="checkEmptyJavadoc" value="true"/>
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.NonEmptyAtclauseDescriptionCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTagContinuationIndentationCheck">
|
|
<property name="offset" value="0"/>
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.AtclauseOrderCheck">
|
|
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF"/>
|
|
<property name="tagOrder" value="@param, @author, @since, @see, @version, @serial, @deprecated"/>
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.AtclauseOrderCheck">
|
|
<property name="target" value="METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
|
<property name="tagOrder" value="@param, @return, @throws, @since, @deprecated, @see"/>
|
|
</module>
|
|
|
|
<!-- Miscellaneous -->
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.indentation.CommentsIndentationCheck">
|
|
<property name="tokens" value="BLOCK_COMMENT_BEGIN"/>
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.ArrayTypeStyleCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.OuterTypeFilenameCheck" />
|
|
|
|
<!-- Modifiers -->
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.modifier.RedundantModifierCheck" />
|
|
|
|
<!-- Regexp -->
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">
|
|
<property name="format" value="^\t* +\t*\S" />
|
|
<property name="message"
|
|
value="Line has leading space characters; indentation should be performed with tabs only." />
|
|
<property name="ignoreComments" value="true" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">
|
|
<property name="maximum" value="0"/>
|
|
<property name="format" value="org\.mockito\.Mockito\.(when|doThrow|doAnswer)" />
|
|
<property name="message"
|
|
value="Please use BDDMockito imports." />
|
|
<property name="ignoreComments" value="true" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">
|
|
<property name="maximum" value="0"/>
|
|
<property name="format" value="org\.junit\.Assert\.assert" />
|
|
<property name="message"
|
|
value="Please use AssertJ imports." />
|
|
<property name="ignoreComments" value="true" />
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpCheck">
|
|
<property name="format" value="[ \t]+$" />
|
|
<property name="illegalPattern" value="true" />
|
|
<property name="message" value="Trailing whitespace" />
|
|
</module>
|
|
|
|
<!-- Whitespace -->
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.GenericWhitespaceCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.MethodParamPadCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.NoWhitespaceAfterCheck" >
|
|
<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS, ARRAY_DECLARATOR"/>
|
|
</module>
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.NoWhitespaceBeforeCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.ParenPadCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.TypecastParenPadCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAfterCheck" />
|
|
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck" />
|
|
</module>
|
|
</module>
|