cshardquid:S4487 & cshardquid:S1144 in razor code behind files

I did come across this post from 9 months ago, assume this is still soon™? C# analysis now finds issues in .razor and .cshtml files - Clean Code / Sonar Updates - Sonar Community (sonarsource.com)

It seems there is an issue when using SonarLint where we get false positives on rules like cshardquid:S4487 & cshardquid:S1144 about unused fields/methods even though they are used. Any ETA on when this will be fixed? It’s super annoying to get a warning every time I want to commit&push using Rider.

Hey Dave!

I think there are two separate issues here:

  • Analyzing .razor and .cshtml files, which as far as I understand still isn’t supported in SonarLint. After resolving the next point, I’ll come back to that (or ping a PM)
  • False positives on files that can be analyzed by SonarLint (non .razor or .cshtml files)

Am I correct?

In the case of the latter, it would be great if you could share some examples, or see if they match any existing FPs in the backlog (here are the searches for S4487 and S1144 respectively)