Skip to content
New issue

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

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

Already on GitHub? # 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 force-pushed the add-diagnostics-filter branch from 4b40a17 to ed79a06 Compare February 26, 2021 16:43
@JoeRobich JoeRobich merged commit d4bedaf into dotnet:master Feb 26, 2021
@JoeRobich JoeRobich deleted the add-diagnostics-filter branch March 5, 2021 21:05
# for free to join this conversation on GitHub. Already have an account? # 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