Skip to content

Commit c603d54

Browse files
committed
add checkstyle to the project
1 parent e021a0e commit c603d54

File tree

14 files changed

+547
-19
lines changed

14 files changed

+547
-19
lines changed

checkstyle.xml

Lines changed: 427 additions & 0 deletions
Large diffs are not rendered by default.

license-header

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Amazon.com, Inc. or its affiliates.
2+
* Copyright 2023 Amazon.com, Inc. or its affiliates.
33
* Licensed under the Apache License, Version 2.0 (the
44
* "License"); you may not use this file except in compliance
55
* with the License. You may obtain a copy of the License at

pom.xml

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -346,31 +346,56 @@
346346
<version>${maven-gpg-plugin.version}</version>
347347
</plugin>
348348
<plugin>
349-
<groupId>com.diffplug.spotless</groupId>
350-
<artifactId>spotless-maven-plugin</artifactId>
351-
<version>2.30.0</version>
349+
<groupId>org.apache.maven.plugins</groupId>
350+
<artifactId>maven-checkstyle-plugin</artifactId>
351+
<version>3.3.0</version>
352+
<configuration>
353+
<configLocation>checkstyle.xml</configLocation>
354+
<encoding>UTF-8</encoding>
355+
<consoleOutput>true</consoleOutput>
356+
<failsOnError>true</failsOnError>
357+
<linkXRef>false</linkXRef>
358+
</configuration>
359+
<dependencies>
360+
<dependency>
361+
<groupId>com.puppycrawl.tools</groupId>
362+
<artifactId>checkstyle</artifactId>
363+
<version>10.9.1</version>
364+
</dependency>
365+
</dependencies>
352366
<executions>
353367
<execution>
354368
<goals>
355369
<goal>check</goal>
356370
</goals>
357371
</execution>
358372
</executions>
359-
<configuration>
360-
<java>
361-
<googleJavaFormat>
362-
<version>1.7</version>
363-
<style>AOSP</style>
364-
<reflowLongStrings>false</reflowLongStrings>
365-
</googleJavaFormat>
366-
<removeUnusedImports />
367-
<licenseHeader>
368-
<file>../license-header</file>
369-
</licenseHeader>
370-
</java>
371-
</configuration>
372373
</plugin>
373374
<!-- <plugin>-->
375+
<!-- <groupId>com.diffplug.spotless</groupId>-->
376+
<!-- <artifactId>spotless-maven-plugin</artifactId>-->
377+
<!-- <version>2.30.0</version>-->
378+
<!-- <executions>-->
379+
<!-- <execution>-->
380+
<!-- <goals>-->
381+
<!-- <goal>check</goal>-->
382+
<!-- </goals>-->
383+
<!-- </execution>-->
384+
<!-- </executions>-->
385+
<!-- <configuration>-->
386+
<!-- <java>-->
387+
<!-- <googleJavaFormat>-->
388+
<!-- <version>1.7</version>-->
389+
<!-- <style>AOSP</style>-->
390+
<!-- </googleJavaFormat>-->
391+
<!-- <removeUnusedImports />-->
392+
<!-- <licenseHeader>-->
393+
<!-- <file>../license-header</file>-->
394+
<!-- </licenseHeader>-->
395+
<!-- </java>-->
396+
<!-- </configuration>-->
397+
<!-- </plugin>-->
398+
<!-- <plugin>-->
374399
<!-- <groupId>com.spotify.fmt</groupId>-->
375400
<!-- <artifactId>fmt-maven-plugin</artifactId>-->
376401
<!-- <version>2.20</version>-->

powertools-cloudformation/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,12 @@
100100
</dependency>
101101
</dependencies>
102102

103+
<build>
104+
<plugins>
105+
<plugin>
106+
<groupId>org.apache.maven.plugins</groupId>
107+
<artifactId>maven-checkstyle-plugin</artifactId>
108+
</plugin>
109+
</plugins>
110+
</build>
103111
</project>

