-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update S1226: Change contract of the rule to make it become more relevant #630
Comments
Any news regarding this issue @fmallet and @Evangelink ? The initial intent of the rule is quite right and preventing one family of bugs. However, the implementation seems to be triggering even in cases where it should not. Example is linked list traversal: |
Hi @rymeskar, I created a new ticket from your comment. I am closing this one, as it was implemented but forgotten to be closed. |
This rule currently triggers an issue as soon as a method parameter is reassigned. With updated RSPEC-1226 this rule is supposed to raise an issue if an only if a method parameter, caught exception or foreach variable is reassigned without having been read before.
To be noted that this rule must be part of Sonar way and becomes a bug detection rule.
Moreover, rule RSPEC-3316 should also be updated to stop spotting such kind of issues.
The text was updated successfully, but these errors were encountered: