From e5613eba4e95124c617de34785807261ce0c6254 Mon Sep 17 00:00:00 2001 From: Michael Haupt <michael.haupt@oracle.com> Date: Mon, 14 Jul 2014 15:50:07 +0200 Subject: [PATCH] FindBugs: place results in findbugs.html in fastr folder, exclude the file from version control --- .hgignore | 1 + mx.fastr/mx_fastr.py | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.hgignore b/.hgignore index d0d9f48986..c845b48c74 100644 --- a/.hgignore +++ b/.hgignore @@ -83,3 +83,4 @@ agent/make/sa17.tar.gz R.tokens .tmp.unit.knucleotide.input *.o +findbugs.html diff --git a/mx.fastr/mx_fastr.py b/mx.fastr/mx_fastr.py index 3c93d53678..485cd02336 100644 --- a/mx.fastr/mx_fastr.py +++ b/mx.fastr/mx_fastr.py @@ -82,17 +82,13 @@ def findbugs(args): assert exists(findbugsJar) 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] - 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(): cmd.append('-progress') cmd = cmd + ['-auxclasspath', mx.classpath([p.name for p in nonTestProjects]), '-output', findbugsResults, '-exitcode'] + args + outputDirs exitcode = mx.run_java(cmd, nonZeroIsFatal=False) - if exitcode != 0: - with open(findbugsResults) as fp: - mx.log(fp.read()) - os.unlink(findbugsResults) return exitcode def _fastr_gate_body(args, tasks): -- GitLab