powertools-core/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,13 @@
8989
</dependency>
9090
</dependencies>
9191

92+
<build>
93+
<plugins>
94+
<plugin>
95+
<groupId>org.apache.maven.plugins</groupId>
96+
<artifactId>maven-checkstyle-plugin</artifactId>
97+
</plugin>
98+
</plugins>
99+
</build>
100+
92101
</project>

powertools-e2e-tests/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@
133133

134134
<build>
135135
<plugins>
136+
<plugin>
137+
<groupId>org.apache.maven.plugins</groupId>
138+
<artifactId>maven-checkstyle-plugin</artifactId>
139+
</plugin>
136140
<plugin>
137141
<groupId>org.apache.maven.plugins</groupId>
138142
<artifactId>maven-compiler-plugin</artifactId>

powertools-idempotency/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@
181181
</configuration>
182182
</plugin>
183183
<plugin>
184-
<groupId>com.diffplug.spotless</groupId>
185-
<artifactId>spotless-maven-plugin</artifactId>
184+
<groupId>org.apache.maven.plugins</groupId>
185+
<artifactId>maven-checkstyle-plugin</artifactId>
186186
</plugin>
187187
</plugins>
188188
</build>

powertools-logging/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,12 @@
127127
</dependency>
128128
</dependencies>
129129

130+
<build>
131+
<plugins>
132+
<plugin>
133+
<groupId>org.apache.maven.plugins</groupId>
134+
<artifactId>maven-checkstyle-plugin</artifactId>
135+
</plugin>
136+
</plugins>
137+
</build>
130138
</project>

powertools-metrics/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,12 @@
112112
</dependency>
113113
</dependencies>
114114

115+
<build>
116+
<plugins>
117+
<plugin>
118+
<groupId>org.apache.maven.plugins</groupId>
119+
<artifactId>maven-checkstyle-plugin</artifactId>
120+
</plugin>
121+
</plugins>
122+
</build>
115123
</project>

powertools-parameters/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,12 @@
133133
</dependency>
134134
</dependencies>
135135

136+
<build>
137+
<plugins>
138+
<plugin>
139+
<groupId>org.apache.maven.plugins</groupId>
140+
<artifactId>maven-checkstyle-plugin</artifactId>
141+
</plugin>
142+
</plugins>
143+
</build>
136144
</project>

powertools-serialization/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@
8282
<skip>true</skip>
8383
</configuration>
8484
</plugin>
85+
<plugin>
86+
<groupId>org.apache.maven.plugins</groupId>
87+
<artifactId>maven-checkstyle-plugin</artifactId>
88+
</plugin>
8589
</plugins>
8690
</build>
8791

powertools-sqs/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,13 @@
117117
</dependency>
118118
</dependencies>
119119

120+
<build>
121+
<plugins>
122+
<plugin>
123+
<groupId>org.apache.maven.plugins</groupId>
124+
<artifactId>maven-checkstyle-plugin</artifactId>
125+
</plugin>
126+
</plugins>
127+
</build>
128+
120129
</project>

powertools-tracing/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,13 @@
113113
</dependency>
114114
</dependencies>
115115

116+
<build>
117+
<plugins>
118+
<plugin>
119+
<groupId>org.apache.maven.plugins</groupId>
120+
<artifactId>maven-checkstyle-plugin</artifactId>
121+
</plugin>
122+
</plugins>
123+
</build>
124+
116125
</project>

powertools-validation/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,13 @@
119119
</dependency>
120120
</dependencies>
121121

122+
<build>
123+
<plugins>
124+
<plugin>
125+
<groupId>org.apache.maven.plugins</groupId>
126+
<artifactId>maven-checkstyle-plugin</artifactId>
127+
</plugin>
128+
</plugins>
129+
</build>
130+
122131
</project>

0 commit comments

Comments
 (0)