Skip to content
Snippets Groups Projects
Commit e5613eba authored by Michael Haupt's avatar Michael Haupt
Browse files

FindBugs: place results in findbugs.html in fastr folder, exclude the file from version control

parent c8918686
Branches
No related tags found
No related merge requests found
...@@ -83,3 +83,4 @@ agent/make/sa17.tar.gz ...@@ -83,3 +83,4 @@ agent/make/sa17.tar.gz
R.tokens R.tokens
.tmp.unit.knucleotide.input .tmp.unit.knucleotide.input
*.o *.o
findbugs.html
...@@ -82,17 +82,13 @@ def findbugs(args): ...@@ -82,17 +82,13 @@ def findbugs(args):
assert exists(findbugsJar) assert exists(findbugsJar)
nonTestProjects = [p for p in _fastr_suite.projects if not p.name.endswith('.test') and not p.native] nonTestProjects = [p for p in _fastr_suite.projects if not p.name.endswith('.test') and not p.native]
outputDirs = [p.output_dir() for p in nonTestProjects] outputDirs = [p.output_dir() for p in nonTestProjects]
findbugsResults = join(_fastr_suite.dir, 'findbugs.results') findbugsResults = join(_fastr_suite.dir, 'findbugs.html')
cmd = ['-jar', findbugsJar, '-textui', '-low', '-maxRank', '15', '-exclude', join(_fastr_suite.mxDir, 'findbugs-exclude.xml')] cmd = ['-jar', findbugsJar, '-low', '-maxRank', '15', '-exclude', join(_fastr_suite.mxDir, 'findbugs-exclude.xml'), '-html']
if sys.stdout.isatty(): if sys.stdout.isatty():
cmd.append('-progress') cmd.append('-progress')
cmd = cmd + ['-auxclasspath', mx.classpath([p.name for p in nonTestProjects]), '-output', findbugsResults, '-exitcode'] + args + outputDirs cmd = cmd + ['-auxclasspath', mx.classpath([p.name for p in nonTestProjects]), '-output', findbugsResults, '-exitcode'] + args + outputDirs
exitcode = mx.run_java(cmd, nonZeroIsFatal=False) exitcode = mx.run_java(cmd, nonZeroIsFatal=False)
if exitcode != 0:
with open(findbugsResults) as fp:
mx.log(fp.read())
os.unlink(findbugsResults)
return exitcode return exitcode
def _fastr_gate_body(args, tasks): def _fastr_gate_body(args, tasks):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment