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
Command line argument for solution/project as positional argument #681
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows to specify the workspace
as first argument:
dotnet-format Solution.sln --verbosity d
dotnet-format --verbosity d Solution.sln
dotnet-format Solution.sln -w Project.scproj
At the moment the -w
option takes precedence over the positional argument.
@MaStr11 Thanks for implementing this! This transition would be a awkward for a little while, but I feel it is an improvement overall. I think we should consider what the options would be if we were starting from scratch. Maybe it would look something like the following:
So to help us reach this goal, it would be nice to provide the user with some errors and warnings.
Later we can make the breaking change that What are your thoughts about adding the |
@JoeRobich I can definitely do that. I intentionally only did the most basic implementation to get the discussion started. I like the deprecation idea. I will start implementing now and will get back to you later. |
I am also in favor of making a breaking change here and just bumping the version number |
src/Program.cs
Outdated
|
||
workspace ??= project; | ||
if (!string.IsNullOrEmpty(folder) && !string.IsNullOrEmpty(workspace)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is now done in the validator (ValidateWorkspaceAndFolder
). Should I remove it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do. =)
Ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Command line argument for solution/project as positional argument
Fixes #489