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 2018/12/17 13:01:08 UTC

[maven-checkstyle-plugin] branch MCHECKSTYLE-357 updated (2edfc79 -> 84acd48)

This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a change to branch MCHECKSTYLE-357
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git.


 discard 2edfc79  [MCHECKSTYLE-357] - also allow inline configuration for reporting
     add 0de3460  [MCHECKSTYLE-357] - Allow inline configuration for reporting
     new 84acd48  [MCHECKSTYLE-357] - Expand inline documentation

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (2edfc79)
            \
             N -- N -- N   refs/heads/MCHECKSTYLE-357 (84acd48)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/site/apt/examples/inline-checker-config.apt.vm | 74 ++++++++++++++++++++++
 src/site/apt/examples/multi-module-config.apt.vm   |  4 ++
 2 files changed, 78 insertions(+)


[maven-checkstyle-plugin] 01/01: [MCHECKSTYLE-357] - Expand inline documentation

Posted by eo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 84acd48fb1d659de37a9db5e44764a49b8800872
Author: Peter Lamby <pe...@web.de>
AuthorDate: Mon Dec 17 12:30:13 2018 +0100

    [MCHECKSTYLE-357] - Expand inline documentation
---
 src/site/apt/examples/inline-checker-config.apt.vm | 74 ++++++++++++++++++++++
 src/site/apt/examples/multi-module-config.apt.vm   |  4 ++
 2 files changed, 78 insertions(+)

diff --git a/src/site/apt/examples/inline-checker-config.apt.vm b/src/site/apt/examples/inline-checker-config.apt.vm
index c366829..ec64e52 100644
--- a/src/site/apt/examples/inline-checker-config.apt.vm
+++ b/src/site/apt/examples/inline-checker-config.apt.vm
@@ -86,3 +86,77 @@ Using an Inline Checkstyle Checker Configuration
 </project>
 +-----+
 
+Using a different header
+
+  The inline configuration works by writing the configuration to a file and passing that
+  file to checkstyle. This configuration file must contain a specific
+  {{{http://checkstyle.sourceforge.net/config.html#Configuration_XML_Structure}header}}.
+
+  We include one by default that is compatible with the included checkstyle version.
+
+  When you use a different checkstyle version than the the one that's included it might
+  be necessary for you to specify a different header:
+
++-----+
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <id>verify-style</id>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <logViolationsToConsole>true</logViolationsToConsole>
+          <checkstyleRules>
+            <module name="Checker">
+
+              <!-- Checks for Size Violations.                    -->
+              <!-- See http://checkstyle.sf.net/config_sizes.html -->
+              <module name="FileLength">
+                <property name="max" value="3500" />
+                <property name="fileExtensions" value="java"/>
+              </module>
+
+              <!-- Checks for whitespace                               -->
+              <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+              <module name="FileTabCharacter"/>
+
+              <module name="TreeWalker">
+                <module name="StaticVariableName"/>
+                <module name="TypeName">
+                  <property name="format" value="^_?[A-Z][a-zA-Z0-9]*$"/>
+                </module>
+              </module>
+            </module>
+          </checkstyleRules>
+          <checkstyleRulesHeader>
+<![CDATA[
+<!DOCTYPE module PUBLIC
+  "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
+  "https://checkstyle.org/dtds/configuration_1_3.dtd">
+]]>
+          </checkstyleRulesHeader>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>com.puppycrawl.tools</groupId>
+            <artifactId>checkstyle</artifactId>
+            <version>8.15</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+  ...
+</project>
++-----+
diff --git a/src/site/apt/examples/multi-module-config.apt.vm b/src/site/apt/examples/multi-module-config.apt.vm
index 1fc9bc1..034ea60 100644
--- a/src/site/apt/examples/multi-module-config.apt.vm
+++ b/src/site/apt/examples/multi-module-config.apt.vm
@@ -27,6 +27,10 @@
 
 Multimodule Configuration
 
+  Since version 2.12 of this Plugin you can also
+  {{{./inline-checker-config.html}inline}} the configuration directly in the
+  parent pom.
+
   Configuring the Checkstyle Plugin for use within large multimodule projects
   can be done, but it requires a little setup.