HBASE-14829 Add more checkstyles (appy)

This commit is contained in:
stack 2015-11-19 21:33:14 -08:00
parent ea48ef8651
commit 62aba61bea
2 changed files with 63 additions and 21 deletions

View File

@ -32,24 +32,19 @@
<module name="Checker"> <module name="Checker">
<module name="FileTabCharacter"/> <module name="FileTabCharacter"/>
<module name="TreeWalker"> <module name="TreeWalker">
<module name="AvoidStarImport"/>
<module name="RedundantImport"/> <!-- Annotations Checks
<module name="UnusedImports"> http://checkstyle.sourceforge.net/config_annotation.html -->
<property name="processJavadoc" value="true"/> <module name="MissingDeprecated"/>
</module>
<module name="LineLength"> <!-- Block Checks
<property name="max" value="100"/> http://checkstyle.sourceforge.net/config_blocks.html -->
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://|org.apache.thrift.|com.google.protobuf.|hbase.protobuf.generated"/>
</module>
<module name="MethodLength"/>
<module name="MethodParamPad"/>
<module name="ParenPad"/>
<module name="EmptyStatement"/>
<module name="EmptyBlock"/> <module name="EmptyBlock"/>
<module name="EqualsHashCode"/> <module name="LeftCurly"/>
<module name="IllegalInstantiation"/> <module name="NeedBraces"/>
<module name="InnerAssignment"/>
<module name="MissingSwitchDefault"/> <!-- Class Design Checks
http://checkstyle.sourceforge.net/config_design.html -->
<module name="FinalClass"/> <module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/> <module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/> <module name="InterfaceIsType"/>
@ -57,9 +52,56 @@
<property name="packageAllowed" value="true"/> <property name="packageAllowed" value="true"/>
<property name="protectedAllowed" value="true"/> <property name="protectedAllowed" value="true"/>
</module> </module>
<!-- Coding Checks
http://checkstyle.sourceforge.net/config_coding.html -->
<module name="ArrayTypeStyle"/> <module name="ArrayTypeStyle"/>
<module name="UpperEll"/> <module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MissingSwitchDefault"/>
<module name="NoFinalizer"/> <module name="NoFinalizer"/>
<module name="MissingDeprecated"/>
<!-- Import Checks
http://checkstyle.sourceforge.net/config_imports.html -->
<module name="AvoidStarImport"/>
<module name="ImportOrder">
<property name="groups" value="*,javax,java"/>
<property name="ordered" value="true"/>
<property name="separated" value="true"/>
<property name="option" value="bottom"/>
<property name="sortStaticImportsAlphabetically" value="true"/>
</module>
<module name="RedundantImport"/>
<module name="UnusedImports">
<property name="processJavadoc" value="true"/>
</module>
<!-- Javadoc Checks
http://checkstyle.sourceforge.net/config_javadoc.html -->
<module name="JavadocTagContinuationIndentation"/>
<module name="NonEmptyAtclauseDescription"/>
<!-- Miscellaneous Checks
http://checkstyle.sourceforge.net/config_misc.html -->
<module name="UpperEll"/>
<module name="Indentation">
<property name="basicOffset" value="2"/>
<property name="caseIndent" value="2"/>
</module>
<!-- Size Violation Checks
http://checkstyle.sourceforge.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="100"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://|org.apache.thrift.|com.google.protobuf.|hbase.protobuf.generated"/>
</module>
<module name="MethodLength"/>
<!-- Whitespace Checks
http://checkstyle.sourceforge.net/config_whitespace.html -->
<module name="MethodParamPad"/>
<module name="ParenPad"/>
</module> </module>
</module> </module>

View File

@ -846,7 +846,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId> <artifactId>maven-checkstyle-plugin</artifactId>
<version>2.16</version> <version>2.17</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.hbase</groupId> <groupId>org.apache.hbase</groupId>
@ -2987,7 +2987,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId> <artifactId>maven-checkstyle-plugin</artifactId>
<version>2.16</version> <version>2.17</version>
<configuration> <configuration>
<excludes>target/**</excludes> <excludes>target/**</excludes>
<configLocation>hbase/checkstyle.xml</configLocation> <configLocation>hbase/checkstyle.xml</configLocation>