-
Notifications
You must be signed in to change notification settings - Fork 0
/
Solidity_findbugs.xml
executable file
·77 lines (68 loc) · 2.76 KB
/
Solidity_findbugs.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
<?xml version="1.0"?>
<project name="XXX Application Build with find bugs" default="run"
basedir="../">
<description>
Ant build sample for running
- findbugs,
</description>
<!-- Change the paths to your individual installation directories -->
<property name="findbugs.home.dir" location="${basedir}/tools" />
<property name="lib.dir" location="${basedir}/map/lib" />
<property name="src.dir" location="${basedir}/map/app/" />
<property name="bin.dir" location="${basedir}/bin" />
<property name="htm.dir" location="${basedir}/html" />
<property name="report.dir" location="${basedir}/report" />
<property name="report.findbugs.dir" location="${report.dir}/findbugs" />
<path id="run.classpath">
<pathelement path="${bin.dir}" />
<pathelement path="${findbugs.home.dir}/junit-4.5.jar" />
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
<fileset dir="${findbugs.home.dir}/play/">
<include name="**/*.jar" />
</fileset>
</path>
<!-- Task of clean -->
<target name="clean" description="Delete all result to start with a clean build.">
<delete dir="${report.findbugs.dir}" />
<delete dir="${report.temp.dir}" />
<delete dir="${bin.dir}" />
</target>
<!-- Task of prepare report -->
<target name="prepare.report.dir" description="Prepares the reports folder">
<mkdir dir="${report.findbugs.dir}" />
</target>
<!-- Task of check style -->
<target name="report.findbugs" depends="compile"
description="Run code analysis over code to check for problems.">
<!-- Fail this target if FindBugs is not installed. -->
<available file="${findbugs.home.dir}/findbugs/lib/findbugs.jar"
property="findbugs.available" />
<fail unless="findbugs.available"
message="Error: FINDBUGS_HOME not set or findbugs.jar not found." />
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
classpath="${findbugs.home.dir}/findbugs/lib/findbugs-ant.jar" />
<!-- Run FindBugs. -->
<mkdir dir="${report.findbugs.dir}" />
<findbugs home="${findbugs.home.dir}/findbugs/lib/" workHard="true"
output="xml:withMessages" outputFile="${report.findbugs.dir}/findbugs_report.xml">
<class location="${bin.dir}" />
<auxClasspath>
<fileset file="${findbugs.home.dir}/junit-4.5.jar" />
</auxClasspath>
</findbugs>
</target>
<!-- -->
<target name="compile" depends="clean" description="Compile the entire project.">
<mkdir dir="${bin.dir}" />
<!-- debuglevel="lines, source" -->
<javac debug="true" srcdir="${src.dir}" destdir="${bin.dir}"
classpathref="run.classpath" includeantruntime="false" deprecation="true" nowarn="on">
<compilerarg value="-Xlint"/>
</javac>
</target>
<!-- -->
<target name="run" description="Run the build" depends="clean,prepare.report.dir,report.findbugs">
</target>
</project>