Skip to content

Latest commit

 

History

History
24 lines (23 loc) · 5.76 KB

Roslyn.Diagnostics.Analyzers.md

File metadata and controls

24 lines (23 loc) · 5.76 KB
Sr. No. Rule ID Title Category Enabled CodeFix Description
1 RS0001 Use SpecializedCollections.EmptyEnumerable() RoslyDiagnosticsPerformance True False Use SpecializedCollections.EmptyEnumerable()
2 RS0002 Use SpecializedCollections.SingletonEnumerable() RoslyDiagnosticsPerformance True False Use SpecializedCollections.SingletonEnumerable()
3 RS0004 Invoke the correct property to ensure correct use site diagnostics. Usage False False Invoke the correct property to ensure correct use site diagnostics.
4 RS0005 Do not use generic CodeAction.Create to create CodeAction RoslyDiagnosticsPerformance True False Do not use generic CodeAction.Create to create CodeAction
5 RS0006 Do not mix attributes from different versions of MEF RoslyDiagnosticsReliability True True Do not mix attributes from different versions of MEF
6 RS0013 Do not invoke Diagnostic.Descriptor RoslyDiagnosticsPerformance False False Accessing the Descriptor property of Diagnostic in compiler layer leads to unnecessary string allocations for fields of the descriptor that are not utilized in command line compilation. Hence, you should avoid accessing the Descriptor of the compiler diagnostics here. Instead you should directly access these properties off the Diagnostic type.
7 RS0016 Add public types and members to the declared API ApiDesign True False All public types and members should be declared in PublicAPI.txt. This draws attention to API changes in the code reviews and source control history, and helps prevent breaking changes.
8 RS0017 Remove deleted types and members from the declared API ApiDesign True False When removing a public type or member the corresponding entry in PublicAPI.txt should also be removed. This draws attention to API changes in the code reviews and source control history, and helps prevent breaking changes.
9 RS0019 SymbolDeclaredEvent must be generated for source symbols RoslyDiagnosticsReliability False False Compilation event queue is required to generate symbol declared events for all declared source symbols. Hence, every source symbol type or one of its base types must generate a symbol declared event.
10 RS0022 Constructor make noninheritable base class inheritable ApiDesign True False Constructor makes its noninheritable base class inheritable, thereby exposing its protected members.
11 RS0023 Parts exported with MEFv2 must be marked as Shared RoslyDiagnosticsReliability True True Part exported with MEFv2 must be marked with the Shared attribute.
12 RS0024 The contents of the public API files are invalid ApiDesign True False The contents of the public API files are invalid: {0}
13 RS0025 Do not duplicate symbols in public API files ApiDesign True False The symbol '{0}' appears more than once in the public API files.
14 RS0026 Do not add multiple public overloads with optional parameters ApiDesign True False Symbol '{0}' violates the backcompat requirement: 'Do not add multiple overloads with optional parameters'. See '{1}' for details.
15 RS0027 Public API with optional parameter(s) should have the most parameters amongst its public overloads. ApiDesign True False Symbol '{0}' violates the backcompat requirement: 'Public API with optional parameter(s) should have the most parameters amongst its public overloads'. See '{1}' for details.
16 RS0030 Do not used banned APIs ApiDesign True False The symbol has been marked as banned in this project, and an alternate should be used instead.
17 RS0031 The list of banned symbols contains a duplicate ApiDesign True False The list of banned symbols contains a duplicate.
18 RS0032 Test exports should not be discoverable RoslyDiagnosticsReliability False True Test exports should not be discoverable
19 RS0033 Importing constructor should be [Obsolete] RoslyDiagnosticsReliability True True Importing constructor should be [Obsolete]
20 RS0034 Exported parts should have [ImportingConstructor] RoslyDiagnosticsReliability True True Exported parts should have [ImportingConstructor]
21 RS0035 External access to internal symbols outside the restricted namespace(s) is prohibited ApiDesign True False RestrictedInternalsVisibleToAttribute enables a restricted version of InternalsVisibleToAttribute that limits access to internal symbols to those within specified namespaces. Each referencing assembly can only access internal symbols defined in the restricted namespaces that the referenced assembly allows.