Browse Source
Introduce checkstyle rules from spring-javaformat, but keep them disabled so that fixes can be introduced one commit at a time. Issue gh-8945pull/8983/head
5 changed files with 69 additions and 84 deletions
@ -0,0 +1,47 @@ |
|||||||
|
<?xml version="1.0"?> |
||||||
|
<!DOCTYPE suppressions PUBLIC |
||||||
|
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" |
||||||
|
"https://checkstyle.org/dtds/suppressions_1_2.dtd"> |
||||||
|
<suppressions> |
||||||
|
<suppress files=".*" checks="AnnotationUseStyle" /> |
||||||
|
<suppress files=".*" checks="ArrayTypeStyle" /> |
||||||
|
<suppress files=".*" checks="AtclauseOrder" /> |
||||||
|
<suppress files=".*" checks="AvoidStarImport" /> |
||||||
|
<suppress files=".*" checks="EmptyBlock" /> |
||||||
|
<suppress files=".*" checks="FinalClass" /> |
||||||
|
<suppress files=".*" checks="InnerAssignment" /> |
||||||
|
<suppress files=".*" checks="InnerTypeLast" /> |
||||||
|
<suppress files=".*" checks="InterfaceIsType" /> |
||||||
|
<suppress files=".*" checks="JavadocMethod" /> |
||||||
|
<suppress files=".*" checks="JavadocStyle" /> |
||||||
|
<suppress files=".*" checks="JavadocTagContinuationIndentation" /> |
||||||
|
<suppress files=".*" checks="JavadocType" /> |
||||||
|
<suppress files=".*" checks="JavadocVariable" /> |
||||||
|
<suppress files=".*" checks="ModifierOrder" /> |
||||||
|
<suppress files=".*" checks="MultipleVariableDeclarations" /> |
||||||
|
<suppress files=".*" checks="MutableException" /> |
||||||
|
<suppress files=".*" checks="NeedBraces" /> |
||||||
|
<suppress files=".*" checks="NestedIfDepth" /> |
||||||
|
<suppress files=".*" checks="NewlineAtEndOfFile" /> |
||||||
|
<suppress files=".*" checks="NonEmptyAtclauseDescription" /> |
||||||
|
<suppress files=".*" checks="NoWhitespaceBefore" /> |
||||||
|
<suppress files=".*" checks="OneTopLevelClass" /> |
||||||
|
<suppress files=".*" checks="ParenPad" /> |
||||||
|
<suppress files=".*" checks="RedundantImport" /> |
||||||
|
<suppress files=".*" checks="RegexpSinglelineJava" /> |
||||||
|
<suppress files=".*" checks="RequireThis" /> |
||||||
|
<suppress files=".*" checks="SimplifyBooleanExpression" /> |
||||||
|
<suppress files=".*" checks="SimplifyBooleanReturn" /> |
||||||
|
<suppress files=".*" checks="SpringAvoidStaticImport" /> |
||||||
|
<suppress files=".*" checks="SpringCatch" /> |
||||||
|
<suppress files=".*" checks="SpringHeader" /> |
||||||
|
<suppress files=".*" checks="SpringHideUtilityClassConstructor" /> |
||||||
|
<suppress files=".*" checks="SpringImportOrder" /> |
||||||
|
<suppress files=".*" checks="SpringJavadoc" /> |
||||||
|
<suppress files=".*" checks="SpringLambda" /> |
||||||
|
<suppress files=".*" checks="SpringMethodOrder" /> |
||||||
|
<suppress files=".*" checks="SpringMethodVisibility" /> |
||||||
|
<suppress files=".*" checks="SpringTernary" /> |
||||||
|
<suppress files=".*" checks="WhitespaceAfter" /> |
||||||
|
<suppress files=".*" checks="WhitespaceAround" /> |
||||||
|
</suppressions> |
||||||
@ -1,51 +1,11 @@ |
|||||||
<?xml version="1.0"?> |
<?xml version="1.0"?> |
||||||
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" |
<!DOCTYPE module PUBLIC |
||||||
"https://www.puppycrawl.com/dtds/configuration_1_3.dtd"> |
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" |
||||||
<module name="Checker"> |
"https://checkstyle.org/dtds/configuration_1_3.dtd"> |
||||||
<!-- Suppressions --> |
<module name="com.puppycrawl.tools.checkstyle.Checker"> |
||||||
<module name="SuppressionFilter"> |
<module name="SuppressionFilter"> |
||||||
<property name="file" value="${config_loc}/suppressions.xml"/> |
<property name="file" |
||||||
|
value="${config_loc}/checkstyle-suppressions.xml" /> |
||||||
</module> |
</module> |
||||||
|
<module name="io.spring.javaformat.checkstyle.SpringChecks" /> |
||||||
<!-- Root Checks --> |
</module> |
||||||
<module name="RegexpHeader"> |
|
||||||
<property name="headerFile" value="${config_loc}/header.txt"/> |
|
||||||
<property name="fileExtensions" value="java"/> |
|
||||||
</module> |
|
||||||
|
|
||||||
<!-- Root Checks --> |
|
||||||
<module name="TreeWalker"> |
|
||||||
<!-- Annotations --> |
|
||||||
<module name="MissingOverrideCheck" /> |
|
||||||
|
|
||||||
<!-- Coding --> |
|
||||||
<module name="EmptyStatementCheck" /> |
|
||||||
<module name="RedundantModifier" /> |
|
||||||
|
|
||||||
<!-- Imports --> |
|
||||||
<module name="UnusedImportsCheck"> |
|
||||||
<property name="processJavadoc" value="true" /> |
|
||||||
</module> |
|
||||||
|
|
||||||
<!-- 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="RegexpSinglelineJava"> |
|
||||||
<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="Regexp"> |
|
||||||
<property name="format" value="[ \t]+$"/> |
|
||||||
<property name="illegalPattern" value="true"/> |
|
||||||
<property name="message" value="Trailing whitespace"/> |
|
||||||
</module> |
|
||||||
|
|
||||||
<!-- Whitespace --> |
|
||||||
<module name="WhitespaceAfterCheck" /> |
|
||||||
</module> |
|
||||||
</module> |
|
||||||
@ -1,16 +0,0 @@ |
|||||||
^\Q/*\E$ |
|
||||||
^\Q * Copyright\E (\d{4}(\-\d{4})? the original author or authors\.|(\d{4}, )*(\d{4}) Acegi Technology Pty Limited)$ |
|
||||||
^\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 * https://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$ |
|
||||||
^.*$ |
|
||||||
@ -1,19 +0,0 @@ |
|||||||
<?xml version="1.0"?> |
|
||||||
<!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" |
|
||||||
"https://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> |
|
||||||
<suppressions> |
|
||||||
<suppress files=".+Application\.java" checks="HideUtilityClassConstructor"/> |
|
||||||
<suppress files=".+Configuration\.java" checks="HideUtilityClassConstructor"/> |
|
||||||
<suppress files="[\\/]BCrypt(Tests)?\.java" checks="RegexpHeader"/> |
|
||||||
|
|
||||||
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="Javadoc"/> |
|
||||||
<suppress files="[\\/]src[\\/]integration-test[\\/]java[\\/]" checks="Javadoc"/> |
|
||||||
|
|
||||||
<suppress files="[\\/]docs[\\/]" checks="Javadoc"/> |
|
||||||
<suppress files="[\\/]docs[\\/]" checks="CommentsIndentation"/> |
|
||||||
<suppress files="[\\/]docs[\\/]" checks="InnerTypeLast"/> |
|
||||||
|
|
||||||
<suppress files="[\\/]samples[\\/]" checks="Javadoc"/> |
|
||||||
<suppress files="[\\/]samples[\\/]" checks="CommentsIndentation"/> |
|
||||||
<suppress files="[\\/]samples[\\/]" checks="InnerTypeLast"/> |
|
||||||
</suppressions> |
|
||||||
Loading…
Reference in new issue