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

Plugin execution fails on error when using google_checks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

       
      I'm using the version 3.0.0 with Checkstyle 6.18.

      This is my initial configuration:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven.checkstyle.plugin.version}</version>
        <configuration>
          <failsOnError>true</failsOnError>
          <failOnViolation>true</failOnViolation>
        </configuration>
      </plugin>

      Running mvn checkstyle:checkstyle will fail the build since there are checkstyle errors. This is expected. 

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (default-cli) on project demo: Failed during checkstyle execution: There are 311 errors reported by Checkstyle 6.18 with sun_checks.xml ruleset. -> [Help 1]

      However, when I use google_checks.xml the build succeeds without any error (checkstyle-report.xml still shows the issues).

       

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven.checkstyle.plugin.version}</version>
        <configuration>
          <configLocation>google_checks.xml</configLocation>
          <failsOnError>true</failsOnError>
          <failOnViolation>true</failOnViolation>
        </configuration>
      </plugin>

       

      My expectation would be that the build fails when I use the google_checks.xml configuration.

      https://stackoverflow.com/questions/50040980/checkstyle-maven-plugin-doesnt-fail-on-error-when-using-google-checks

      Attachments

        Activity

          People

            Unassigned Unassigned
            martinschneider Martin Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: