Enable checkstyle enforcement for the project 10/44110/3
authorRitu Sood <ritu.sood@intel.com>
Tue, 16 Aug 2016 03:50:16 +0000 (20:50 -0700)
committerIsaku Yamahata <isaku.yamahata@gmail.com>
Thu, 18 Aug 2016 16:02:00 +0000 (16:02 +0000)
This patch enables checkstyle enforcements.
Also some checkstyle issues are not yet addressed
and those are added to the suppress file for now.
As some of those issues are addressed those will
be removed for the suppress file. The checkstyle
issues suppressed show as warnings during
compile.

Change-Id: I1c64aa426de7d29002e66c50367bbe84f23d885c
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
integration/test/pom.xml
parent/checkstyle-suppressions.xml [new file with mode: 0644]
parent/pom.xml
transcriber/pom.xml

index 0d98360d57595984e33f1ccd24c41b5380a80ede..39b39956ab84a53f2557297d6b22f33ee44e05cb 100644 (file)
   <build>
     <pluginManagement>
       <plugins>
+         <plugin>
+          <artifactId>maven-checkstyle-plugin</artifactId>
+          <configuration>
+            <suppressionsLocation>../../parent/checkstyle-suppressions.xml</suppressionsLocation>
+            <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
+            <excludes>org/opendaylight/yang/gen/**,**/yang/**</excludes>
+            <consoleOutput>true</consoleOutput>
+             <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+          </configuration>
+          <executions>
+            <execution>
+              <goals>
+                <goal>check</goal>
+              </goals>
+              <phase>process-sources</phase>
+            </execution>
+          </executions>
+        </plugin>
         <plugin>
           <groupId>org.jacoco</groupId>
           <artifactId>jacoco-maven-plugin</artifactId>
diff --git a/parent/checkstyle-suppressions.xml b/parent/checkstyle-suppressions.xml
new file mode 100644 (file)
index 0000000..97c1ffe
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE suppressions PUBLIC
+     "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+     "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+
+<suppressions>
+  <suppress checks="JavadocStyleCheck"
+            files="."
+             />
+  <suppress checks="SummaryJavadoc"
+            files="."
+             />
+  <suppress checks="JavadocParagraph"
+            files="."
+             />
+  <suppress checks="JavadocTagContinuationIndentation"
+            files="."
+             />
+  <suppress checks="AbbreviationAsWordInName"
+            files="."
+             />
+  <suppress checks="ParameterName"
+            files="."
+             />
+  <suppress checks="LocalVariableName"
+            files="."
+             />
+  <suppress checks="ConstantName"
+            files="."
+             />
+  <suppress checks="TypeName"
+            files="."
+             />
+  <suppress checks="IllegalCatch"
+            files="."
+             />
+  <suppress checks="RegexpSinglelineJava"
+            files="."
+             />
+</suppressions>
+
index 77d28287441d993fcfa8bf2ac9dc4baf24f600bc..d73accafe851cf171aa4222500abff7229a33ef6 100644 (file)
@@ -73,6 +73,9 @@
           <configuration>
             <excludes>org/opendaylight/yang/gen/**,**/yang/**</excludes>
             <consoleOutput>true</consoleOutput>
+            <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
+            <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
+            <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
           </configuration>
           <executions>
             <execution>
index a2f1931633fb044697d8653f8a37c5798577b8aa..4c112f35e2627e8d52a1942f08a8c19011cacb40 100644 (file)
   </properties>
   <build>
     <plugins>
+      <plugin>
+          <artifactId>maven-checkstyle-plugin</artifactId>
+          <configuration>
+            <suppressionsLocation>../parent/checkstyle-suppressions.xml</suppressionsLocation>
+            <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
+            <excludes>org/opendaylight/yang/gen/**,**/yang/**</excludes>
+            <consoleOutput>true</consoleOutput>
+             <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+          </configuration>
+          <executions>
+            <execution>
+              <goals>
+                <goal>check</goal>
+              </goals>
+              <phase>process-sources</phase>
+            </execution>
+          </executions>
+      </plugin>
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>