SonarJS rule S1226 does not report all issues in a file now

SonarQube 7.9.1 LTS
Upgraded SonarJS from 5.2.1 to 6.2.1 today and noticed that rule S1226 - Function parameters, caught exceptions and foreach variables’ initial values should not be ignored does not report all isses in a file anymore. It used to report all issues till version 5.2.1.

This is with version 5.2.1:

and this with version 6.2.1 - it just reports the first instance:

Was this behavior changed intentionally ? I do not see any such reference in release notes.

The change was intentional: the implementation of the rule has been replaced almost entirely in this commit. Before that, the rule was implemented in Java. After the change, a rule based on ESlint, implemented in TypeScript, was introduced as replacement. Here you can see the old message, and here is the new one. Indeed, it seems to be left unmentioned in the release notes, probably it was unintentionally omitted due to the large number of rules.

Thanks @Andrey_Tyukin, this was helpful. I think this change was important enough to be documented. In my project it led to reduction of 60 bugs and I was wondering if it was an unintentional change which would get fixed in later versions and then again increase the bug count.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.