check input error.
Closed this issue · 9 comments
I've set up the linter with the following settings:
- name: Fail on malformatted files
uses: devops-infra/action-format-hcl@v0.3.2
with:
check: true
write: false
I am getting the error attached in the screenshot.
Despite I set up 'write:false
'. Looks like it's ignoring it, then I get the error:
=> Searching for .hcl files
Error, -check and -write=true cannot be used together
Hello, thank you for using my action!
I'll have a look at it.
Maybe already I'll replace using those scripts with simply using Terragrunt, as it finally can format all .hcl and .tf files.
Thanks @ChristophShyper for your prompt response and action. I have a question:
I need it fails in case it find an error in the linting process. I thought using check input it fails but not.
Do you know how can achieve that goal?
See screenshot
Hello @jevalenciap .
You're right I recently removed set -e
from the dependent script it stopped failing on the first type of files.
But now I fixed it in origin and released v0.3.6
version where it's fixed, as I just tested.
Thank you so much! It's working fine now
Hello @ChristophShyper,
Sorry, but now the github action is always failing despite there are not linting errors:
I think it needs to fail once a linting error is found but not when there are not errors found.
May you please apply a fix?
Thanks in advance!
hi @jevalenciap I've tested it on all 4 possible scenarios and all work well for me.
Are you sure all your files are formatted properly?
Thanks @ChristophShyper, I don't know why it was failing but after removing a couple of files that were not longer needed, it's working fine.
Apologies for the inconveniences.
@jevalenciap No need to apologize. Thanks to you, I noticed an error in the script being used here.