belav / csharpier

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

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

Open belav opened 3 months ago

belav commented 3 months 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 3 months ago

Should the log level be an Global option?

stefannikolei commented 3 months ago

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