<plugin>
<groupId>com.cosium.code</groupId>
<artifactId>git-code-format-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<googleJavaFormatOptions>
<aosp>true</aosp>
</googleJavaFormatOptions>
</configuration>
<executions>
<!-- On commit, format the modified java files -->
<execution>
<id>install-formatter-hook</id>
<goals>
<goal>install-hooks</goal>
</goals>
</execution>
<!-- On Maven verify phase, fail if any file
(including unmodified) is badly formatted -->
<execution>
<id>validate-code-format</id>
<goals>
<goal>validate-code-format</goal>
</goals>
</execution>
</executions>
</plugin>
代码规约和格式化工具
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 前言 nixgnauhcuy's blog[https://www.nixgnauhcuy.top/]所有文章除特...
- 2018年3月13日效果: 第一步下载 第四步给xcode应用添加格式化快捷键 如果您发现本文对你有所帮助,如果您...
- SwiftFormat[https://link.juejin.cn/?target=https%3A%2F%2F...