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

Feature Request: Support for Excluding Specific Subcommands with --skip in dotnet format #2204

Open
MohammadAminPourmoradian opened this issue Aug 3, 2024 · 0 comments

Comments

@MohammadAminPourmoradian

Description:
The dotnet format command currently supports three subcommands: whitespace, style, and analyzers. However, there is no option to exclude a specific subcommand while running the rest in a single command. This limitation forces users to run multiple commands to achieve desired formatting.

Proposed Improvement:
Introduce a new switch, --skip, to allow excluding specific subcommands while applying the rest in a single dotnet format command. For example:

dotnet format --skip whitespace

Example Scenario:
In a project, we want to run the dotnet format command without considering analyzers, but still include style and whitespace formatting. Currently, we are forced to run two separate commands:

dotnet format whitespace
dotnet format style

With the proposed --skip switch, we could achieve the same result with a single command:
dotnet format --skip analyzers

Benefits:

Simplified Workflow: Allows users to exclude a specific subcommand while running the remaining subcommands in one go.
Time-Saving: Reduces the number of commands needed to achieve desired formatting, saving time and effort.
Enhanced Control: Provides users with more flexibility over the formatting process, tailoring it to their specific needs.

Additional Notes:
An alternative could be to introduce an option that allows users to include or exclude multiple subcommands dynamically, offering greater customization and control.

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

No branches or pull requests

1 participant