Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed May 10, 2024
1 parent b34df29 commit d4f1b03
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 9 additions & 8 deletions docs/command-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ All flags must be specified **before** any path arguments.

These flags adjust the command's mode of operation. All of these flags are booleans.

| Name | Flag | Example | Description |
| :------------ | :--------- | :-------------------------- | :-------------------------------------------------------- |
| Help | `-help` | `yamlfmt -help` | Print the command usage information. |
| Print Version | `-version` | `yamlfmt -version` | Print the yamlfmt version. |
| Dry Run | `-dry` | `yamlfmt -dry .` | Use [Dry Run](#dry-run) mode |
| Lint | `-lint` | `yamlfmt -lint .` | Use [Lint](#lint) mode |
| Quiet Mode | `-quiet` | `yamlfmt -dry -quiet .` | Use quiet mode. Only has effect in Dry Run or Lint modes. |
| Read Stdin | `-in` | `cat x.yaml \| yamlfmt -in` | Read input from stdin and output result to stdout. |
| Name | Flag | Example | Description |
| :------------ | :--------------- | :------------------------ | :-------------------------------------------------------- |
| Help | `-help` | `yamlfmt -help` | Print the command usage information. |
| Print Version | `-version` | `yamlfmt -version` | Print the yamlfmt version. |
| Print Config | `-resolved_conf` | `yamlfmt -resolved_conf` | Print the merged configuration to use. |
| Dry Run | `-dry` | `yamlfmt -dry .` | Use [Dry Run](#dry-run) mode |
| Lint | `-lint` | `yamlfmt -lint .` | Use [Lint](#lint) mode |
| Quiet Mode | `-quiet` | `yamlfmt -dry -quiet .` | Use quiet mode. Only has effect in Dry Run or Lint modes. |
| Read Stdin | `-in` | `cat x.yaml \| yamlfmt -in` | Read input from stdin and output result to stdout. |

### Configuration Flags

Expand Down
2 changes: 2 additions & 0 deletions docs/config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ If the flag `-global_conf` is passed, all other steps will be circumvented and t

In the `-conf` flag, the config file can be named anything. As long as it's valid yaml, yamlfmt will read it as a config file. This can be useful for applying unique configs to different directories in a project. The automatic discovery paths do need to use one of the known names.

In the `-resolved_conf` flag, merged config values will be printed.

## Command

The command package defines the main command engine that `cmd/yamlfmt` uses. It uses the top level configuration that any run of the yamlfmt command will use.
Expand Down

0 comments on commit d4f1b03

Please sign in to comment.