eclipse 、idea安装阿里巴巴代码规范插件 痛定思痛。 2022-05-21 10:11 311阅读 0赞 # Eclipse 安装阿里巴巴代码规范插件 # # 1. 选择 Install New Software # # ![getContent_isCommondto_true_attachGuid_e4713e5b-9f69-40ec-a350-e99c4b120103][] # # 2. 配置更新源[https://p3c.alibaba.com/plugin/eclipse/update][https_p3c.alibaba.com_plugin_eclipse_update] # **![getContent_isCommondto_true_attachGuid_e9ae4b9e-9ea3-479f-8d9b-da9db5ae67f9][]** **3.****安装插件** **![getContent_isCommondto_true_attachGuid_2633f8f7-6da1-408b-aa50-07755593290b][]** **4.****重启,插件生效** ![getContent_isCommondto_true_attachGuid_2eb8fa5b-b879-42b4-a600-970ca160a561][]**![getContent_isCommondto_true_attachGuid_01f60a90-95b1-450d-8c7e-279f81bf796c][]** **IDEA** **下如何使用?** **1.****打开** **IDEA** **,选择** **File - Settings - Plugins - Browse repositories** 打开 IDEA,选择 File - Settings - Plugins - Browse repositories 后,输入 alibaba 选中 Alibaba Java Coding Guidelines,点击 Install。 ![getContent_isCommondto_true_attachGuid_39ce502a-737b-4236-a409-dc3b97a3eb30][] **2.****重启****IDEA****,开始使用** 安装后,会提示你重启 IDEA 已启用插件,重启后就可以在你的项目上疯狂点击右键了,当然菜单栏也会出现俩按钮,它有个快捷键是Ctrl+Shift+Alt+J。 ![checkStart][] 选中某一个类,或者在这个类里边右键也可以 ![getContent_isCommondto_true_attachGuid_427daa32-e0eb-4d08-85b9-f7d713bea2ff][] **3.****扫描出坏代码** 扫描代码后,将不符合规约的代码按 **Blocker/Critical/Major** 三个等级显示在下方,双击可以定位至代码处,右侧窗口还有针对代码的批量修复功能。 ![getContent_isCommondto_true_attachGuid_73252b73-ffa8-4193-989a-14191ed8fe46][] [getContent_isCommondto_true_attachGuid_e4713e5b-9f69-40ec-a350-e99c4b120103]: https://oa.epoint.com.cn:8080/OA9/rest/frame/base/attach/attachAction/getContent?isCommondto=true&attachGuid=e4713e5b-9f69-40ec-a350-e99c4b120103 [https_p3c.alibaba.com_plugin_eclipse_update]: https://p3c.alibaba.com/plugin/eclipse/update [getContent_isCommondto_true_attachGuid_e9ae4b9e-9ea3-479f-8d9b-da9db5ae67f9]: https://oa.epoint.com.cn:8080/OA9/rest/frame/base/attach/attachAction/getContent?isCommondto=true&attachGuid=e9ae4b9e-9ea3-479f-8d9b-da9db5ae67f9 [getContent_isCommondto_true_attachGuid_2633f8f7-6da1-408b-aa50-07755593290b]: https://oa.epoint.com.cn:8080/OA9/rest/frame/base/attach/attachAction/getContent?isCommondto=true&attachGuid=2633f8f7-6da1-408b-aa50-07755593290b [getContent_isCommondto_true_attachGuid_2eb8fa5b-b879-42b4-a600-970ca160a561]: https://oa.epoint.com.cn:8080/OA9/rest/frame/base/attach/attachAction/getContent?isCommondto=true&attachGuid=2eb8fa5b-b879-42b4-a600-970ca160a561 [getContent_isCommondto_true_attachGuid_01f60a90-95b1-450d-8c7e-279f81bf796c]: https://oa.epoint.com.cn:8080/OA9/rest/frame/base/attach/attachAction/getContent?isCommondto=true&attachGuid=01f60a90-95b1-450d-8c7e-279f81bf796c [getContent_isCommondto_true_attachGuid_39ce502a-737b-4236-a409-dc3b97a3eb30]: https://oa.epoint.com.cn:8080/OA9/rest/frame/base/attach/attachAction/getContent?isCommondto=true&attachGuid=39ce502a-737b-4236-a409-dc3b97a3eb30 [checkStart]: https://oa.epoint.com.cn:8080/OA9/rest/frame/base/attach/attachAction/getContent?isCommondto=true&attachGuid=660cbb89-3c57-434e-943c-dcdcfe9d3e1a [getContent_isCommondto_true_attachGuid_427daa32-e0eb-4d08-85b9-f7d713bea2ff]: https://oa.epoint.com.cn:8080/OA9/rest/frame/base/attach/attachAction/getContent?isCommondto=true&attachGuid=427daa32-e0eb-4d08-85b9-f7d713bea2ff [getContent_isCommondto_true_attachGuid_73252b73-ffa8-4193-989a-14191ed8fe46]: https://oa.epoint.com.cn:8080/OA9/rest/frame/base/attach/attachAction/getContent?isCommondto=true&attachGuid=73252b73-ffa8-4193-989a-14191ed8fe46
还没有评论,来说两句吧...