JAMES-2277 run checkstyle on compile and generate a report
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/72399a1d Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/72399a1d Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/72399a1d Branch: refs/heads/master Commit: 72399a1d362003c46535d92dce8b35a87cce32b3 Parents: 7aa039c Author: Matthieu Baechler <[email protected]> Authored: Wed Dec 27 13:25:51 2017 +0100 Committer: Raphael Ouazana <[email protected]> Committed: Wed Jan 10 10:45:41 2018 +0100 ---------------------------------------------------------------------- checkstyle-suppressions.xml | 25 +++++++++++++++++++++++++ checkstyle.xml | 2 +- pom.xml | 31 +++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/72399a1d/checkstyle-suppressions.xml ---------------------------------------------------------------------- diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml new file mode 100644 index 0000000..f5befb9 --- /dev/null +++ b/checkstyle-suppressions.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<!DOCTYPE suppressions PUBLIC + "-//Puppy Crawl//DTD Suppressions 1.1//EN" + "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> +<suppressions> + <suppress files="[/\\]target[/\\]" checks=".*"/> +</suppressions> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/james-project/blob/72399a1d/checkstyle.xml ---------------------------------------------------------------------- diff --git a/checkstyle.xml b/checkstyle.xml index a8d2828..6c7b394 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -27,7 +27,7 @@ Description: none --> <module name="Checker"> - <property name="severity" value="warning"/> + <property name="severity" value="error"/> <property name="charset" value="UTF-8"/> <property name="fileExtensions" value="java, properties, xml"/> <module name="TreeWalker"> http://git-wip-us.apache.org/repos/asf/james-project/blob/72399a1d/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 2676c2e..22e35e1 100644 --- a/pom.xml +++ b/pom.xml @@ -2339,6 +2339,11 @@ </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>2.17</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> <version>3.0.0</version> </plugin> @@ -2859,6 +2864,32 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <configuration> + <configLocation>checkstyle.xml</configLocation> + <failOnViolation>true</failOnViolation> + <logViolationsToConsole>true</logViolationsToConsole> + <includeTestResources>true</includeTestResources> + <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation> + </configuration> + <dependencies> + <dependency> + <groupId>com.puppycrawl.tools</groupId> + <artifactId>checkstyle</artifactId> + <version>8.5</version> + </dependency> + </dependencies> + <executions> + <execution> + <goals> + <goal>check</goal> + </goals> + <phase>compile</phase> + </execution> + </executions> + </plugin> </plugins> <extensions> <extension> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
