doc: refine --on-unmatched usage

Signed-off-by: Brian McGee <brian@bmcgee.ie>
This commit is contained in:
Brian McGee 2024-05-29 10:30:13 +01:00
parent 1b517c6502
commit bbe50fbe75
No known key found for this signature in database
GPG Key ID: D49016E76AD1E8C0
2 changed files with 5 additions and 3 deletions

View File

@ -22,7 +22,7 @@ type Format struct {
Version bool `name:"version" short:"V" help:"Print version."`
Init bool `name:"init" short:"i" help:"Create a new treefmt.toml."`
OnUnmatched log.Level `name:"on-unmatched" short:"u" default:"warn" help:"Log paths that did not match any formatters at the specified log level. Possible values are debug,info,warn,error,fatal."`
OnUnmatched log.Level `name:"on-unmatched" short:"u" default:"warn" help:"Log paths that did not match any formatters at the specified log level, with fatal exiting the process with an error. Possible values are <debug|info|warn|error|fatal>."`
Paths []string `name:"paths" arg:"" type:"path" optional:"" help:"Paths to format. Defaults to formatting the whole tree."`
Stdin bool `help:"Format the context passed in via stdin."`

View File

@ -26,7 +26,7 @@ Flags:
-v, --verbose Set the verbosity of logs e.g. -vv ($LOG_LEVEL).
-V, --version Print version.
-i, --init Create a new treefmt.toml.
-u, --on-unmatched=warn Log paths that did not match any formatters at the specified log level. Possible values are debug,info,warn,error,fatal.
-u, --on-unmatched=warn Log paths that did not match any formatters at the specified log level, with fatal exiting the process with an error. Possible values are <debug|info|warn|error|fatal>.
--stdin Format the context passed in via stdin.
--cpu-profile=STRING The file into which a cpu profile will be written.
```
@ -98,7 +98,9 @@ Create a new `treefmt.toml`.
### `-u --on-unmatched`
Log paths that did not match any formatters at the specified log level. Possible values are debug,info,warn,error,fatal.
Log paths that did not match any formatters at the specified log level, with fatal exiting the process with an error. Possible values are <debug|info|warn|error|fatal>.
[default: warn]
### `--stdin`