checkstyle的安装及使用

一、checkstyle的安装

1、下载checkstyle插件:http://sourceforge.net/projects/eclipse-cs/

2.将压缩包中的两个文件夹plugins和 features下面的文件分别拷贝到eclipse目录下面对应的plugins和features目录。

3.启动Eclipse,菜单栏选择Windows->Preferences->checkstyle

点击new,type选择external configuration file,location选择checkstyle.xml所在位置进行导入

二、checkstyle的使用

选中所测的项目,右键选择checkstyle->check code with checkstyle进行检测,出现251条warning。

posted @ 2015-05-21 19:39  yy_Black  阅读(215)  评论(0编辑  收藏  举报