Skip to content

Commit

Permalink
Improve checkstyle configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippWendler committed Nov 27, 2015
1 parent 05afb71 commit 662d9b2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .checkstyle
Expand Up @@ -9,11 +9,11 @@
</local-check-config>
<fileset name="regular" enabled="true" check-config-name="SoSy-Lab Common" local="true">
<file-match-pattern match-pattern=".java$" include-pattern="true"/>
<file-match-pattern match-pattern="Test.java$" include-pattern="false"/>
<file-match-pattern match-pattern="Test(Suite|0)?.java$" include-pattern="false"/>
<file-match-pattern match-pattern=".apt-generated" include-pattern="false"/>
</fileset>
<fileset name="Test classes" enabled="true" check-config-name="Test-Code Configuration" local="true">
<file-match-pattern match-pattern="Test.java$" include-pattern="true"/>
<file-match-pattern match-pattern="Test(Suite|0)?.java$" include-pattern="true"/>
<file-match-pattern match-pattern=".apt-generated" include-pattern="false"/>
</fileset>
</fileset-config>
7 changes: 5 additions & 2 deletions .settings/checkstyle.test.xml
Expand Up @@ -17,7 +17,9 @@
<property name="message" value="Avoid using corresponding octal or Unicode escape."/>
</module>
<module name="SuppressWarningsHolder"/>
<module name="AnnotationUseStyle"/>
<module name="AnnotationUseStyle">
<property name="trailingArrayComma" value="ignore"/>
</module>
<module name="MissingOverride"/>
<module name="PackageAnnotation"/>
<module name="SuppressWarnings"/>
Expand All @@ -38,7 +40,7 @@
</module>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName">
<property name="format" value="^([a-z][a-zA-Z0-9]*|_)$"/>
<property name="format" value="^[a-zA-Z0-9_]*$"/>
</module>
<module name="MemberName"/>
<module name="MethodName">
Expand Down Expand Up @@ -131,6 +133,7 @@
<module name="SimplifyBooleanExpression"/>
<module name="StringLiteralEquality"/>
<module name="OneStatementPerLine"/>
<module name="ArrayTrailingComma"/>
<module name="InterfaceIsType"/>
<module name="MutableException"/>
<module name="ArrayTypeStyle"/>
Expand Down
14 changes: 9 additions & 5 deletions .settings/checkstyle.xml
Expand Up @@ -5,7 +5,7 @@
This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
Checkstyle-Configuration: JavaSMT
Checkstyle-Configuration: SoSy-Lab Common
Description: none
-->
<module name="Checker">
Expand All @@ -17,11 +17,15 @@
<property name="message" value="Avoid using corresponding octal or Unicode escape."/>
</module>
<module name="SuppressWarningsHolder"/>
<module name="AnnotationUseStyle"/>
<module name="AnnotationUseStyle">
<property name="trailingArrayComma" value="ignore"/>
</module>
<module name="MissingOverride"/>
<module name="PackageAnnotation"/>
<module name="SuppressWarnings"/>
<module name="JavadocStyle"/>
<module name="JavadocStyle">
<property name="checkFirstSentence" value="false"/>
</module>
<module name="JavadocMethod">
<property name="allowUndeclaredRTE" value="true"/>
<property name="allowMissingParamTags" value="true"/>
Expand All @@ -35,7 +39,7 @@
<property name="ignoreName" value="true"/>
</module>
<module name="ClassTypeParameterName">
<property name="format" value="^[A-Z][0-9]?$"/>
<property name="format" value="^([A-Z][A-Z0-9]?|T[A-Za-z]*|[A-Z][a-zA-Z0-9]*T(ype)?)$"/>
</module>
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
Expand All @@ -45,7 +49,7 @@
<module name="MemberName"/>
<module name="MethodName"/>
<module name="MethodTypeParameterName">
<property name="format" value="^[A-Z][0-9]?$"/>
<property name="format" value="^([A-Z][A-Z]?[A-Z0-9]?|[A-Z][a-zA-Z0-9]*T(ype)?)$"/>
</module>
<module name="PackageName"/>
<module name="ParameterName"/>
Expand Down
4 changes: 2 additions & 2 deletions build/build-checkstyle.xml
Expand Up @@ -14,13 +14,13 @@
<taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties" uri="antlib:com.puppycrawl.tools.checkstyle.ant" classpathref="checkstyle.lib.path"/>

<cs:checkstyle config=".settings/checkstyle.xml">
<fileset dir="${source.dir}" includes="**/*.java" excludes="**/*Test.java"/>
<fileset dir="${source.dir}" includes="**/*.java" excludes="**/*Test.java **/*Test0.java **/*TestSuite.java"/>
<formatter type="xml" toFile="Checkstyle.xml"/>
</cs:checkstyle>
<xslt in="Checkstyle.xml" out="Checkstyle.html" style="build/checkstyle.xsl"/>

<cs:checkstyle config=".settings/checkstyle.test.xml">
<fileset dir="${source.dir}" includes="**/*Test.java"/>
<fileset dir="${source.dir}" includes="**/*Test.java **/*Test0.java **/*TestSuite.java"/>
<formatter type="xml" toFile="Checkstyle.Test.xml"/>
</cs:checkstyle>
<xslt in="Checkstyle.Test.xml" out="Checkstyle.Test.html" style="build/checkstyle.xsl"/>
Expand Down

0 comments on commit 662d9b2

Please sign in to comment.