-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-checkstyle.xml
43 lines (39 loc) · 1.9 KB
/
build-checkstyle.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="boost-checkstyle" default="ignore" basedir=".">
<import file="build-init.xml"/>
<target name="checkstyle" depends="run_checkstyle,check_checkstyle"/>
<target name="run_checkstyle">
<macro_run_checkstyle code.type="core"/>
<macro_run_checkstyle code.type="edge"/>
<macro_run_checkstyle code.type="test"/>
</target>
<target name="check_checkstyle">
<macro_check_checkstyle code.type="core"/>
<macro_check_checkstyle code.type="edge"/>
<macro_check_checkstyle code.type="test"/>
</target>
<!-- FIX SC600 Move checkstyle inline. -->
<macrodef name="macro_run_checkstyle">
<attribute name="code.type"/>
<sequential>
<mkdir dir="${checkstyle.cache.dir}"/>
<mkdir dir="${checkstyle.report.dir}"/>
<taskdef resource="checkstyletask.properties" classpathref="checkstyle.class.path"/>
<checkstyle config="${checkstyle.config.dir}/checkstyle-@{code.type}.xml"
failOnViolation="false" failureProperty="checkstyle.@{code.type}.failed">
<formatter/>
<formatter type="xml" tofile="${checkstyle.report.dir}/checkstyle-@{code.type}.xml"/>
<fileset refid="checkstyle.@{code.type}.code"/>
</checkstyle>
<xslt in="${checkstyle.report.dir}/checkstyle-@{code.type}.xml"
out="${checkstyle.report.dir}/checkstyle-@{code.type}.html"
style="${checkstyle.config.dir}/checkstyle-noframes-sorted.xsl"/>
</sequential>
</macrodef>
<macrodef name="macro_check_checkstyle">
<attribute name="code.type"/>
<sequential>
<fail if="checkstyle.@{code.type}.failed" message="Checkstyle failure [@{code.type}]."/>
</sequential>
</macrodef>
</project>