This is indeed problematic, there are multiple issues:
This rule should not appear as a ‘file level’ annotation (it should point to a specific range in the editor and not as a sticky banner at the top like in your screenshot)
We should clear the previous annotations at each analysis
We probably lack a maximum number of file-level annotations visible at a time, otherwise, it might become unreadable
We will look into these and keep you updated. I created these 2 tickets: ticket 1 - ticket 2
It might help to figure out… File “xyz” has 2000 lines, which is greater than… is also reported as a “file level” annotation and repeated if the file is kept open.
During editing of a source file there are temporarily invalid statements present. E.g. if I want to write an if statement I begin with if x ==, then I pause and figure out what the variable should be compared to. Then an error message appears at the top of the editor window. It says A parsing error occurred in this file and has a brown background color.
Until a few weeks ago, when I completed the faulty line, like e.g. if x == 0 {return nil} the error message on the top of the windows disappeared. So everything was fine.
However, since the introduction of SonarLint plugin V10.4.2.78113 the error message no longer disappears. It stays there, even if the faulty statement has been corrected.
When another incomplete line is temporarily present another error message appears in addition to the first one and another and another and another. They take up ever more space on top of the editor window and make editing effectively impossible. I have to close the editor window and reopen it to get rid of them.
As you can see the SonarLint symbol is green, so there are currently no errors in this source file. However, all the old error messages that appeared during editing are still there.
It would be great if the former behaviour that this kind of error message is removed when the faulty linie is corrected would be restored.
We effectively did not have the opportunity to fix this issue in release 10.5. If that’s too much of a problem, you can follow our documentation to downgrade to a version that does not have this issue. Sorry for the inconvenience.
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.