From 973fb04f5e02a0dc80b4d532dfa4448556c28ec2 Mon Sep 17 00:00:00 2001 From: Falko Modler Date: Wed, 8 Jul 2020 16:23:01 +0200 Subject: [PATCH] CheckMojo: reduce log to info when bug below threshold --- src/it/check-failThreshold/verify.groovy | 2 +- .../codehaus/mojo/spotbugs/SpotbugsViolationCheckMojo.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/it/check-failThreshold/verify.groovy b/src/it/check-failThreshold/verify.groovy index cc50632c..00cab90b 100644 --- a/src/it/check-failThreshold/verify.groovy +++ b/src/it/check-failThreshold/verify.groovy @@ -15,5 +15,5 @@ */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( '[WARNING] Medium: Unused public or protected field:' ) +assert buildLog.text.contains( '[INFO] Medium: Unused public or protected field:' ) assert buildLog.text.contains( '[ERROR] High: Found reliance on default encoding in UserMistakes' ) diff --git a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotbugsViolationCheckMojo.groovy b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotbugsViolationCheckMojo.groovy index bc97b2b6..197f1246 100644 --- a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotbugsViolationCheckMojo.groovy +++ b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotbugsViolationCheckMojo.groovy @@ -548,7 +548,7 @@ class SpotbugsViolationCheckMojo extends AbstractMojo { bugCountAboveThreshold += 1 log.error(logMsg) } else { - log.warn(logMsg) + log.info(logMsg) } }