belav / csharpier

CSharpier is an opinionated code formatter for c#.
https://csharpier.com
MIT License
1.32k stars 89 forks source link

Rework the CLI to properly use commands + arguments. #1321

Open belav opened 3 weeks ago

belav commented 3 weeks ago

Currently all arguments are available to csharpier but not all of them apply depending on what you are trying to do with csharpier.

Reworking the cli to use the subcommands from System.CommandLine will help with this.

Some examples of commands reworked

dotnet csharpier format . --loglevel None

dotnet csharpier check . --loglevel None

dotnet csharpier server --port 30000

dotnet csharpier pipe-files

Consider also removing the need to prefix things with dotnet, it is an option when building/publishing a dotnet tool.

stefannikolei commented 2 weeks ago

Should the log level be an Global option?

stefannikolei commented 2 weeks ago

I would work on this. Could we define the available commands with corresponding options in here?