You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2019/11/15 10:22:22 UTC
[camel] 01/03: CAMEL-14180: Upgrade Checkstyle
This is an automated email from the ASF dual-hosted git repository.
zregvart pushed a commit to branch CAMEL-14180
in repository https://gitbox.apache.org/repos/asf/camel.git
commit c06ba2d7ebc4cd678879db8ce577a50100aff54f
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Fri Nov 15 11:19:26 2019 +0100
CAMEL-14180: Upgrade Checkstyle
Upgrades Checkstyle to 8.26 and Checkstyle Maven plugin to 3.1.0.
---
.../resources/camel-checkstyle-suppressions.xml | 28 +++++++++++++++++--
.../src/main/resources/camel-checkstyle.xml | 31 +++++++++++-----------
parent/pom.xml | 4 +--
platforms/spring-boot/spring-boot-dm/pom.xml | 4 +--
4 files changed, 46 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..1549cee 100644
--- a/buildingtools/src/main/resources/camel-checkstyle-suppressions.xml
+++ b/buildingtools/src/main/resources/camel-checkstyle-suppressions.xml
@@ -24,13 +24,37 @@
<suppress checks=".*"
files=".+[\\\/]generated[\\\/].+\.java"
/>
+ <suppress-xpath checks=".*"
+ query="/CLASS_DEF/MODIFIERS/ANNOTATION/IDENT[@text='Generated']"
+ />
<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 6bbc2a4..e6150c8 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>