False positive of S4165

I’m playing with SonarJS with eslint-plugin-sonar and see this false positive of S4165:

var dedentStringsArray = function (template) {
  // ...
  for (var i = 0; i < length; i++) {
    // ...
    for (var j = 2; j < lines.length; j += 2) { // <- Review this redundant assignment: "j" already holds the assigned value along all execution paths  sonar/no-redundant-assignments
      // ...
    }
  }
  // ...
};

j is not assigned in any other place.

1 Like

Hi Denis,
Thank you for bringing up this valid FP, we have opened an issue to track its resolution.