[FLINK-6729] Add checkstyle plugin to flink-runtime pom This closes #4032.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/16115f96 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/16115f96 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/16115f96 Branch: refs/heads/master Commit: 16115f96353557fa445f8ec8580501954c0e5a64 Parents: 417b4f6 Author: zentol <[email protected]> Authored: Wed May 31 15:37:15 2017 +0200 Committer: zentol <[email protected]> Committed: Thu Jun 1 11:15:47 2017 +0200 ---------------------------------------------------------------------- flink-runtime/pom.xml | 88 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/16115f96/flink-runtime/pom.xml ---------------------------------------------------------------------- diff --git a/flink-runtime/pom.xml b/flink-runtime/pom.xml index a13a985..b7def4d 100644 --- a/flink-runtime/pom.xml +++ b/flink-runtime/pom.xml @@ -401,6 +401,94 @@ under the License. </execution> </executions> </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>2.17</version> + <dependencies> + <dependency> + <groupId>com.puppycrawl.tools</groupId> + <artifactId>checkstyle</artifactId> + <version>6.19</version> + </dependency> + </dependencies> + <configuration> + <configLocation>/tools/maven/strict-checkstyle.xml</configLocation> + <suppressionsLocation>/tools/maven/suppressions.xml</suppressionsLocation> + <includeTestSourceDirectory>true</includeTestSourceDirectory> + <logViolationsToConsole>true</logViolationsToConsole> + <failOnViolation>true</failOnViolation> + <excludes> + **/migration/api/**, + **/migration/runtime/**, + **/migration/state/**, + **/migration/streaming/**, + **/migration/*, + **/runtime/accumulators/**, + **/runtime/akka/**, + **/runtime/blob/**, + **/runtime/broadcast/**, + **/runtime/checkpoint/**, + **/runtime/client/**, + **/runtime/clusterframework/**, + **/runtime/concurrent/**, + **/runtime/deployment/**, + **/runtime/event/**, + **/runtime/execution/**, + **/runtime/executiongraph/**, + **/runtime/filecache/**, + **/runtime/fs/**, + **/runtime/heartbeat/**, + **/runtime/highavailability/**, + **/runtime/history/**, + **/runtime/instance/**, + **/runtime/io/**, + **/runtime/iterative/**, + **/runtime/jobgraph/**, + **/runtime/jobmanager/**, + **/runtime/jobmaster/**, + **/runtime/leaderelection/**, + **/runtime/leaderretrieval/**, + **/runtime/memory/**, + **/runtime/messages/**, + **/runtime/metrics/**, + **/runtime/minicluster/**, + **/runtime/net/**, + **/runtime/operators/**, + **/runtime/plugable/**, + **/runtime/process/**, + **/runtime/query/**, + **/runtime/registration/**, + **/runtime/resourcemanager/**, + **/runtime/rpc/**, + **/runtime/security/**, + **/runtime/state/**, + **/runtime/taskexecutor/**, + **/runtime/taskmanager/**, + **/runtime/testutils/**, + **/runtime/util/**, + **/runtime/webmonitor/**, + **/runtime/zookeeper/**, + **/runtime/* + </excludes> + </configuration> + <executions> + <!-- + Execute checkstyle after compilation but before tests. + + This ensures that any parsing or type checking errors are from + javac, so they look as expected. Beyond that, we want to + fail as early as possible. + --> + <execution> + <phase>test-compile</phase> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </build> </project>
