Skip to content

Commit 36482b9

Browse files
done changes
1 parent 51258df commit 36482b9

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

build.xml

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
<project name="SampleBuild" default="compile" basedir=".">
22
<taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
3-
classpath="/path/to/checkstyle-8.13-all.jar"/>
3+
classpath="WebContent/WEB-INF/lib/checkstyle-7.8.2-all.jar"/>
44
<path id="compile.classpath">
55
<fileset dir="WebContent/WEB-INF/lib">
66
<include name="*.jar"/>
77
</fileset>
88
</path>
9-
<target name="init">
9+
<target name="init">
1010
<mkdir dir="build/classes"/>
1111
<mkdir dir="dist"/>
1212
</target>
13-
<target name="compile" depends="init">
13+
<target name="compile" depends="init">
1414
<javac srcdir="src" debug="true" destdir="build/classes">
1515
<classpath refid="compile.classpath"/>
1616
</javac>
1717
</target>
18+
<target name="checkstyle">
19+
<checkstyle config="sun_checks.xml">
20+
<fileset dir="src/example" includes="**/*.java"/>
21+
<formatter type="xml" toFile="checkstyle_errors.xml"/>
22+
</checkstyle>
23+
</target>
1824
</project>

checkstyle_errors.xml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<checkstyle version="7.8.2">
3+
<file name="C:\GitWorkspace\SampleWebApp\src\example\junit\TestCalculator.java">
4+
<error line="0" severity="error" message="Missing package-info.java file." source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocPackageCheck"/>
5+
<error line="3" severity="error" message="Using the &apos;.*&apos; form of import should be avoided - org.junit.Assert.*." source="com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck"/>
6+
</file>
7+
<file name="C:\GitWorkspace\SampleWebApp\src\example\math\Calculator.java">
8+
</file>
9+
<file name="C:\GitWorkspace\SampleWebApp\src\example\math\package-info.java">
10+
</file>
11+
</checkstyle>

0 commit comments

Comments
 (0)