您的位置:首页 > 其它

checkstyle插件问题总结

2012-12-08 16:54 246 查看
1.File contains tab characters (this is the first instance). :这一行有tab行距,用鼠标选中tab打出的空白处,ctrl+f,全部修改成双空格;

2.method def modifier at indentation level 2 not at correct indentation, 4:和第一点一样,checkstyle要求距离边距4个空格,把这行的前面所有空白去掉,然后敲4个空格就OK;

3.Line is longer than 120 characters (found 123).: 文字超长,换个行啥的就OK;

4.Static variable definition in wrong order.:顺序不对,需要调整:window-->preferences-->查找sort-->menbers sort order:上面的顺序调整一下,一般types第一位,static在普通的前面,方法最后,方法里构造在最前面;下面的勾上,顺序:public,protected,default,private;上面:经供参考:types,static fields,fields,initializers,constructors,static
initializers,static methods,methods,配置完成后在需要的类里面:右键-->source-->sort-->打钩-->确定,再次check;

5.Javadoc has empty description section. 没注释啊魂淡;

6.'XXXX' hides a field.:命名重复,换个名,推荐alt+shift+r改;

7.method call child at indentation level 8 not at correct indentation, 12:当前赋值可能方式不对,换个赋值方式瞧瞧;

8.Don't use trailing comments.:直译:不要搞笑吧亲;

9.'static' modifier out of order with the JLS suggestions.:老实点把final放在static 后面; 

10.Unnecessary parentheses around assignment right-hand side.:有个不必要的括号存在;

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  checkstyle