Skip to content

Commit 3a1c5cf

Browse files
committed
Tidy up static analysis targets and add analyze target.
1 parent ebaf802 commit 3a1c5cf

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

build.xml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,6 @@
114114
</apply>
115115
</target>
116116

117-
<target name="check" depends="resolve">
118-
<taskdef resource="checkstyletask.properties"
119-
classpathref="analysis.classpath"/>
120-
<checkstyle config="checkstyle.xml">
121-
<fileset dir="${src.dir}" includes="**/*.java"/>
122-
<classpath path="${build.dir}/classes"/>
123-
</checkstyle>
124-
</target>
125-
126117
<target name="tags" description="Generate a TAGS file for your editor.">
127118
<delete file="TAGS"/>
128119
<apply executable="etags">
@@ -132,6 +123,15 @@
132123
</apply>
133124
</target>
134125

126+
<target name="check" depends="resolve" description="Run Checkstyle.">
127+
<taskdef resource="checkstyletask.properties"
128+
classpathref="analysis.classpath"/>
129+
<checkstyle config="checkstyle.xml">
130+
<fileset dir="${src.dir}" includes="**/*.java"/>
131+
<classpath path="${build.dir}/classes"/>
132+
</checkstyle>
133+
</target>
134+
135135
<target name="findbugs" depends="compile" description="Run FindBugs.">
136136
<taskdef classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
137137
name="findbugs" classpathref="analysis.classpath"/>
@@ -142,7 +142,7 @@
142142
</findbugs>
143143
</target>
144144

145-
<target name="pmd" depends="resolve">
145+
<target name="pmd" depends="resolve" description="Run PMD on the code.">
146146
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"
147147
classpathref="analysis.classpath"/>
148148
<pmd>
@@ -154,6 +154,9 @@
154154
</pmd>
155155
</target>
156156

157+
<target name="analyze" depends="check,pmd,findbugs"
158+
description="Run all static analysis tools."/>
159+
157160
<!-- Unit testing (JUnit) -->
158161

159162
<target name="test-compile" depends="compile">

0 commit comments

Comments
 (0)