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 {