Skip to content

SuppressMessageAttribute not working with namespaces #152

@giggio

Description

@giggio

I am trying to uses the GlobalSuppressions file to suppress a specific rule on a specific namespace on my test project, like so:

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "CC0061", Scope = "namespace", Target = "CodeCracker.Test.Design", Justification = "No need for tests to have async sufix.")]

But it does not work. The diagnostic keeps being generated. The method specific works:

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "CC0061:TaskNameAsyncAnalyzer", Justification = "No need for tests to have async sufix.", Scope = "member", Target = "~M:CodeCracker.Test.Design.CopyEventToVariableBeforeFireTests.IgnoreMemberAccess")]

I guess this is a bug, right?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions