-
-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for terraform-docs 0.8.0 with proper support for Terraform 0.12 syntax (bye-bye awk) #85
Merged
Merged
Added support for terraform-docs 0.8.0 with proper support for Terraform 0.12 syntax (bye-bye awk) #85
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8dbff1a
removed awk hacks
konstantin-recurly 7f529b1
removed awk hacks
konstantin-recurly e962c24
added terraform-docs check
konstantin-recurly 7f739ab
Merge branch 'master' of github.com:konstantin-recurly/pre-commit-ter…
konstantin-recurly e7a6117
added check if teraform-docs is installed
konstantin-recurly b3258a0
updated formatting
konstantin-recurly 7b73590
moved terraform-docs check
konstantin-recurly 2465b56
returned back terraform_docs_awk funtion
konstantin-recurly 15c6343
updated CHANGELOG.md
konstantin-recurly 3b85047
CHANGELOG.md update
konstantin-recurly f6486eb
cleaned CHANGELOG.md, replaced egrep with grep, improved Shell Style
konstantin-recurly 5f798cb
Simplified workaround for terraform-docs
antonbabenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
repos: | ||
- repo: git://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.2.3 | ||
rev: v2.4.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-executables-have-shebangs | ||
#- repo: git://github.com/jumanjihouse/pre-commit-hooks | ||
# rev: 1.11.2 | ||
# hooks: | ||
# - id: shellcheck | ||
# - id: shfmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
## [Unreleased] | ||
|
||
|
||
|
||
<a name="v1.22.0"></a> | ||
## [v1.22.0] - 2020-01-13 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not enable
hack_terraform_docs
when terraform-docs is>= v0.8.0
. This will allows us to maintain temporary 2 versions of terraform-docs.@antonbabenko @konstantin-recurly Any thoughts ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. It makes perfect sense to stay compatible for as long as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the logic and added the check for terraform-docs version.
It is checking if terraform-docs version is
>= v0.8.0
also added a check if terraform-docs is installed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are some testing results:
terraform-docs v0.7.0
terraform-docs v0.8.0
no terraform-docs installed
❯ terraform-docs version zsh: command not found: terraform-docs ❯ pre-commit run -a Terraform fmt............................................................Passed Terraform docs...........................................................Failed hookid: terraform_docs terraform-docs is required