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

Please provide

  • Operating system:Windows 11
  • SonarLint plugin version:10.5.0.78339
  • 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.

https://youtrack.jetbrains.com/issue/IJPL-995/Adding-a-ProblemDescriptor-to-a-file-for-its-entire-text-range-now-results-in-multiple-file-level-banners-being-added#focus=Comments-27-9892375.0-0

1 Like

Following some discussion with JetBrains, it seems that the issue is fixed on the latest EAP version of IntelliJ (IU-242.20224.91), and I can no longer reproduce it on my end. If the problem persists for you, please notify us.