Open CC007 opened 4 months ago
As an IntelliJ plugin the invalid errors from Sonarlint may be suppressed from the manifold plugin. If Sonarlint is a JDK tool, not much can be done on my part if it isn't using the javac AST for analysis, which is fully formed with interpolation from manifold. I'll have a deeper look at sonarlist at some point.
As an IntelliJ plugin the invalid errors from Sonarlint may be suppressed from the manifold plugin.
Well, good thing that SonarLint is a plugin then: https://plugins.jetbrains.com/plugin/7973-sonarlint
In this code snippet:
The canonicalFileName is used in 2 places, however it is ONLY used in string interpolation. SonarLint doesn't understand how manifold added string interpolation, so it is giving a false positive that canonicalFileName is an unused local variable. Because of this, it also erroneously detects that the assignment to that variable is unused.
I don't know if I should file this bug here or on the SonarLint side. I think that the solution might be a combination of both.