Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update code analysis tools and optimize builds #114

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@
Build the code
===================================================================
-->
<target name="build" depends="prepare, compile, compile-jdk9+" unless="skip.build"
<target name="build" depends="compile,compile-jdk9+" unless="skip.build"
description="--> compiles the source code">

<!-- Builds and verifies that the classes belonging in the confined package of
Expand Down Expand Up @@ -1715,7 +1715,7 @@ ${antunit.reports}
<fail if="tests.failed" message="Unit tests failed"/>
</target>

<target name="test-init" depends="probe-offline,check-optional-packages,dump-info">
<target name="test-init" depends="probe-offline,dump-info">
<mkdir dir="${build.junit.tmpdir}"/>
<condition property="sun.io.useCanonCaches" value="false">
<not>
Expand Down
9 changes: 5 additions & 4 deletions check.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<!-- Ant Checkstyle -->
<property name="checkstyle.src.dir" location="${etc.dir}/checkstyle"/>
<property name="checkstyle.version"
value="6.19"
value="8.28"
description="Which version of Checkstyle to use"/>
<property name="checkstyle.reportdir"
location="${reports.dir}/checkstyle"
Expand Down Expand Up @@ -88,7 +88,7 @@

<!-- Findbugs: Running SpotBugs -->
<property name="spotbugs.version"
value="3.1.4"
value="3.1.12"
description="Which version of SpotBugs to use"/>
<property name="findbugs.reportdir"
location="${reports.dir}/findbugs"
Expand Down Expand Up @@ -130,7 +130,7 @@

<!-- OWASP Dependency Check -->
<property name="owasp.dc.version"
value="3.2.1"
value="5.2.4"
description="Which version of OWASP Dependency Check to use"/>
<property name="owasp.dc.report.dir"
value="${reports.dir}/owasp-dc"
Expand All @@ -147,8 +147,9 @@
value="${htmlcheck.report.dir}/report.txt"
description="Report file of the HTML-Check"/>

<available classname="org.apache.ivy.Ivy" property="ivy.present"/>

<target name="init-ivy">
<target name="init-ivy" unless="ivy.present">
<property name="ivy.version" value="2.5.0"/>
<property name="ivy.jar.url" value="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar"/>
<property name="ivy.jar.dir" value="${build.dir}/ivy"/>
Expand Down
46 changes: 26 additions & 20 deletions src/etc/checkstyle/checkstyle-config
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
<!-- size limits -->
<module name="FileLength"/>
<module name="FileTabCharacter"/>
<module name="LineLength">
<property name="max" value="100"/>
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
<property name="tabWidth" value="4"/>
</module>

<module name="RegexpSingleline">
<!-- \s matches whitespace character, $ matches end of line. -->
<property name="format" value="\s+$"/>
</module>

<module name="TreeWalker">
<!-- Javadoc requirements -->
Expand All @@ -37,7 +47,7 @@
</module>
<module name="JavadocMethod">
<property name="scope" value="protected"/>
<property name="allowUndeclaredRTE" value="true"/>
<!-- <property name="allowUndeclaredRTE" value="true"/> -->
</module>
<module name="JavadocVariable">
<property name="scope" value="public"/>
Expand All @@ -61,11 +71,6 @@
<module name="UnusedImports"/>

<!-- size limits -->
<module name="LineLength">
<property name="max" value="100"/>
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
<property name="tabWidth" value="4"/>
</module>
<module name="MethodLength"/>
<module name="ParameterNumber"/>

Expand Down Expand Up @@ -93,13 +98,14 @@

<!-- Checks for common coding problems -->
<!-- <module name="AvoidInlineConditionals"/> -->
<!-- <module name="DoubleCheckedLocking"/> --> <!-- removed in checkstyle 5.6 -->
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="IllegalInstantiation">
<property name="classes" value="java.lang.Boolean"/>
</module>
<!-- <module name="InnerAssignment"/> -->
<!-- <module name="MagicNumber"/> -->
<module name="InnerAssignment"/>
<module name="MagicNumber"/>
<module name="MissingSwitchDefault"/>
<!-- Allow redundant throw declarations for doc purposes
<module name="RedundantThrows">
Expand All @@ -121,19 +127,19 @@
<!-- <module name="TodoComment"/> -->
<module name="UpperEll"/>
<!-- allow comment suppression of checks -->
<module name="FileContentsHolder"/>
</module>

<module name="RegexpSingleline">
<!-- \s matches whitespace character, $ matches end of line. -->
<property name="format" value="\s+$"/>
<!-- <module name="FileContentsHolder"/> --><!-- removed in 8.2 -->
<!--
<module name="GenericIllegalRegexp">
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>
-->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle\:([\w\|]+) *OFF"/>
<property name="onCommentFormat" value="CheckStyle\:([\w\|]+) *ON"/>
<property name="checkFormat" value="$1"/>
</module>
</module>

<!-- <module name="au.com.redhillconsulting.simian.SimianCheck"/> -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle\:([\w\|]+) *OFF"/>
<property name="onCommentFormat" value="CheckStyle\:([\w\|]+) *ON"/>
<property name="checkFormat" value="$1"/>
</module>

</module>