阿里巴巴代码规范插件Alibaba Code Guidelines安装

这里写图片描述

在Work with中输入:
https://p3c.alibaba.com/plugin/eclipse/update

这里写图片描述

注意:
安装完成后它会提示你重启Eclipse, 点击确定即可.

重启之后:
这里写图片描述
这里写图片描述
这里写图片描述

这里写图片描述

提示:
我在安装完成功之后, 右键选择一个类进行扫描的时候, 没有任何反应, 找了半天发现P3C Result视图和Rule Detail中分别报了个错, 大致如下:

Plug-in com.alibaba.smartfox.eclipse.plugin was unable to load class com.alibaba.smartfox.eclipse.ui.RuleDetailView

解决:
删除eclipse下的/eclipse/configuration/org.eclipse.update/这个目录,重启Eclipse

温馨提示:
 在右键检查代码时, 建议每次选中某个具体的类来校验规范. 最好不要右键选中一个项目检查, 不要问我为什么吗, 我要去重启Eclipse了…

猜你喜欢

转载自blog.csdn.net/lx_nhs/article/details/79099582