Skip to content

Commit

Permalink
Merge pull request #86 from Pi4J/style_cleanup
Browse files Browse the repository at this point in the history
add checkstyle phase in CI, Fixed the errors
  • Loading branch information
taartspi authored Nov 28, 2024
2 parents 9a5909c + 40ca4be commit c58c922
Show file tree
Hide file tree
Showing 121 changed files with 4,619 additions and 5,030 deletions.
29 changes: 29 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">

<module name="Checker">
<module name="TreeWalker">
<module name="UnusedImports"/>
<module name="RedundantImport"/>
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->

<!-- Ignore missing field/variable comments -->
<module name="JavadocVariable">
<property name="severity" value="ignore"/>
</module>

<!-- Ignore missing method comments -->
<module name="JavadocMethod">
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
</module>

<!-- Ignore enum constant documentation -->
<module name="JavadocType">
<property name="tokens" value="INTERFACE_DEF, CLASS_DEF, ANNOTATION_DEF"/>
<!-- This excludes ENUM_DEF -->
</module>
</module>
</module>
22 changes: 22 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<maven-bundle-plugin.version>5.1.9</maven-bundle-plugin.version>
<maven-javadoc-plugin.version>3.3.2</maven-javadoc-plugin.version>
<maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
<maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>


<!-- DEPENDENCIES VERSIONS 2.0.3 -SNAPSHOT -->
Expand Down Expand Up @@ -421,6 +422,27 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<executions>
<execution>
<id>checkstyle-check</id>
<goals>
<goal>check</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
<configuration>
<failsOnError>true</failsOnError>
<configLocation>config/checkstyle/checkstyle.xml</configLocation>
<excludes>**/module-info.java</excludes>
<outputFileFormat>plain</outputFileFormat>
<consoleOutput>true</consoleOutput>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit c58c922

Please sign in to comment.