0

我想从声纳中排除一些方法(出于分析目的)。

实际上是自动生成的equals()and hashCode()。没有使用花括号等,我并不总是想修复它们。有没有办法只排除某些方法的范围?

4

1 回答 1

1

You can give a try to the Switch Off Violations plugin: http://docs.codehaus.org/display/SONAR/Switch+Off+Violations+Plugin.

You cannot set exclusions on methods but on blocks of code. With "Block exclusion patterns":

  • Regular expression for start of block = public int hashCode()
  • Regular expression for end of block = }
于 2013-08-09T09:20:19.243 回答