-
-
Notifications
You must be signed in to change notification settings - Fork 541
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
fix: Print out the full path in tflint when run through pre-commit #357
Changes from 3 commits
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 |
---|---|---|
|
@@ -36,7 +36,7 @@ function per_dir_hook_unique_part { | |
|
||
# pass the arguments to hook | ||
# shellcheck disable=SC2068 # hook fails when quoting is used ("$arg[@]") | ||
tfsec ${args[@]} | ||
tfsec ${args[@]} "$dir_path" | ||
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'm not quite sure since I don't use
Could you please verify this hook and put dir arg before the rest of args to align with |
||
|
||
# return exit code to common::per_dir_hook | ||
local exit_code=$? | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ function per_dir_hook_unique_part { | |
|
||
# pass the arguments to hook | ||
# shellcheck disable=SC2068 # hook fails when quoting is used ("$arg[@]") | ||
terragrunt hclfmt ${args[@]} | ||
terragrunt hclfmt ${args[@]} "$dir_path" | ||
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. Based on https://terragrunt.gruntwork.io/docs/reference/cli-options/#hclfmt this wouldn't work for |
||
|
||
# return exit code to common::per_dir_hook | ||
local exit_code=$? | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ function per_dir_hook_unique_part { | |
|
||
# pass the arguments to hook | ||
# shellcheck disable=SC2068 # hook fails when quoting is used ("$arg[@]") | ||
terrascan scan -i terraform ${args[@]} | ||
terrascan scan -i terraform ${args[@]} "$dir_path" | ||
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. To provide target working directory to
Please fix. |
||
|
||
# return exit code to common::per_dir_hook | ||
local exit_code=$? | ||
|
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.
Hmm, not mention that. Lmc
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.
Yeah, with that change it can work, but need to check that all hooks will work properly
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.
TFLint can't find TF modules by relative
source
withoutpushd
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.
✅ Work as expected
☑️ - Able to check only passed, not fail scenario
✖️ - work, but not print full path
❌ - failed to start
Not checked
✅
checkov
(python, not affected hook)✅
infracost_breakdown
✅
terraform_docs_replace
(deprecated, python, not affected hook)✖️
terraform_docs_without_aggregate_type_defaults
✖️
terraform_docs
✅
terraform_fmt
❌
terraform_providers_lock
❌
terraform_tflint
✅
terraform_tfsec
☑️
terraform_validate
✖️
terragrunt_fmt
☑️
terragrunt_validate
❌
terrascan