-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Sonar
springside edited this page May 3, 2012
·
41 revisions
##Overview Sonar -- an open platform to manage code quality. 是SCM, CI, Issue Tracker和Wiki外,另一个必不可少的项目管理软件.
什么maven site, 什么Jenkins插件,和它比都弱爆了。
SpringSide的Profile在Soanr 2.13.1的Sonar way with Findbugs规则上进行修改。 规则已导出到support/sonar目录里。
###Checkstyle changes
- Enable "JavaNCSS", classMaximum from 1500 to 500, fileMaximum from 2000 to 600-- 排除注释后的每个方法/类的最大代码行数。methodMaximum保持50的默认值。
- Enable "Nested For Depth", max from 1 to 3 -- if/else/for/while等嵌入代码的层数。
- Enable "Avoid Inline Conditionals" (Optional)
- Enable "Array Type Style"(Optional)
- Enable "Declaration Order", from Info to Minor (Optional)
- Change "Redundant Throws" allow uncheked=true (Optional)
- Change "Visibility Modifier" protectedAllowed=true , from Major to Info
- Change "Magic Number" from Minor to Info
- Disable "Final Class"
###PMD changes
- Disable "Avoid Throwing Raw Exception Types"
- Disable "Signature Declare Throws Exception"
###FindBugs changes
- Disable "Bad practice - Method invoked that should be only be invoked inside a doPrivileged block"
- Disable "Correctness - Field not initialized in constructor"
- Disable "Malicious code vulnerability - May expose internal representation by incorporating reference to mutable object"(Optional)
- Disable "Malicious code vulnerability - May expose internal representation by returning reference to mutable object"(Optional)