Warning on unit test file containing no tests appears multiple times and doesn't disappear

Please provide

  • Operating system:Windows 11
  • SonarLint plugin version:
  • Programming language you’re coding in: JavaScript
  • Is connected mode used:Yes
    • Connected to SonarCloud or SonarQube (and which version): SonarQube 10.4.1 (build 88267)

And a thorough description of the problem / question:

There’s this warning: Add some tests to this file or delete it. (javascript:S2187)

It appears whenever I delete all of a file’s tests (because the reference file was deeply refactored, for example), and it appears many times in succession over a few seconds/minutes as I write new describe statements and such, each time stacking. I’ve had it get as bad as me only having a few lines of code left in my viewport.

It’s already weird that there are many copies of the warning, but it’s even weirder that they don’t disappear event when I add tests to the file and the warnings are no longer relevant.

Hey there!

Take a look here:

1 Like

Thanks for pointing me in that direction! The bug still seems to happen for me, so I’ve posted a comment to reopen the issue on JetBrains’s side.