False positive S1172 Sonar Lint

See attached image.

This only seems to happen when the file is first loaded in Visual Studio with the Sonar Lint extensions. After making an edit to those lines of code the error is removed.

Hey Greg.

Make sure to read this post before raising a thread here:

Specifically you are missing:

  • A code sample that is not a screenshot
  • Details on your SonarLint installation (what version are you using, are you connected to SonarQube/SonarCloud)?

Note: possible duplicate of this thread?

Based on the referenced thread it looks like that is the issue. It has been fixed in SonarC# but has not been released in SonarLint yet.

When exactly will this be fixed in sonarlint? its kind of annoying and keeps coming back.

Hey @StingyJack

A new version of SonarLint for Visual Studio has been published which includes the latest version of the C# analyzer. The latest version is v6.3 – are you still facing an issue on the latest version?

No, the extension was updated last night and its stopped with that S1172 FP nonsense. Thanks.