Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research and implement rules/analyzers identification and filtering strategy #9823

Open
JanKrivanek opened this issue Mar 5, 2024 · 0 comments · May be fixed by #10088
Open

Research and implement rules/analyzers identification and filtering strategy #9823

JanKrivanek opened this issue Mar 5, 2024 · 0 comments · May be fixed by #10088
Assignees
Labels

Comments

@JanKrivanek
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants