Kev*_*ith 5 java checkstyle maven
如何在 Maven 构建时强制执行代码样式检查?
特别是,我想配置两个 Maven 构建以使用这两个:
如何配置我的 Maven 构建以在代码样式违规时失败?
当您在 pom.xml 中配置插件时,您应该能够设置failOnViolation。
编辑:
啊,我明白了...据我所知,Maven 不存在Google Code Style插件。我想我会考虑编写自己的 Maven 插件,它会执行类似于 checkstyle 插件的操作。
https://maven.apache.org/guides/introduction/introduction-to-plugins.html 和 https://maven.apache.org/plugins/maven-checkstyle-plugin/source-repository.html
编辑2:
我想另一个选择是找到一种方法将 IntelliJ Codestyle xml 转换为 checkstyle xml,然后使用 maven-checkstyle-plugin 根据这些规则失败。
| 归档时间: |
|
| 查看次数: |
3282 次 |
| 最近记录: |