Error using checkstyle/google_checks.xml with maven-checkstyle-plugin

后端 未结 3 1704
终归单人心
终归单人心 2021-01-17 18:03

I am trying to use checkstyles google_checks.xml with maven-checkstyle-plugin. If I use the google_checks.xml with the latest checkstyle intelliJ plugin everything is correc

相关标签:
3条回答
  • 2021-01-17 18:22

    I give a demo at

    https://github.com/favoorr/Maven-Checkstyle-Multimodule-Use

    Multi modules and use Google Chechstyle

    0 讨论(0)
  • 2021-01-17 18:28

    Maven checkstyle plugin uses checkstyle 5.7 (the first line of plugin description).

    Checkstyle 5.7 does not have this check (see checks package on grepcode).

    You need either to disable this check or to wait for official fix of MCHECKSTYLE-261.

    0 讨论(0)
  • 2021-01-17 18:30

    fixed this by updating the checkstyle-dependency manually to the latest stable version:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.13</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.latest.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <configLocation>${checkstyle.file.path}</configLocation>
                    <failOnViolation>false</failOnViolation>
                </configuration>
            </plugin>
    
    0 讨论(0)
提交回复
热议问题