Skip to content

Commit

Permalink
Issue checkstyle#41: added non-main files checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
rnveach committed Nov 14, 2017
1 parent 9ef13d8 commit 111a790
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/checkstyle_non_main_files_suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">

<suppressions>
</suppressions>
72 changes: 72 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,78 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven.plugin.checkstyle.version}</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>check_non_main</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<includeResources>true</includeResources>
<includeTestResources>true</includeTestResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<configLocation>
https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-${checkstyle.version}/config/checkstyle_non_main_files_checks.xml
</configLocation>
<propertyExpansion>project.basedir=${project.basedir}</propertyExpansion>
<sourceDirectory>${project.basedir}</sourceDirectory>
<failOnViolation>true</failOnViolation>
<logViolationsToConsole>true</logViolationsToConsole>
<maxAllowedViolations>0</maxAllowedViolations>
<violationSeverity>error</violationSeverity>
<outputFileFormat>xml</outputFileFormat>
<outputFile>
${project.build.directory}/cs_non_main_files_errors.xml
</outputFile>
<excludes>
.git/**/*,
<!-- Eclipse project files -->
.settings/**/*,
.externalToolBuilders/**/*,
.classpath,
.project,
<!-- m2e-code-quality Eclipse IDE plugin temporary configuration files for Eclipse CS Checkstyle / PMD / FindBugs Plug-Ins -->
.checkstyle/**/*,
.pmd/**/*,
.pmdruleset.xml,
.fbExcludeFilterFile/**/*,
<!-- NetBeans project files -->
**/nbactions.xml,
**/nb-configuration.xml,
<!-- Maven build folder -->
target/**/*,
bin/**/*,
<!-- IDEA project files -->
*.iml,
*.ipr,
*.iws,
.idea/**/*,
<!-- Temp files -->
*~,
<!-- Java Virtual machine crash logs -->
hs_err_pid*,
replay_pid*,
<!-- Apple MAC OSX hidden file -->
.DS_Store,
<!-- NonDex files -->
.nondex/**/*
</excludes>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
Expand Down

0 comments on commit 111a790

Please sign in to comment.