belav / csharpier

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

The CLI has contradictory message about directoryOrFile being required #1296

Closed marcinjahn closed 4 months ago

marcinjahn commented 4 months ago

The directoryOrFile parameter is required for the command-line interface to work, however, the message in the output says that it might be ommited.

Environments:

Steps to reproduce: Run dotnet csharpier

Expected behavior:

It should print uniform message about parameters being required or not.

Actual behavior:

It prints:

>: dotnet csharpier
directoryOrFile is required when not piping stdin to CSharpier

dotnet-csharpier

Usage:
  dotnet-csharpier [options] [<directoryOrFile>...]

Arguments:
  <directoryOrFile>  One or more paths to a directory containing c# files to format or a c# file to format. If a path is not specified the current directory is used

# the rest doesn't matter....

Specifically, look at:

If a path is not specified the current directory is used

It isn't true. When path is not specified, the message above gets shown.