1.2 KiB
1.2 KiB
Code Style
编码规范遵从于《阿里巴巴JAVA开发规约》,基于google style。
Guidelines
Alibaba-Java-Coding-Guidelines
Code Style File
Idea IDE
代码风格文件在源代码下的style/code-style-for-idea.xml文件中,开发者可以将其导入到Idea IDE中,并让IDE帮助您格式化代码。
Import Way/导入方式
Preferences/Settings --> Editor --> Code Style --> Schema --> Import Schema --> IntelliJ IDEA code style XML
checkstyle
Preferences/Settings --> Other Settings --> Checkstyle或者Preferences/Settings --> Tools --> Checkstyle- 在checkstyle插件中设置checkstyle版本至少为8.30,并将扫描作用域设置为
All resource(including tests) - 导入源代码下
style/CheckStyle.xml文件到checkstyle插件。 - 用checkstyle插件扫描你修改的代码。