accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [55/66] [abbrv] accumulo git commit: ACCUMULO-3451 Add minimal checkstyle enforcement
Date Fri, 09 Jan 2015 02:44:59 GMT
ACCUMULO-3451 Add minimal checkstyle enforcement


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d2c116ff
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d2c116ff
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d2c116ff

Branch: refs/heads/1.6
Commit: d2c116ffae59672ff995033e81be73260c4d5c25
Parents: c2155f4
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Tue Dec 23 18:51:04 2014 -0500
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Thu Jan 8 20:23:36 2015 -0500

----------------------------------------------------------------------
 pom.xml | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 108 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d2c116ff/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8316a33..711a21d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -367,6 +367,11 @@
     <pluginManagement>
       <plugins>
         <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-checkstyle-plugin</artifactId>
+          <version>2.13</version>
+        </plugin>
+        <plugin>
           <groupId>com.google.code.sortpom</groupId>
           <artifactId>maven-sortpom-plugin</artifactId>
           <version>2.1.0</version>
@@ -566,6 +571,19 @@
                 <pluginExecution>
                   <pluginExecutionFilter>
                     <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-checkstyle-plugin</artifactId>
+                    <versionRange>[2.13,)</versionRange>
+                    <goals>
+                      <goal>check</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore />
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-dependency-plugin</artifactId>
                     <versionRange>[2.0,)</versionRange>
                     <goals>
@@ -709,6 +727,96 @@
         </executions>
       </plugin>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <checkstyleRules>
+            <module name="Checker">
+              <property name="charset" value="UTF-8" />
+              <property name="severity" value="warning" />
+              <!-- Checks for whitespace                               -->
+              <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+              <module name="FileTabCharacter">
+                <property name="eachLine" value="true" />
+              </module>
+              <module name="TreeWalker">
+                <module name="OuterTypeFilename" />
+                <module name="LineLength">
+                  <!-- needs extra, because Eclipse formatter ignores the ending left
brace -->
+                  <property name="max" value="200"/>
+                  <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
+                </module>
+                <module name="AvoidStarImport" />
+                <module name="NoLineWrap" />
+                <module name="LeftCurly">
+                  <property name="maxLineLength" value="160" />
+                </module>
+                <module name="RightCurly" />
+                <module name="RightCurly">
+                  <property name="option" value="alone" />
+                  <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR,
LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT" />
+                </module>
+                <module name="SeparatorWrap">
+                  <property name="tokens" value="DOT" />
+                  <property name="option" value="nl" />
+                </module>
+                <module name="SeparatorWrap">
+                  <property name="tokens" value="COMMA" />
+                  <property name="option" value="EOL" />
+                </module>
+                <module name="PackageName">
+                  <property name="format" value="^[a-z]+(\.[a-z][a-zA-Z0-9]*)*$" />
+                </module>
+                <module name="MethodTypeParameterName">
+                  <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"
/>
+                </module>
+                <module name="MethodParamPad" />
+                <module name="OperatorWrap">
+                  <property name="option" value="NL" />
+                  <property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE,
GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, QUESTION, SL, SR, STAR "
/>
+                </module>
+                <module name="AnnotationLocation">
+                  <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF,
CTOR_DEF" />
+                </module>
+                <module name="AnnotationLocation">
+                  <property name="tokens" value="VARIABLE_DEF" />
+                  <property name="allowSamelineMultipleAnnotations" value="true" />
+                </module>
+                <module name="NonEmptyAtclauseDescription" />
+                <module name="JavadocTagContinuationIndentation" />
+                <module name="JavadocMethod">
+                  <property name="allowMissingJavadoc" value="true" />
+                  <property name="allowMissingParamTags" value="true" />
+                  <property name="allowMissingThrowsTags" value="true" />
+                  <property name="allowMissingReturnTag" value="true" />
+                  <property name="allowedAnnotations" value="Override,Test,BeforeClass,AfterClass,Before,After"
/>
+                  <property name="allowThrowsTagsForSubclasses" value="true" />
+                </module>
+                <module name="SingleLineJavadoc" />
+              </module>
+            </module>
+          </checkstyleRules>
+          <violationSeverity>warning</violationSeverity>
+          <includeTestSourceDirectory>true</includeTestSourceDirectory>
+          <excludes>**/thrift/*.java</excludes>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>com.puppycrawl.tools</groupId>
+            <artifactId>checkstyle</artifactId>
+            <version>6.1.1</version>
+          </dependency>
+        </dependencies>
+        <executions>
+          <execution>
+            <id>check-style</id>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <groupId>com.github.koraktor</groupId>
         <artifactId>mavanagaiata</artifactId>
         <executions>


Mime
View raw message