Skip to content

The CLI has contradictory message about directoryOrFile being required #1296

@marcinjahn

Description

@marcinjahn

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:

  • CSharpier Version:
  • Running CSharpier via: cli
  • Operating System: Fedora 40
  • .csharpierrc Settings: defaults
  • .editorconfig Settings: default

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions