Implements http://jira.sonarsource.com/browse/RSPEC-1157 and replaces http://jira.sonarsource.com/browse/RSPEC-468
@Dinesh, here is an example of false-negative :
Yep well spotted, it's really a nightmare to implement this kind of checks, the AST is slightly different for every possible syntax.
Okie it's not fully reimplemented and much simpler - should cover all cases properly.
Works well Dinesh and even better than the PMD rule. I found the first version of the issue message more meaningful but this is subjective.
You're right, I'll slightly improve it.