-
Notifications
You must be signed in to change notification settings - Fork 129
/
Copy pathbuild.xml
114 lines (104 loc) · 4.58 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<project name="checkstyle" default="checkstyle.checkstyle" basedir=".">
<!-- THAT IS NOT REAL BUILD.xml it contains chunks from original checkstyle/build.xml ->
<!-- set global properties for this build -->
<property name="target.dir" value="${basedir}/target" />
<property name="version" value="5.4-SNAPSHOT" />
<property name="checkstyle.dir"
value="src/checkstyle/com/puppycrawl/tools/checkstyle" />
<!-- override using -Dgui.target= if you wish to load a source file from startup -->
<property name="gui.target" value=""/>
<path id="run.classpath">
<pathelement location="${target.dir}/checkstyle-${version}-all.jar"/>
</path>
<target name="checkstyle.style"
description="Runs checkstyle against it's own sources to test generation of error reports">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
<classpath refid="run.classpath"/>
</taskdef>
<delete file="${target.dir}/cachefile" />
<property name="checkstyle.pattern.todo" value="NOTHingWillMatCH_-"/>
<property name="check.config" location="checkstyle-checks.xml"/>
<checkstyle failonviolation="false" config="${check.config}">
<fileset dir="src/checkstyle"
includes="**/*.java,**/*.properties"
excludes="**/Generated*.java,**/gui/*"/>
<formatter type="xml" toFile="${target.dir}/cs_errors.xml"/>
<classpath refid="run.classpath"/>
<property key="checkstyle.cache.file" file="${target.dir}/cachefile"/>
<property key="checkstyle.header.file" file="java.header"/>
<property key="checkstyle.importcontrol.file" file="import-control.xml"/>
<property key="checkstyle.suppressions.file"
file="suppressions.xml"/>
</checkstyle>
<mkdir dir="${target.dir}/style/frames"/>
<mkdir dir="${target.dir}/style/noframes"/>
<mkdir dir="${target.dir}/style/noframes-sorted"/>
<mkdir dir="${target.dir}/style/simple"/>
<mkdir dir="${target.dir}/style/csv"/>
<mkdir dir="target/style/author"/>
<style basedir="${target.dir}"
destdir="${target.dir}/style/noframes"
includes="cs_errors.xml"
style="contrib/checkstyle-noframes.xsl"/>
<style basedir="${target.dir}"
destdir="${target.dir}/style/noframes-sorted"
includes="cs_errors.xml"
style="contrib/checkstyle-noframes-sorted.xsl"/>
<style basedir="${target.dir}"
destdir="${target.dir}/style/frames"
includes="cs_errors.xml"
style="contrib/checkstyle-frames.xsl"/>
<style basedir="${target.dir}"
destdir="${target.dir}/style/simple"
includes="cs_errors.xml"
style="contrib/checkstyle-simple.xsl"/>
<style out="${target.dir}/style/csv/report-csv.txt"
in="${target.dir}/cs_errors.xml"
style="contrib/checkstyle-csv.xsl"/>
<style basedir="target"
destdir="target/style/author"
includes="cs_errors.xml"
style="contrib/checkstyle-author.xsl"/>
</target>
<?ignore
<!-- A GRAVEYARD OF IDEAS BELOW -->
<!-- runs the command line version on a file -->
<target name="run.checkstyle"
description="Runs the command line version on a file">
<java classname="com.puppycrawl.tools.checkstyle.Main"
fork="yes"
dir="."
classpathref="run.classpath">
<sysproperty key="checkstyle.allow.tabs" value="yes"/>
<arg value="-c"/>
<arg file="checkstyle-checks.xml"/>
<arg value="src/testinputs/com/puppycrawl/tools/checkstyle/InputSimple.java"/>
</java>
<java classname="com.puppycrawl.tools.checkstyle.Main"
fork="yes"
dir="."
classpathref="run.classpath">
<arg value="-c"/>
<arg file="checkstyle-checks.xml"/>
<arg value="-r"/>
<arg file="src/checkstyle/com/puppycrawl/tools/checkstyle/api"/>
</java>
</target>
<target name="checkstyle.run" depends="compile.checkstyle"
description="Runs checkstyle.">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
<classpath refid="run.classpath"/>
</taskdef>
<delete file="${target.dir}/cachefile" />
<property name="checkstyle.pattern.todo" value="NOTHingWillMatCH_-"/>
<property name="check.config" location="checkstyle-checks.xml"/>
<checkstyle config="${custom.config}" file="${file.to.check}">
<formatter type="plain"/>
<formatter type="xml" toFile="${target.dir}/cs_errors.xml"/>
<classpath refid="run.classpath"/>
</checkstyle>
</target>
?>
</project>