Sonar JS rule firing a false positive - Unused assignments should be removed

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) - SonarQube - 8.9.6
  • what are you trying to achieve - Running scan on JS files
  • what have you tried so far to achieve this - Rule firing when it is not supposed to.
    The variables are not re-assigned without being used; But they are within ‘If block’ which is a valid stmt.


Welcome to the community!

It looks like you’re trying to report a false positive. Could you provide

  • the rule
  • the code where an issue is raised and you believe it shouldn’t be?