diff --git a/README.md b/README.md index 291f5ba06..4c69a1b46 100644 --- a/README.md +++ b/README.md @@ -568,9 +568,9 @@ Unlike most other hooks, this hook triggers once if there are any changed files 1. `terraform_docs` and `terraform_docs_without_aggregate_type_defaults` will insert/update documentation generated by [terraform-docs](https://github.com/terraform-docs/terraform-docs) framed by markers: ```txt - + - + ``` if they are present in `README.md`. @@ -581,8 +581,8 @@ Unlike most other hooks, this hook triggers once if there are any changed files * create a documentation file * extend existing documentation file by appending markers to the end of the file (see item 1 above) * use different filename for the documentation (default is `README.md`) - * use the same insertion markers as `terraform-docs` by default. It will be default in `v2.0`. - To migrate to `terraform-docs` insertion markers, run in repo root: + * use the same insertion markers as `terraform-docs`. It's default starting from `v1.93`. + To migrate everything to `terraform-docs` insertion markers, run in repo root: ```bash grep -rl 'BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK' . | xargs sed -i 's/BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK/BEGIN_TF_DOCS/g' @@ -595,7 +595,7 @@ Unlike most other hooks, this hook triggers once if there are any changed files - --hook-config=--path-to-file=README.md # Valid UNIX path. I.e. ../TFDOC.md or docs/README.md etc. - --hook-config=--add-to-existing-file=true # Boolean. true or false - --hook-config=--create-file-if-not-exist=true # Boolean. true or false - - --hook-config=--use-standard-markers=true # Boolean. Defaults in v1.x to false. Set to true for compatibility with terraform-docs + - --hook-config=--use-standard-markers=true # Boolean. Defaults to true (v1.93+), false ( /dev/null && continue + replace_old_markers "$text_file" + # # If `--add-to-existing-file=true` set, check is in file exist "hook markers", # and if not - append "hook markers" to the end of file.