-
Notifications
You must be signed in to change notification settings - Fork 167
Add "tflint" Hook #16
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
Conversation
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.
Thanks for your contribution! Same comment as the terraform validate PR.
Also, in the future, please split out commits for each PR so that the diff is not repeated across multiple PRs. If you need to build on older PRs, it is better to either hold off opening the PR, or open another PR against the original one. It makes it hard to review the actual changes when it is mixed with the other PR diffs.
hooks/tflint.sh
Outdated
export PATH=$PATH:/usr/local/bin | ||
|
||
for file in "$@"; do | ||
tflint `dirname $file` |
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.
Same issue as the terraform validate PR
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 work with files and directories. IMHO, if the tool may work with files, we should leverage on the pre-commit
's parallelization default.
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.
Sounds good. The only reason why I highlighted that was because you were using dirname
.
@yorinasub17 Sorry for the inconvenience, you are totally right. I did this way because I had to refer to the overall changes in my project somehow. But it's kind of selfish, there is no excuse for me. I'll split them up carefully. |
No worries! That was just a request.
The workflow I use is to commit each change set individually (using |
Another approach is to work backwards:
|
@yorinasub17 Please let me know if I can do anything else 🙇 |
You'll need to resolve the conflict now that I merged the |
@yorinasub17 Resolved |
@yorinasub17 Please let me know if I can do anything here 🙇 |
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.
Sorry for the delay (we were out on vacation during the holiday weeks).
The updated changes LGTM so will be merging this.
@yorinasub17 That's OK ⛄️ ❄️ 🏂 Thank you 🙇 Happy New Year! |
No description provided.