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
Add base linter test #13
Conversation
Do we need to check terraform and terragrunt code format by /assign @irbekrm |
Thank you for the PR @lonelyCZ !
That's a good question. I see that this PR includes some changes from What do you think? Otherwise this looks good, next thing could be to add a CI test that runs this test #3 |
The test is below
|
Thanks your suggestions, please review it again. /assign @irbekrm |
Signed-off-by: lonelyCZ <531187475@qq.com>
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.
Thank you @lonelyCZ !
I've tested the script and saw that it now picks up incorrect formatting!
/lgtm
terragrunt run-all init | ||
|
||
if terragrunt run-all validate; then | ||
echo 'Congratulations! All Terraform source files have passed staticcheck.' |
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 adding this! I think the positive success messages are nice to see 👍🏼
cd "${REPO_ROOT}" | ||
|
||
# Check terraform codes format | ||
if ! terraform fmt -recursive -diff -check; then |
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.
The -check
flag is a good find 👍🏼
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: irbekrm, lonelyCZ The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: lonelyCZ 531187475@qq.com
Fixes #2