-
-
Notifications
You must be signed in to change notification settings - Fork 586
feat(terraform_validate): Add support for running hook in git worktree
#993
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
Changes from 1 commit
a96a283
211d9cc
63ab2bc
a063ed2
9c438a2
6aa3c54
a8a98ab
8d02f62
993f492
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -20,6 +20,7 @@ function main { | |||
| common::parse_cmdline "$@" | ||||
| common::export_provided_env_vars "${ENV_VARS[@]}" | ||||
| common::parse_and_export_env_vars | ||||
| common::scrub_git_env | ||||
|
yermulnik marked this conversation as resolved.
Outdated
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't reproduce the worktree bug in this hook.
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There another thing that shows, both for But it's not an issue at all. 18:57 repro-hoo git:(repro-hoo +)
➜ gc
Terraform docs...........................................................Passed
Terraform validate with tflint...........................................Passed
Terraform fmt............................................................Failed
- hook id: terraform_fmt
- files were modified by this hook
main.tf
18:57 repro-hoo git:(repro-hoo !+)
✘1 ➜ gc
Terraform docs...........................................................Passed
Terraform validate with tflint...........................................Passed
Terraform fmt............................................................Passed
Terraform docs.......................................(no files to check)Skipped
Terraform validate with tflint.......................(no files to check)Skipped
Terraform fmt........................................(no files to check)Skipped
[repro-hoo 44cd287] fmt
2 files changed, 2 insertions(+), 6 deletions(-)
18:58 repro-hoo git:(repro-hoo) took 9s
➜ git fsck --no-progress | head
dangling tree bba236455e65937967031c5d25b02e11f5c252f5
18:58 repro-hoo git:(repro-hoo)
➜ git fsck --no-progress | head
dangling tree bba236455e65937967031c5d25b02e11f5c252f5
18:58 repro-hoo git:(repro-hoo)
➜ gc
Terraform docs...........................................................Failed
- hook id: terraform_docs
- files were modified by this hook
Terraform validate with tflint...........................................Passed
Terraform fmt............................................................Passed
18:58 repro-hoo git:(repro-hoo !+)
✘1 ➜ gc
Terraform docs...........................................................Passed
Terraform validate with tflint...........................................Passed
Terraform fmt............................................................Passed
Terraform docs.......................................(no files to check)Skipped
Terraform validate with tflint.......................(no files to check)Skipped
Terraform fmt........................................(no files to check)Skipped
[repro-hoo c115ce4] docs
2 files changed, 2 insertions(+), 2 deletions(-)
18:58 repro-hoo git:(repro-hoo) took 6s
➜ git fsck --no-progress | head
dangling tree a13f3782d35b8ce91a9d45f5b57acd390ea671a2
dangling tree bba236455e65937967031c5d25b02e11f5c252f5 |
||||
| # Support for setting relative PATH to .terraform-docs.yml config. | ||||
| for i in "${!ARGS[@]}"; do | ||||
| ARGS[i]=${ARGS[i]/--config=/--config=$(pwd)\/} | ||||
|
|
||||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -13,6 +13,7 @@ function main { | |||
| common::parse_cmdline "$@" | ||||
| common::export_provided_env_vars "${ENV_VARS[@]}" | ||||
| common::parse_and_export_env_vars | ||||
| common::scrub_git_env | ||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't reproduce the worktree bug in this hook.
Suggested change
|
||||
|
|
||||
| # JFYI: tflint color already suppressed via PRE_COMMIT_COLOR=never | ||||
|
|
||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.