Skip to content
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

feat(terraform_docs): Drop support for terraform-docs <0.12.0 #717

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

MaxymVlasov
Copy link
Collaborator

@MaxymVlasov MaxymVlasov commented Sep 10, 2024

Description of your changes

Cleanup of old awk hacks introduced long time ago when terraform-docs wasn't able to work with terraform 0.12+.

How can we test changes

repos:
  - repo: https://github.com/antonbabenko/pre-commit-terraform
    rev: e40ffc76df4d24fa617c46094c934847334b12c0
    hooks:
      - id: terraform_docs
        args:
          - "--args=--lockfile=false"
          - --hook-config=--create-file-if-not-exist=true # Boolean. true or false

Copy link
Collaborator

@yermulnik yermulnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved since my commit suggestions are related to wording in comments only.

hooks/terraform_docs.sh Outdated Show resolved Hide resolved
hooks/terraform_docs.sh Outdated Show resolved Hide resolved
hooks/terraform_docs.sh Outdated Show resolved Hide resolved
Co-authored-by: George L. Yermulnik <[email protected]>
@MaxymVlasov MaxymVlasov merged commit 81e4572 into master Sep 11, 2024
5 checks passed
@MaxymVlasov MaxymVlasov deleted the drop_old_awk_hack branch September 11, 2024 16:55
antonbabenko pushed a commit that referenced this pull request Sep 11, 2024
# [1.95.0](v1.94.3...v1.95.0) (2024-09-11)

### Features

* **`terraform_docs`:** Drop support for `terraform-docs` <0.12.0 ([#717](#717)) ([81e4572](81e4572))
@antonbabenko
Copy link
Owner

This PR is included in version 1.95.0 🎉

ryan-at-ld added a commit to ryan-at-ld/pre-commit-terraform that referenced this pull request Sep 16, 2024
…1.95.0

A bug in the terraform-docs hook was introduced by the code changes in antonbabenko#717.  [A continue statement was added that is not preceded by a `popd` command](https://github.com/antonbabenko/pre-commit-terraform/blob/869a106a4c8c48f34f58318a830436142e31e10a/hooks/terraform_docs.sh#L216).  The bug is only triggered when the hook is processing multiple files where one (or more) of the files does not contain the terraform-docs marker statements.  The hook fails to process the remaining files because the working directory is not reset to the root of the repository.
MaxymVlasov pushed a commit that referenced this pull request Sep 17, 2024
…ut `terraform-docs` markers. Issue introduced in v1.95.0 (#720)

A bug in the terraform-docs hook was introduced by the code changes in #717.  [A continue statement was added that is not preceded by a `popd` command](https://github.com/antonbabenko/pre-commit-terraform/blob/869a106a4c8c48f34f58318a830436142e31e10a/hooks/terraform_docs.sh#L216).  The bug is only triggered when the hook is processing multiple files where one (or more) of the files does not contain the terraform-docs marker statements.  The hook fails to process the remaining files because the working directory is not reset to the root of the repository.
antonbabenko pushed a commit that referenced this pull request Sep 17, 2024
## [1.96.1](v1.96.0...v1.96.1) (2024-09-17)

### Bug Fixes

* **`terraform_docs`:** Fix issue with processing multiply files without `terraform-docs` markers. Issue introduced in v1.95.0 ([#720](#720)) ([2b1aec8](2b1aec8)), closes [#717](#717) [/github.com/antonbabenko/pre-commit-terraform/blob/869a106a4c8c48f34f58318a830436142e31e10a/hooks/terraform_docs.sh#L216](https://github.com//github.com/antonbabenko/pre-commit-terraform/blob/869a106a4c8c48f34f58318a830436142e31e10a/hooks/terraform_docs.sh/issues/L216)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants