You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by eo...@apache.org on 2019/04/13 21:20:57 UTC
[maven-checkstyle-plugin] branch MCHECKSTYLE-366 updated: Fix test
This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch MCHECKSTYLE-366
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git
The following commit(s) were added to refs/heads/MCHECKSTYLE-366 by this push:
new 65b0774 Fix test
65b0774 is described below
commit 65b07742fa2aa852014f9a6ff04038f31a11ad12
Author: Enrico Olivelli <eo...@apache.org>
AuthorDate: Sat Apr 13 23:20:52 2019 +0200
Fix test
---
src/it/MCHECKSTYLE-137/checkstyle.xml | 1 -
src/it/MCHECKSTYLE-193/checkstyle.xml | 1 -
.../java/org/apache/maven/plugins/checkstyle/EmptyLoggingCheck.java | 6 ++++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/it/MCHECKSTYLE-137/checkstyle.xml b/src/it/MCHECKSTYLE-137/checkstyle.xml
index b3912e4..58fcec8 100644
--- a/src/it/MCHECKSTYLE-137/checkstyle.xml
+++ b/src/it/MCHECKSTYLE-137/checkstyle.xml
@@ -150,7 +150,6 @@ under the License.
<property name="caseIndent" value="0"/>
</module>
</module>
- <module name="SuppressionCommentFilter"/>
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
diff --git a/src/it/MCHECKSTYLE-193/checkstyle.xml b/src/it/MCHECKSTYLE-193/checkstyle.xml
index 38a6a0c..5886809 100644
--- a/src/it/MCHECKSTYLE-193/checkstyle.xml
+++ b/src/it/MCHECKSTYLE-193/checkstyle.xml
@@ -157,7 +157,6 @@ Checkstyle rules for Basis Technology.
<module name="RegexpHeader">
<property name="header" value="/* A Required Header */"/>
</module>
- <module name="SuppressionCommentFilter"/>
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
diff --git a/src/it/MCHECKSTYLE-338/empty-logging-check/src/main/java/org/apache/maven/plugins/checkstyle/EmptyLoggingCheck.java b/src/it/MCHECKSTYLE-338/empty-logging-check/src/main/java/org/apache/maven/plugins/checkstyle/EmptyLoggingCheck.java
index a17cfd7..8808477 100644
--- a/src/it/MCHECKSTYLE-338/empty-logging-check/src/main/java/org/apache/maven/plugins/checkstyle/EmptyLoggingCheck.java
+++ b/src/it/MCHECKSTYLE-338/empty-logging-check/src/main/java/org/apache/maven/plugins/checkstyle/EmptyLoggingCheck.java
@@ -20,7 +20,9 @@ package org.apache.maven.plugins.checkstyle;
*/
import java.io.File;
+import java.util.Collections;
import java.util.List;
+import java.util.TreeSet;
import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
@@ -35,9 +37,9 @@ public class EmptyLoggingCheck
protected void processFiltered( File file, List<String> lines )
throws CheckstyleException
{
- getMessageCollector().add( new LocalizedMessage( 0, 0, getMessageBundle(),
+ addMessages( new TreeSet<>( Collections.singleton( new LocalizedMessage( 0, 0, getMessageBundle(),
"EmptyLoggingCheck on file " + file.getName(), new Object[0],
- SeverityLevel.ERROR, getId(), getClass(), null ) );
+ SeverityLevel.ERROR, getId(), getClass(), null ) ) );
}
}