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

Add option to filter diagnostics by id #1007

Merged
merged 3 commits into from Feb 26, 2021

Conversation

JoeRobich
Copy link
Member

Resolves #1006

@@ -49,6 +50,10 @@ internal static RootCommand CreateCommandLineOptions()
{
Argument = new Argument<string?>("severity") { Arity = ArgumentArity.ZeroOrOne }.FromAmong(SeverityLevels)
},
new Option(new[] { "--diagnostics" }, Resources.A_space_separated_list_of_diagnostic_ids_to_use_as_a_filter_when_fixing_code_style_or_3rd_party_issues)
{
Argument = new Argument<string[]>(() => Array.Empty<string>())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like it if we could provide a helpful message if this option is provide and we are not in a --fix-stlye or --fix-analyzers mode

@JoeRobich JoeRobich merged commit d4bedaf into dotnet:master Feb 26, 2021
@JoeRobich JoeRobich deleted the add-diagnostics-filter branch March 5, 2021 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to filter diagnostics being fixed by specifying a list of diagnostic ids
2 participants