From d4f1b034450ec0cf9c39747492436461f2f56cc6 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sat, 11 May 2024 04:01:05 +0900 Subject: [PATCH] Update docs --- docs/command-usage.md | 17 +++++++++-------- docs/config-file.md | 2 ++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/command-usage.md b/docs/command-usage.md index 9565f36..30907a2 100644 --- a/docs/command-usage.md +++ b/docs/command-usage.md @@ -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 diff --git a/docs/config-file.md b/docs/config-file.md index 45ba9ca..9edc0a8 100644 --- a/docs/config-file.md +++ b/docs/config-file.md @@ -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.