Uploaded image for project: 'Maven Checkstyle Plugin'
  1. Maven Checkstyle Plugin
  2. MCHECKSTYLE-211

allow inline configuration for checkstyle plugin

    XMLWordPrintableJSON

Details

    Description

      Make possible to not rely on an external module or file:

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-checkstyle-plugin</artifactId>
              <version>@pom.version@</version>
              <executions>
                <execution>
                  <id>check</id>
                  <phase>process-resources</phase>
                  <goals>
                    <goal>check</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <checkstyleRules>
                  <name>Checker</name>
                  <modules>
                    <module>
                      <name>TreeWalker</name>
                      <modules>
                        <module>
                          <name>EmptyBlock</name>
                        </module>
                      </modules>
                    </module>
                  </modules>
                </checkstyleRules>
              </configuration>
            </plugin>
      

      or (better) this one:

             <configuration>
                <logViolationsToConsole>true</logViolationsToConsole>
                <checkstyleRules>
                  <![CDATA[
                  <?xml version="1.0" encoding="UTF-8"?>
                  <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
                  <module name="Checker">
                    <module name="TreeWalker">
                      <module name="EmptyBlock"/>
                    </module>
                  </module>
                  ]]>
                </checkstyleRules>
              </configuration>
      

      Attachments

        1. CHECKSTYLE-inline.patch
          18 kB
          Romain Manni-Bucau
        2. CHECKSTYLE-inlineCDATA.patch
          10 kB
          Romain Manni-Bucau
        3. CHECKSTYLE-inlineCDATA.patch
          10 kB
          Romain Manni-Bucau

        Activity

          People

            struberg Mark Struberg
            rmannibucau Romain Manni-Bucau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: