Repository: ant Updated Branches: refs/heads/master 9b3a93095 -> 17b7981d0
Sync Checkstyle setup with Ivy Project: http://git-wip-us.apache.org/repos/asf/ant/repo Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/17b7981d Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/17b7981d Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/17b7981d Branch: refs/heads/master Commit: 17b7981d04687cde6017e0775b45923ba3527e4e Parents: 9b3a930 Author: Gintas Grigelionis <[email protected]> Authored: Fri Jun 8 15:58:51 2018 +0200 Committer: Gintas Grigelionis <[email protected]> Committed: Fri Jun 8 15:58:51 2018 +0200 ---------------------------------------------------------------------- check.xml | 16 ++++++++-------- src/etc/checkstyle/checkstyle-config | 17 +++++++---------- 2 files changed, 15 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ant/blob/17b7981d/check.xml ---------------------------------------------------------------------- diff --git a/check.xml b/check.xml index 4bf79d2..f4baaee 100644 --- a/check.xml +++ b/check.xml @@ -35,7 +35,7 @@ <import file="build.xml"/> - <property name="config.dir" location="${etc.dir}/checkstyle"/> + <property name="checkstyle.src.dir" location="${etc.dir}/checkstyle"/> <!-- Ant Checkstyle report --> <property name="checkstyle.reportdir" @@ -45,16 +45,16 @@ location="${checkstyle.reportdir}/raw.xml" description="Name of Checkstyle XML-Report"/> <property name="stylesheet.html" - location="${config.dir}/checkstyle-frames.xsl" + location="${checkstyle.src.dir}/checkstyle-frames.xsl" description="Name of Checkstyle XSLT for generating HTML"/> <property name="stylesheet.html.sorted" - location="${config.dir}/checkstyle-frames-sortby-check.xsl" + location="${checkstyle.src.dir}/checkstyle-frames-sortby-check.xsl" description="Name of Checkstyle XSLT for generating 2nd HTML"/> <property name="stylesheet.text" - location="${config.dir}/checkstyle-text.xsl" + location="${checkstyle.src.dir}/checkstyle-text.xsl" description="Name of Checkstyle XSLT for generating plain text"/> <property name="stylesheet.xdoc" - location="${config.dir}/checkstyle-xdoc.xsl" + location="${checkstyle.src.dir}/checkstyle-xdoc.xsl" description="Name of Checkstyle XSLT for generating XDOC"/> <property name="checkstyle.basedir" @@ -117,7 +117,7 @@ <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/> </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 ${checkstyle.src.dir}/checkstyle-config" depends="init-ivy"> <available property="antlr.present" classname="antlr.CommonAST"/> <echo if:set="antlr.present"> Found antlr on the classpath. @@ -128,7 +128,7 @@ <sequential unless:set="antlr.present"> <ivy:cachepath organisation="com.puppycrawl.tools" module="checkstyle" revision="6.19" inline="true" conf="default" pathid="checkstyle.classpath" transitive="true"/> - <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties" classpathref="checkstyle.classpath" /> + <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties" classpathref="checkstyle.classpath"/> <mkdir dir="${checkstyle.reportdir}"/> <checkstyle config="${config.dir}/checkstyle-config" failOnViolation="false"> <formatter type="xml" toFile="${checkstyle.raw}"/> @@ -203,7 +203,7 @@ </taskdef> <mkdir dir="${simian.report.dir}"/> <simian failureProperty="simian.duplicates.found"> - <fileset dir="${java.dir}" /> + <fileset dir="${java.dir}"/> <formatter type="plain" toFile="${simian.report.dir}/simian-log.txt"/> <formatter type="xml" toFile="${simian.report.dir}/simian-log.xml"/> </simian> http://git-wip-us.apache.org/repos/asf/ant/blob/17b7981d/src/etc/checkstyle/checkstyle-config ---------------------------------------------------------------------- diff --git a/src/etc/checkstyle/checkstyle-config b/src/etc/checkstyle/checkstyle-config index 508a882..b63adbf 100644 --- a/src/etc/checkstyle/checkstyle-config +++ b/src/etc/checkstyle/checkstyle-config @@ -18,18 +18,15 @@ --> <module name="Checker"> - <!-- required licence file --> <module name="Header"> - <property name="headerFile" value="${config.dir}/RequiredHeader.txt"/> - <property name="ignoreLines" value="2"/> + <property name="headerFile" value="${checkstyle.src.dir}/RequiredHeader.txt"/> + <property name="ignoreLines" value="2"/> </module> - + <!-- size limits --> <module name="FileLength"/> - <module name="FileTabCharacter"/> - <module name="TreeWalker"> <!-- Javadoc requirements --> @@ -93,7 +90,7 @@ <module name="RightCurly"/> <!-- Checks for common coding problems --> - <!--<module name="AvoidInlineConditionals"/> --> + <!-- <module name="AvoidInlineConditionals"/> --> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> <module name="IllegalInstantiation"> @@ -102,11 +99,11 @@ <!-- <module name="InnerAssignment"/> --> <!-- <module name="MagicNumber"/> --> <module name="MissingSwitchDefault"/> - <!-- Allow redundant throw declarations for doc purposes + <!-- Allow redundant throw declarations for doc purposes <module name="RedundantThrows"> <property name="allowUnchecked" value="true"/> </module> - --> + --> <module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanReturn"/> @@ -129,7 +126,7 @@ <!-- \s matches whitespace character, $ matches end of line. --> <property name="format" value="\s+$"/> </module> - + <!-- <module name="au.com.redhillconsulting.simian.SimianCheck"/> --> <module name="SuppressionCommentFilter"> <property name="offCommentFormat" value="CheckStyle\:([\w\|]+) *OFF"/>
