parent
e674d751de
commit
c813060f18
@ -0,0 +1,17 @@
|
|||||||
|
^\Q/*\E$
|
||||||
|
^\Q * Copyright \E20\d\d\-20\d\d\Q the original author or authors.\E$
|
||||||
|
^\Q *\E$
|
||||||
|
^\Q * Licensed under the Apache License, Version 2.0 (the "License");\E$
|
||||||
|
^\Q * you may not use this file except in compliance with the License.\E$
|
||||||
|
^\Q * You may obtain a copy of the License at\E$
|
||||||
|
^\Q *\E$
|
||||||
|
^\Q * http://www.apache.org/licenses/LICENSE-2.0\E$
|
||||||
|
^\Q *\E$
|
||||||
|
^\Q * Unless required by applicable law or agreed to in writing, software\E$
|
||||||
|
^\Q * distributed under the License is distributed on an "AS IS" BASIS,\E$
|
||||||
|
^\Q * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\E$
|
||||||
|
^\Q * See the License for the specific language governing permissions and\E$
|
||||||
|
^\Q * limitations under the License.\E$
|
||||||
|
^\Q */\E$
|
||||||
|
^$
|
||||||
|
^.*$
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE import-control PUBLIC "-//Puppy Crawl//DTD Import Control 1.1//EN" "http://www.puppycrawl.com/dtds/import_control_1_1.dtd">
|
||||||
|
<import-control pkg="org.springframework.boot">
|
||||||
|
|
||||||
|
<allow pkg=".*" regex="true"/>
|
||||||
|
|
||||||
|
<!-- Use BDD Mockito -->
|
||||||
|
<disallow class="org.mockito.Mockito.when"/>
|
||||||
|
<disallow class="org.mockito.Mockito.doThrow"/>
|
||||||
|
<disallow class="org.mockito.Mockito.doAnswer"/>
|
||||||
|
|
||||||
|
</import-control>
|
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE suppressions PUBLIC
|
||||||
|
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
|
||||||
|
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
|
||||||
|
<suppressions>
|
||||||
|
<suppress files="SpringApplicationTests\.java" checks="FinalClass" />
|
||||||
|
<suppress files=".+Configuration\.java" checks="HideUtilityClassConstructor" />
|
||||||
|
<suppress files="SignalUtils\.java" checks="IllegalImport" />
|
||||||
|
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]cli[\\/]command[\\/]" checks="ImportControl" />
|
||||||
|
<suppress files="[\\/]src[\\/]main[\\/]java[\\/]sample[\\/]" checks="ImportControl" />
|
||||||
|
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]sample[\\/]" checks="ImportControl" />
|
||||||
|
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="Javadoc*" />
|
||||||
|
<suppress files="[\\/]autoconfigure[\\/]" checks="JavadocType" />
|
||||||
|
<suppress files="[\\/]autoconfigure[\\/]" checks="JavadocVariable" />
|
||||||
|
<suppress files="[\\/]spring-boot-samples[\\/]" checks="JavadocType" />
|
||||||
|
<suppress files="[\\/]spring-boot-deployment-tests[\\/]" checks="JavadocType" />
|
||||||
|
<suppress files="[\\/]spring-boot-integration-tests[\\/]" checks="JavadocType" />
|
||||||
|
<suppress files="Ansi.*\.java" checks="JavadocVariable" />
|
||||||
|
<suppress files="Ansi.*\.java" checks="JavadocStyle" />
|
||||||
|
<suppress files="LogLevel\.java" checks="JavadocVariable" />
|
||||||
|
<suppress files="HelpMojo\.java" checks=".*"/>
|
||||||
|
|
||||||
|
<!-- https://github.com/checkstyle/checkstyle/issues/2141 -->
|
||||||
|
<suppress files="ConfigurationProperties.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="DeprecatedConfigurationProperty\.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="EnableConfigurationProperties\.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="EntityScan\.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="SpringApplication\.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="IntegrationTest\.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="SpringApplicationConfiguration\.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="WebIntegrationTest\.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="ServletComponentScan\.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="AutoConfigureAfter\.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="AutoConfigureBefore\.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="ConditionalOn.*\.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="AutoConfigureOrder.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="EnableAutoConfiguration.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="SpringBootApplication.java" checks="JavadocMethod" />
|
||||||
|
<suppress files="ImportAutoConfiguration.java" checks="JavadocMethod" />
|
||||||
|
</suppressions>
|
@ -0,0 +1,152 @@
|
|||||||
|
<?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="Checker">
|
||||||
|
|
||||||
|
<!-- Root Checks -->
|
||||||
|
<module name="RegexpHeader">
|
||||||
|
<property name="headerFile" value="${checkstyle.header.file}" />
|
||||||
|
<property name="fileExtensions" value="java" />
|
||||||
|
</module>
|
||||||
|
<module name="NewlineAtEndOfFile" />
|
||||||
|
|
||||||
|
<!-- TreeWalker Checks -->
|
||||||
|
<module name="TreeWalker">
|
||||||
|
|
||||||
|
<!-- Annotations -->
|
||||||
|
<module name="AnnotationUseStyle">
|
||||||
|
<property name="elementStyle" value="compact" />
|
||||||
|
</module>
|
||||||
|
<module name="MissingOverride" />
|
||||||
|
<module name="PackageAnnotation" />
|
||||||
|
<module name="AnnotationLocation">
|
||||||
|
<property name="allowSamelineSingleParameterlessAnnotation"
|
||||||
|
value="false" />
|
||||||
|
</module>
|
||||||
|
|
||||||
|
<!-- Block Checks -->
|
||||||
|
<module name="EmptyBlock">
|
||||||
|
<property name="option" value="text" />
|
||||||
|
</module>
|
||||||
|
<module name="LeftCurly" />
|
||||||
|
<module name="RightCurly">
|
||||||
|
<property name="option" value="alone" />
|
||||||
|
</module>
|
||||||
|
<module name="NeedBraces" />
|
||||||
|
<module name="AvoidNestedBlocks" />
|
||||||
|
|
||||||
|
<!-- Class Design -->
|
||||||
|
<module name="FinalClass" />
|
||||||
|
<module name="InterfaceIsType" />
|
||||||
|
<module name="HideUtilityClassConstructor" />
|
||||||
|
<module name="MutableException" />
|
||||||
|
<module name="InnerTypeLast" />
|
||||||
|
<module name="OneTopLevelClass" />
|
||||||
|
|
||||||
|
<!-- Coding -->
|
||||||
|
<module name="CovariantEquals" />
|
||||||
|
<module name="EmptyStatement" />
|
||||||
|
<module name="EqualsHashCode" />
|
||||||
|
<module name="InnerAssignment" />
|
||||||
|
<module name="SimplifyBooleanExpression" />
|
||||||
|
<module name="SimplifyBooleanReturn" />
|
||||||
|
<module name="StringLiteralEquality" />
|
||||||
|
<module name="NestedForDepth">
|
||||||
|
<property name="max" value="3" />
|
||||||
|
</module>
|
||||||
|
<module name="NestedIfDepth">
|
||||||
|
<property name="max" value="3" />
|
||||||
|
</module>
|
||||||
|
<module name="NestedTryDepth">
|
||||||
|
<property name="max" value="3" />
|
||||||
|
</module>
|
||||||
|
<module name="MultipleVariableDeclarations" />
|
||||||
|
<module name="RequireThis">
|
||||||
|
<property name="checkMethods" value="false" />
|
||||||
|
</module>
|
||||||
|
<module name="OneStatementPerLine" />
|
||||||
|
|
||||||
|
<!-- Imports -->
|
||||||
|
<module name="AvoidStarImport" />
|
||||||
|
<module name="AvoidStaticImport">
|
||||||
|
<property name="excludes"
|
||||||
|
value="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="IllegalImport" />
|
||||||
|
<module name="RedundantImport" />
|
||||||
|
<module name="UnusedImports">
|
||||||
|
<property name="processJavadoc" value="true" />
|
||||||
|
</module>
|
||||||
|
<module name="ImportOrder">
|
||||||
|
<property name="groups" value="java,/^javax?\./,org,com,*" />
|
||||||
|
<property name="ordered" value="true" />
|
||||||
|
<property name="separated" value="true" />
|
||||||
|
<property name="option" value="bottom" />
|
||||||
|
<property name="sortStaticImportsAlphabetically" value="true" />
|
||||||
|
</module>
|
||||||
|
<module name="ImportControl">
|
||||||
|
<property name="file" value="${checkstyle.build.directory}/checkstyle-import-control.xml"/>
|
||||||
|
</module>
|
||||||
|
|
||||||
|
<!-- Javadoc Comments -->
|
||||||
|
<module name="JavadocType">
|
||||||
|
<property name="scope" value="package"/>
|
||||||
|
<property name="authorFormat" value=".+\s.+"/>
|
||||||
|
</module>
|
||||||
|
<module name="JavadocMethod">
|
||||||
|
<property name="allowMissingJavadoc" value="true" />
|
||||||
|
</module>
|
||||||
|
<module name="JavadocVariable">
|
||||||
|
<property name="scope" value="public"/>
|
||||||
|
</module>
|
||||||
|
<module name="JavadocStyle">
|
||||||
|
<property name="checkEmptyJavadoc" value="true"/>
|
||||||
|
</module>
|
||||||
|
<module name="NonEmptyAtclauseDescription" />
|
||||||
|
<module name="JavadocTagContinuationIndentation">
|
||||||
|
<property name="offset" value="0"/>
|
||||||
|
</module>
|
||||||
|
<module name="AtclauseOrder">
|
||||||
|
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF"/>
|
||||||
|
<property name="tagOrder" value="@param, @author, @since, @see, @version, @serial, @deprecated"/>
|
||||||
|
</module>
|
||||||
|
<module name="AtclauseOrder">
|
||||||
|
<property name="target" value="METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||||
|
<property name="tagOrder" value="@param, @return, @throws, @since, @deprecated, @see"/>
|
||||||
|
</module>
|
||||||
|
|
||||||
|
<!-- Miscellaneous -->
|
||||||
|
<module name="CommentsIndentation" />
|
||||||
|
<module name="UpperEll" />
|
||||||
|
<module name="ArrayTypeStyle" />
|
||||||
|
<module name="OuterTypeFilename" />
|
||||||
|
|
||||||
|
<!-- Modifiers -->
|
||||||
|
<module name="RedundantModifier" />
|
||||||
|
|
||||||
|
<!-- Regexp -->
|
||||||
|
<module name="RegexpSinglelineJava">
|
||||||
|
<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="Regexp">
|
||||||
|
<property name="format" value="[ \t]+$" />
|
||||||
|
<property name="illegalPattern" value="true" />
|
||||||
|
<property name="message" value="Trailing whitespace" />
|
||||||
|
</module>
|
||||||
|
|
||||||
|
<!-- Whitespace -->
|
||||||
|
<module name="GenericWhitespace" />
|
||||||
|
<module name="MethodParamPad" />
|
||||||
|
<module name="NoWhitespaceAfter" >
|
||||||
|
<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS, ARRAY_DECLARATOR"/>
|
||||||
|
</module>
|
||||||
|
<module name="NoWhitespaceBefore" />
|
||||||
|
<module name="ParenPad" />
|
||||||
|
<module name="TypecastParenPad" />
|
||||||
|
<module name="WhitespaceAfter" />
|
||||||
|
<module name="WhitespaceAround" />
|
||||||
|
|
||||||
|
</module>
|
||||||
|
</module>
|
Loading…
Reference in New Issue