规范JAVA开发,Checkstyle使用
一. 统一编辑器格式化格式 下载code style 文件: code_style.xml IDEA 配置 在IntelliJ IDEA -> Preference -> Editor -> JAVA-> Code Style -> Java-> Scheme中,import code_style.xml 文件. 配置每次提交,进行自动format IntelliJ IDEA -> Preference -> Version Control -> Commit 中, 配置 Reformat Code 和 Optimize Imports 二. 使用Checkstyle工具 下载Checkstyle文件,放入项目checkstyle文件夹中: checkstyle.xml checkstyle-suppressionis.xml 在maven中,引入checkstyle插件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 <plugin> <groupId>org....