Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.39 KB

File metadata and controls

51 lines (37 loc) · 1.39 KB

REFL044

Expected attribute type

Topic Value
Id REFL044
Severity Warning
Enabled True
Category ReflectionAnalyzers.SystemReflection
Code GetCustomAttributeAnalyzer
IsDefinedAnalyzer

Description

Expected attribute type.

Motivation

ADD MOTIVATION HERE

How to fix violations

ADD HOW TO FIX VIOLATIONS HERE

Configure severity

Via ruleset file.

Configure the severity per project, for more info see MSDN.

Via #pragma directive.

#pragma warning disable REFL044 // Expected attribute type
Code violating the rule here
#pragma warning restore REFL044 // Expected attribute type

Or put this at the top of the file to disable all instances.

#pragma warning disable REFL044 // Expected attribute type

Via attribute [SuppressMessage].

[System.Diagnostics.CodeAnalysis.SuppressMessage("ReflectionAnalyzers.SystemReflection", 
    "REFL044:Expected attribute type", 
    Justification = "Reason...")]