This is an automated email from the ASF dual-hosted git repository. zregvart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 6613b263076ec88eaab2481b2ad2729530ce3bf8 Author: Zoran Regvart <zregv...@apache.org> AuthorDate: Fri Nov 15 12:53:06 2019 +0100 CAMEL-14180: Upgrade Checkstyle Upgrades Checkstyle to 8.26 and Checkstyle Maven plugin to 3.1.0. --- .../resources/camel-checkstyle-suppressions.xml | 31 ++++++++++++++++++++-- .../src/main/resources/camel-checkstyle.xml | 31 +++++++++++----------- parent/pom.xml | 4 +-- platforms/spring-boot/spring-boot-dm/pom.xml | 4 +-- 4 files changed, 49 insertions(+), 21 deletions(-) diff --git a/buildingtools/src/main/resources/camel-checkstyle-suppressions.xml b/buildingtools/src/main/resources/camel-checkstyle-suppressions.xml index 2ed9cfc..c8d7d69 100644 --- a/buildingtools/src/main/resources/camel-checkstyle-suppressions.xml +++ b/buildingtools/src/main/resources/camel-checkstyle-suppressions.xml @@ -25,12 +25,39 @@ files=".+[\\\/]generated[\\\/].+\.java" /> <suppress checks=".*" + files=".*/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/.*" + /> + <suppress checks=".*" + files=".*/platforms/spring-boot/components-starter/camel-.+-starter/src/main/java/org/apache/camel/.*" + /> + <suppress checks=".*" files=".+[\\\/]build[\\\/]src[\\\/].+\.java" /> <suppress checks=".*" files=".+[\\\/]target[\\\/].+\.java" - /> + /> <suppress checks=".*" files=".+[\\\/]contrib[\\\/].+\.java" /> -</suppressions> \ No newline at end of file + <suppress checks="LineLength" + files=".*/features.xml" + /> + <suppress checks="LineLength" + files=".*/main/resources/.*camel-context.xml" + /> + <suppress checks="LineLength" + files=".*/test/resources/.*.xml" + /> + <suppress checks="LineLength" + files=".*/test/resources/.*.properties" + /> + <suppress checks="LineLength" + files=".*/resources/application.properties" + /> + <suppress checks="LineLength" + files=".*/resources/example.properties" + /> + <suppress checks="LineLength" + files=".*/resources/.*request.xml" + /> +</suppressions> diff --git a/buildingtools/src/main/resources/camel-checkstyle.xml b/buildingtools/src/main/resources/camel-checkstyle.xml index a546824..ed1361a 100644 --- a/buildingtools/src/main/resources/camel-checkstyle.xml +++ b/buildingtools/src/main/resources/camel-checkstyle.xml @@ -91,10 +91,11 @@ lengths, if/try depths, etc... </module> --> - <module name="TreeWalker"> - <!-- Enable FileContentsHolder to allow us to in turn turn on suppression comments --> - <module name="FileContentsHolder" /> + <module name="LineLength"> + <property name="max" value="250"/> + </module> + <module name="TreeWalker"> <!-- Checks for Javadoc comments. --> <!-- See http://checkstyle.sf.net/config_javadoc.html --> <!-- @@ -138,6 +139,9 @@ lengths, if/try depths, etc... <module name="ImportOrder"> <property name="groups" value="java,javax,org.w3c,org.xml,junit"/> <property name="ordered" value="true"/> + <property name="option" value="bottom"/> + <property name="separated" value="true"/> + <property name="separatedStaticGroups" value="true"/> </module> <!-- <module name="ImportControl"> @@ -153,9 +157,6 @@ lengths, if/try depths, etc... <module name="ExecutableStatementCount"> <property name="max" value="180"/> </module> - <module name="LineLength"> - <property name="max" value="250"/> - </module> <module name="MethodLength"> <property name="max" value="250"/> <property name="countEmpty" value="false"/> @@ -366,14 +367,14 @@ lengths, if/try depths, etc... <property name="caseIndent" value="0"/> </module> <!--<module name="RequiredRegexp">--> - </module> - <module name="SuppressionCommentFilter"> - <property name="offCommentFormat" value="CHECKSTYLE\:OFF"/> - <property name="onCommentFormat" value="CHECKSTYLE\:ON"/> - </module> - <module name="SuppressionCommentFilter"> - <property name="offCommentFormat" value="CHECKSTYLE.OFF\:([\w\|]+)"/> - <property name="onCommentFormat" value="CHECKSTYLE.ON\:([\w\|]+)"/> - <property name="checkFormat" value="$1"/> + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="CHECKSTYLE\:OFF"/> + <property name="onCommentFormat" value="CHECKSTYLE\:ON"/> + </module> + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="CHECKSTYLE.OFF\:([\w\|]+)"/> + <property name="onCommentFormat" value="CHECKSTYLE.ON\:([\w\|]+)"/> + <property name="checkFormat" value="$1"/> + </module> </module> </module> diff --git a/parent/pom.xml b/parent/pom.xml index 6e2040d..ac85ad9 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -434,8 +434,8 @@ <maven-archetype-packaging-version>2.3</maven-archetype-packaging-version> <maven-assembly-plugin-version>3.0.0</maven-assembly-plugin-version> <maven-bundle-plugin-version>4.2.1</maven-bundle-plugin-version> - <maven-checkstyle-plugin-version>3.0.0</maven-checkstyle-plugin-version> - <maven-checkstyle-version>7.6.1</maven-checkstyle-version> + <maven-checkstyle-plugin-version>3.1.0</maven-checkstyle-plugin-version> + <maven-checkstyle-version>8.26</maven-checkstyle-version> <maven-owasp-plugin-version>5.2.4</maven-owasp-plugin-version> <maven-jar-plugin-version>3.1.2</maven-jar-plugin-version> <maven-javadoc-plugin-version>3.0.1</maven-javadoc-plugin-version> diff --git a/platforms/spring-boot/spring-boot-dm/pom.xml b/platforms/spring-boot/spring-boot-dm/pom.xml index 6a3a813..6dfaa6b 100644 --- a/platforms/spring-boot/spring-boot-dm/pom.xml +++ b/platforms/spring-boot/spring-boot-dm/pom.xml @@ -63,8 +63,8 @@ <grpc-guava-version>26.0-android</grpc-guava-version> <!-- Plugin versions --> - <maven-checkstyle-plugin-version>3.0.0</maven-checkstyle-plugin-version> - <maven-checkstyle-version>7.6.1</maven-checkstyle-version> + <maven-checkstyle-plugin-version>3.1.0</maven-checkstyle-plugin-version> + <maven-checkstyle-version>8.26</maven-checkstyle-version> <camel.osgi.manifest></camel.osgi.manifest> </properties>