Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: antonbabenko/pre-commit-terraform
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4ca61b10b70d746593c4ad1a193fd3a06d709781
Choose a base ref
..
head repository: antonbabenko/pre-commit-terraform
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f9f4da5bd4754805e3324c65fd173b0d24ecc366
Choose a head ref
Showing with 6 additions and 6 deletions.
  1. +6 −6 terraform_docs.sh
12 changes: 6 additions & 6 deletions terraform_docs.sh
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ terraform_docs() {
continue
fi

terraform-docs "$args" md ./ > "$tmp_file"
terraform-docs $args md ./ > "$tmp_file"

# Replace content between markers with the placeholder - https://stackoverflow.com/questions/1212799/how-do-i-extract-lines-between-two-line-delimiters-in-perl#1212834
perl -i -ne 'if (/BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK/../END OF PRE-COMMIT-TERRAFORM DOCS HOOK/) { print $_ if /BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK/; print "I_WANT_TO_BE_REPLACED\n$_" if /END OF PRE-COMMIT-TERRAFORM DOCS HOOK/;} else { print $_ }' "$text_file"
@@ -517,14 +517,14 @@ getopt() {

_getopt_help() {
cat <<-EOT >&2
Usage:
getopt <optstring> <parameters>
getopt [options] [--] <optstring> <parameters>
getopt [options] -o|--options <optstring> [options] [--] <parameters>
Parse command options.
Options:
-a, --alternative allow long options starting with single -
-l, --longoptions <longopts> the long options to be recognized
@@ -535,10 +535,10 @@ getopt() {
-s, --shell <shell> set quoting conventions to those of <shell>
-T, --test test for getopt(1) version
-u, --unquoted do not quote the output
-h, --help display this help and exit
-V, --version output version information and exit
For more details see getopt(1).
EOT
}