Browse Source

update checkstyle (check 'DoubleCheckLocking' was removed in CS)

master
Jan Matrne 11 years ago
parent
commit
211b7188af
2 changed files with 21 additions and 16 deletions
  1. +1
    -1
      check.xml
  2. +20
    -15
      src/etc/checkstyle/checkstyle-config

+ 1
- 1
check.xml View File

@@ -91,7 +91,7 @@
</target> </target>


<target name="checkstyle" description="--> checks Ant codebase according to ${config.dir}/checkstyle-config" depends="init-ivy"> <target name="checkstyle" description="--> checks Ant codebase according to ${config.dir}/checkstyle-config" depends="init-ivy">
<ivy:cachepath organisation="checkstyle" module="checkstyle" revision="4.4"
<ivy:cachepath organisation="com.puppycrawl.tools" module="checkstyle" revision="5.7"
inline="true" conf="default" pathid="checkstyle.classpath" transitive="true"/> inline="true" conf="default" pathid="checkstyle.classpath" transitive="true"/>
<taskdef resource="checkstyletask.properties" classpathref="checkstyle.classpath" /> <taskdef resource="checkstyletask.properties" classpathref="checkstyle.classpath" />
<mkdir dir="${checkstyle.reportdir}"/> <mkdir dir="${checkstyle.reportdir}"/>


+ 20
- 15
src/etc/checkstyle/checkstyle-config View File

@@ -18,6 +18,19 @@
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd"> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">


<module name="Checker"> <module name="Checker">

<!-- required licence file -->
<module name="Header">
<property name="headerFile" value="${config.dir}/RequiredHeader.txt"/>
<property name="ignoreLines" value="2"/>
</module>
<!-- size limits -->
<module name="FileLength"/>

<module name="FileTabCharacter"/>

<module name="TreeWalker"> <module name="TreeWalker">
<!-- Javadoc requirements --> <!-- Javadoc requirements -->
<module name="JavadocType"> <module name="JavadocType">
@@ -42,12 +55,6 @@
<module name="ParameterName"/> <module name="ParameterName"/>
<module name="StaticVariableName"/> <module name="StaticVariableName"/>


<!-- required licence file -->
<module name="Header">
<property name="headerFile" value="${config.dir}/RequiredHeader.txt"/>
<property name="ignoreLines" value="2"/>
</module>

<!-- Import conventions --> <!-- Import conventions -->
<module name="AvoidStarImport"/> <module name="AvoidStarImport"/>
<module name="IllegalImport"/> <module name="IllegalImport"/>
@@ -55,7 +62,6 @@
<module name="UnusedImports"/> <module name="UnusedImports"/>


<!-- size limits --> <!-- size limits -->
<module name="FileLength"/>
<module name="LineLength"> <module name="LineLength">
<property name="max" value="100"/> <property name="max" value="100"/>
<property name="ignorePattern" value="^ *\* *[^ ]+$"/> <property name="ignorePattern" value="^ *\* *[^ ]+$"/>
@@ -69,7 +75,6 @@
<module name="NoWhitespaceBefore"/> <module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/> <module name="OperatorWrap"/>
<module name="ParenPad"/> <module name="ParenPad"/>
<module name="TabCharacter"/>
<module name="WhitespaceAfter"/> <module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/> <module name="WhitespaceAround"/>


@@ -77,7 +82,6 @@
<module name="ModifierOrder"/> <module name="ModifierOrder"/>
<module name="RedundantModifier"/> <module name="RedundantModifier"/>



<!-- Checks for blocks --> <!-- Checks for blocks -->
<module name="AvoidNestedBlocks"/> <module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"> <module name="EmptyBlock">
@@ -87,10 +91,8 @@
<module name="NeedBraces"/> <module name="NeedBraces"/>
<module name="RightCurly"/> <module name="RightCurly"/>



<!-- Checks for common coding problems --> <!-- Checks for common coding problems -->
<!--<module name="AvoidInlineConditionals"/> --> <!--<module name="AvoidInlineConditionals"/> -->
<module name="DoubleCheckedLocking"/>
<module name="EmptyStatement"/> <module name="EmptyStatement"/>
<module name="EqualsHashCode"/> <module name="EqualsHashCode"/>
<module name="IllegalInstantiation"> <module name="IllegalInstantiation">
@@ -116,19 +118,22 @@


<!-- Miscellaneous other checks. --> <!-- Miscellaneous other checks. -->
<module name="ArrayTypeStyle"/> <module name="ArrayTypeStyle"/>
<module name="GenericIllegalRegexp">
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>
<!-- <module name="TodoComment"/> --> <!-- <module name="TodoComment"/> -->
<module name="UpperEll"/> <module name="UpperEll"/>
<!-- allow comment suppression of checks --> <!-- allow comment suppression of checks -->
<module name="FileContentsHolder"/> <module name="FileContentsHolder"/>
</module> </module>

<module name="RegexpSingleline">
<!-- \s matches whitespace character, $ matches end of line. -->
<property name="format" value="\s+$"/>
</module>
<!-- <module name="au.com.redhillconsulting.simian.SimianCheck"/> --> <!-- <module name="au.com.redhillconsulting.simian.SimianCheck"/> -->
<module name="SuppressionCommentFilter"> <module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle\:([\w\|]+) *OFF"/> <property name="offCommentFormat" value="CheckStyle\:([\w\|]+) *OFF"/>
<property name="onCommentFormat" value="CheckStyle\:([\w\|]+) *ON"/> <property name="onCommentFormat" value="CheckStyle\:([\w\|]+) *ON"/>
<property name="checkFormat" value="$1"/> <property name="checkFormat" value="$1"/>
</module> </module>

</module> </module>

Loading…
Cancel
Save