Skip to content

Commit ee2c9b4

Browse files
committed
Add checkstyle with unused imports check
1 parent c3e8486 commit ee2c9b4

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

pom.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,36 @@
420420
</plugins>
421421
</build>
422422
</profile>
423+
<profile>
424+
<id>docker-java-analyses</id>
425+
<build>
426+
<plugins>
427+
<plugin>
428+
<artifactId>maven-checkstyle-plugin</artifactId>
429+
<version>2.17</version>
430+
<executions>
431+
<execution>
432+
<id>checkstyle</id>
433+
<phase>validate</phase>
434+
<goals>
435+
<goal>check</goal>
436+
</goals>
437+
</execution>
438+
</executions>
439+
<configuration>
440+
<encoding>UTF-8</encoding>
441+
<failOnViolation>true</failOnViolation>
442+
<logViolationsToConsole>true</logViolationsToConsole>
443+
<linkXRef>false</linkXRef>
444+
<!-- if some IDE has integration and requires other place, propose it -->
445+
<configLocation>
446+
src/test/resources/checkstyle/checkstyle-config.xml
447+
</configLocation>
448+
</configuration>
449+
</plugin>
450+
</plugins>
451+
</build>
452+
</profile>
423453
</profiles>
424454

425455
</project>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4+
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
5+
6+
<module name="Checker">
7+
<!--
8+
If you set the basedir property below, then all reported file
9+
names will be relative to the specified directory. See
10+
http://checkstyle.sourceforge.net/5.x/config.html#Checker
11+
12+
<property name="basedir" value="${basedir}"/>
13+
-->
14+
15+
<module name="TreeWalker">
16+
<module name="UnusedImports">
17+
<property name="processJavadoc" value="true"/>
18+
</module>
19+
</module>
20+
21+
</module>

0 commit comments

Comments
 (0)