Skip to content

Some rules can no longer be silenced with an .editorconfig file in .NET 7 #6281

@billybraga

Description

@billybraga

Analyzer

Diagnostic ID: CA1848: Use the LoggerMessage delegates (among others)

Analyzer source

SDK: Built-in CA analyzers in .NET 7 SDK

Version: SDK 7.0.100

Describe the bug

Some rules' severity can no longer be set to none with a global .editorconfig file in .NET 7, but it could in .NET 6.

Steps To Reproduce

Build this solution with .NET 7.

Expected behavior

The Net7ProjectWithEditorConfigIgnore project builds successfully, like its equivalent in .NET 6.

Actual behavior

The project Net7ProjectWithEditorConfigIgnore fails to build because of CA1848 (CA1303 was successfully silenced, as we can see by the fact that Net7ProjectWithoutEditorConfigIgnore fails with CA1303).

Additional context

See the .editorconfig. It sets to none the severity of CA1303 and CA1848 in the Net7ProjectWithEditorConfigIgnore folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions