-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Research and implement rules/analyzers identification and filtering strategy #9823
Copy link
Copy link
Closed
Description
Background
In the early prototype we planned to have Rules short ids (https://github.com/dotnet/msbuild/pull/9735/files#diff-ffa5a8cc14988d03c021f4d451517d358aa148a11ef06068db7298ec7ceac914R24-R33) and Analyzers FriendlyNames. Plus possibly some other identifications (Rules Titles/Categories).
The scenarios where the identifications might be involved:
- Findings reporting - the report should nonambiguously point to the rule. Given the current VS error window design, we might be locked to the short id here (prefix + number).
- Individual rules configuration - e.g. setting the diagnostics level for a particular rule
- Group of rules configuration - e.g. muting all the rules in a same category/namespace/package - or whatever is decided as a good grouping dimension (if any - we might decide that only 1 by 1 is supported)
- Errors and execution time reporting for Analyzers - since the unit of the execution is Analyzer (not the Rule), we need some unique identification of the Analyzers as well.
- Clashes of identification within single build should be prevented. Clashes with well known Rules/Analyzers (specifically the ones we'll ship in-box, or that we might ship in foreseeble future) should be ideally prevented globaly - e.g. by reserving some specific prefixes and preventing registration of custom Analyzers/Rules with those.
There are some pre-existing lessons learned - e.g - dotnet/roslyn#40351 (comment)
Goals
- Research the options of identifying Rules and Anlyzers that satisfy the mentioned scenarios.
- Cross check with Roslyn team (or whoever was involved with original design) on gotchas and advices.
- Design and implement the identification of Rules and Analyzers and it's enforcement (e.g. preventing clashes, usage of reserved prefixes, etc.)
- Implement the group-configuration for rules
Related
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Fields
Give feedbackNo fields configured for issues without a type.