Skip to content

NET-3876 Fix S6667 FN: Logging should pass exception not raised in IDE for Serilog #9806

Description

@MelDommer

Description

When our CI analysis runs we get the issues reported from SonarCloud for S6667 and the Visual Studio plugin seem to catch it.

However the Rider SonarQube for IDE plugin and the NuGet package seem to miss this.

Reproducer

using Serilog;
// ....
// ....
  catch (OperationCanceledException)
  {
      _logger.Warning("...");
  }

When CI runs, the issue is flagged in the CI analysis, and in SonarQube for Visual Studio it is caught immediately too.

It seems to not work with SonarQube for IDE (Rider 12.2.084584) or just the NuGet package. I installed the nuget package into the project and it didn't show up in Rider or Visual Studio. Then when installing the pluging for visual studio it did show up. I don't use Visual Studio but I setup visual studio to test it out.

Product and Version

SonarCloud, SonarAnalyzer.CSharp (10.25.0.139117), SonarQube for IDE (Rider 12.2.084584) & SonarQube for Visual Studio (VS2026, 10.2.0.16704)

Metadata

Metadata

Assignees

No one assigned

    Labels

    False NegativeRule is NOT triggered when it should be.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions