maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bmarw...@apache.org
Subject [maven-checkstyle-plugin] 01/01: [MCHECKSTYLE-387] emit a warning when using an old version of checkstyle.
Date Mon, 07 Dec 2020 14:37:13 GMT
This is an automated email from the ASF dual-hosted git repository.

bmarwell pushed a commit to branch MCHECKSTYLE-387
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git

commit d3d528553ba3924c732e06465e75a754768795bc
Author: Benjamin Marwell <bmarwell@gmail.com>
AuthorDate: Thu Feb 27 06:51:54 2020 +0100

    [MCHECKSTYLE-387] emit a warning when using an old version of checkstyle.
---
 .../maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java   | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java
b/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java
index 4481506..94a01e0 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java
@@ -313,6 +313,13 @@ public class DefaultCheckstyleExecutor
         try
         {
             checker.setClassLoader( projectClassLoader );
+            /*
+             * MCHECKSTYLE-387: If the previous method call was successful, emit a warning
that the user is using
+             * an old version of checkstyle.
+             */
+            getLogger().warn( "Old version of checkstyle detected. Consider updating to >=
v8.30" );
+            getLogger().warn( "For more information see: "
+                + "https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/upgrading-checkstyle.html"
);
         }
         catch ( NoSuchMethodError ignored )
         {


Mime
View raw message