On Saturday, 22 September 2012 10:43:01 UTC+12, Sam Minnée wrote:
If we can add a whitelist of any incompatible method names, then we can still include the test and use to ensure that no new names are introduced. Alternatively, we could only allow incompatible method names if they are @deprecated, but I don't know how hard that is with the sniffing framework.
Ages back I did some custom sniffs to check for method names. Since a lot of method naming depends on the usage it's a bit hard to fully automate it. Put it's possible to check that static methods are lower case named. Currently the ruleset doesn't check for it.
Checking for annotations, tricky, but it's as it's possible to make our own sniffs it should be possible. Would probably take some effort of getting it going.
Again: our goal should be to have an automated check for every potential objection to a pull request that we can push off human reviewers' plates, so I also support getting this into the CI build.
It might also safe guard against common code smells such as cyclomatic complexity, god methods etc.