From 5689fdbf4f0f805fdcce8d21fef4bbf7d51e9fc7 Mon Sep 17 00:00:00 2001 From: Kengo TODA Date: Mon, 11 Feb 2019 18:05:23 +0800 Subject: [PATCH] fix #31: skip adding "-text" option --- .../spotbugs/internal/spotbugs/SpotBugsSpecBuilder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/spotbugs/internal/spotbugs/SpotBugsSpecBuilder.java b/src/main/java/com/github/spotbugs/internal/spotbugs/SpotBugsSpecBuilder.java index b50793aa..4caa366b 100644 --- a/src/main/java/com/github/spotbugs/internal/spotbugs/SpotBugsSpecBuilder.java +++ b/src/main/java/com/github/spotbugs/internal/spotbugs/SpotBugsSpecBuilder.java @@ -178,7 +178,11 @@ public SpotBugsSpec build() { outputArg += ':' + r.getStylesheet().asFile().getAbsolutePath(); } } - args.add(outputArg); + if ("-text".equals(outputArg)) { + // text mode is default behaviour of SpotBugs, then no need to add argument + } else { + args.add(outputArg); + } args.add("-outputFile"); args.add(reportsImpl.getFirstEnabled().getDestination().getAbsolutePath()); } else {