dotnet / format

Home for the dotnet-format command
MIT License
1.91k stars 172 forks source link

Fix CLI sln or proj argument name and description #2108

Closed dviererbe closed 4 months ago

dviererbe commented 4 months ago

The common localizable string SolutionOrProjectArgumentName has the same value as the string SolutionOrProjectArgumentDescription. This results in partially hard to read output of dotnet format --help.

I copied the values of the SDK project (see https://github.com/dotnet/sdk/tree/main/src/Cli/dotnet/xlf). I also copied translated values for SolutionOrProjectArgumentDescription.

Note: I can only confirm the correctnes of the german translation, but I trust the translations of the SDK project.


For reference see the dotnet format --help output with version 8.0.457901+28925c0e519d66c80328aacf973b74e40bb1d5bd:

Description:
  Formats code to match editorconfig settings.

Usage:
  dotnet-format [<The project or solution file to operate on. If a file is not specified, the command will search the current directory for one.>] [command] [options]

Arguments:
  <The project or solution file to operate on. If a file is not specified, the command will search the current   The project or solution file to operate on. If a file is not specified, the command will search the current 
  directory for one.>                                                                                            directory for one. [default: /home/dviererbe/Repositories/dotnet/]

Options:
  -?, -h, --help                                                           Show help and usage information
  --version                                                                Show version information
  --diagnostics                                                            A space separated list of diagnostic ids to use as a filter when fixing code style or 3rd party issues. []
  --exclude-diagnostics                                                    A space separated list of diagnostic ids to ignore when fixing code style or 3rd party issues. []
  --severity <error|info|warn>                                             The severity of diagnostics to fix. Allowed values are info, warn, and error.
  --no-restore                                                             Doesn't execute an implicit restore before formatting.
  --verify-no-changes                                                      Verify no formatting changes would be performed. Terminates with a non-zero exit code if any files would have been formatted.
  --include                                                                A list of relative file or folder paths to include in formatting. All files are formatted if empty. []
  --exclude                                                                A list of relative file or folder paths to exclude from formatting. []
  --include-generated                                                      Format files generated by the SDK.
  -v, --verbosity <d|detailed|diag|diagnostic|m|minimal|n|normal|q|quiet>  Set the verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]
  --binarylog <binary-log-path>                                            Log all project or solution load information to a binary log file.
  --report <report-path>                                                   Accepts a file path which if provided will produce a json report in the given directory.

Commands:
  whitespace <The project or solution file to operate on. If a file is not specified, the command will search      Run whitespace formatting. [default: /home/dviererbe/Repositories/dotnet/]
  the current directory for one.>
  style <The project or solution file to operate on. If a file is not specified, the command will search the       Run code style analyzers and apply fixes. [default: /home/dviererbe/Repositories/dotnet/]
  current directory for one.>
  analyzers <The project or solution file to operate on. If a file is not specified, the command will search the   Run 3rd party analyzers and apply fixes. [default: /home/dviererbe/Repositories/dotnet/]
  current directory for one.>
dviererbe commented 4 months ago

@JoeRobich (or someone else) I would like to fix this for .NET 6, 7 & 8. I am not familiar with the workflow in this repo. Do I have to open a PR against:

or is

enough?

JoeRobich commented 4 months ago

@dviererbe release/6.x will be enough as it will flow up.