File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?xml version =" 1.0" ?>
22<project name =" SampleBuildWithAnt" default =" war" >
3+ <taskdef resource =" com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
4+ classpath =" WebContent/WEB-INF/lib/checkstyle-7.8.2-all.jar" />
35 <path id =" compile.classpath" >
46 <fileset dir =" WebContent/WEB-INF/lib" >
57 <include name =" *.jar" />
4446 </junit >
4547 </target >
4648
49+ <target name =" checkstyle"
50+ description =" Generates a report of code convention violations." >
51+
52+ <checkstyle config =" sun_checks.xml"
53+ failureProperty =" checkstyle.failure"
54+ failOnViolation =" false" >
55+ <formatter type =" xml" tofile =" checkstyle_report.xml" />
56+ <fileset dir =" src/example" includes =" **/*.java" />
57+ </checkstyle >
58+
59+ <!-- style in="checkstyle_report.xml" out="checkstyle_report.html" style="checkstyle.xsl"/-->
60+ </target >
61+
4762</project >
Original file line number Diff line number Diff line change 11package junit ;
22
3- import static org .junit .Assert .*;
4-
5-
63import org .junit .After ;
74import org .junit .Before ;
85import org .junit .Test ;
6+ import org .junit .Assert .*;
97
10- import static org .junit .Assert .*;
11-
12-
138public class TestCalculator {
149
1510 private math .Calculator calc ;
Original file line number Diff line number Diff line change 1+ /**
2+ *
3+ */
4+ /**
5+ * @author ajay.srinivasa
6+ *
7+ */
8+ package math ;
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <!DOCTYPE module PUBLIC
3+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4+ "http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">
5+
6+ <module name =" Checker" >
7+ <module name =" JavadocPackage" />
8+ <module name =" TreeWalker" >
9+ <module name =" AvoidStarImport" />
10+ <module name =" ConstantName" />
11+ <module name =" EmptyBlock" />
12+ </module >
13+ </module >
You can’t perform that action at this time.
0 commit comments