Skip to content

Commit

Permalink
fix: stop printing stacktraces by default when ignoreFailures = true
Browse files Browse the repository at this point in the history
make changes from #266 enable by default

BREAKING CHANGE: stacktraces is not printed by default when `ignoreFailures = true`.
set `showStackTraces = true` explicitly if necessary.
  • Loading branch information
KengoTODA committed Oct 7, 2021
1 parent 8cb962b commit e739a30
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ spotbugsMain {
buildFile << """
spotbugs {
ignoreFailures = true
showStackTraces = true
}"""
when:
def arguments = [':spotbugsMain', '-is']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class SpotBugsExtension {
@Inject
SpotBugsExtension(Project project, ObjectFactory objects) {
ignoreFailures = objects.property(Boolean).convention(false);
showStackTraces = objects.property(Boolean).convention(true);
showStackTraces = objects.property(Boolean).convention(false);
showProgress = objects.property(Boolean);
reportLevel = objects.property(Confidence);
effort = objects.property(Effort);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void execute() {

if (params.getIgnoreFailures().getOrElse(Boolean.FALSE).booleanValue()) {
log.warn(message.toString());
if (params.getShowStackTraces().getOrElse(Boolean.TRUE).booleanValue()) {
if (params.getShowStackTraces().getOrElse(Boolean.FALSE).booleanValue()) {
log.warn("", e);
}
} else {
Expand Down

0 comments on commit e739a30

Please sign in to comment.