reviewdog / action-tflint

Run tflint with reviewdog on pull requests to enforce best practices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with TFLint Version v0.50.0: "Failed to load TFLint config; failed to load file: open .tflint.hcl: no such file or directory"

fujiya228 opened this issue · comments

Description

With TFLint version v0.50.0, the following error occurs:

Failed to load TFLint config; failed to load file: open .tflint.hcl: no such file or directory

I have confirmed that this error does not occur with version v0.49.0.
Additionally, the presence of the .tflint.hcl file has been verified in a previous step.

Steps to Reproduce

The issue occurs when running an action with TFLint version v0.50.0.

Workaround

The issue can be avoided by reverting to TFLint version v0.49.0.

with:
  tflint_version: "v0.49.0"

Expected Behavior

No error should occur when using TFLint version v0.50.0.

Environment Information

Actions

  • runs-on: ubuntu-latest
with:
  tflint_init: "true"
  working_directory: ${{ matrix.environments }}
  github_token: ${{ env.REVIEWDOG_GITHUB_API_TOKEN }}
  reporter: github-pr-review
  fail_on_error: "true"
  filter_mode: "nofilter"
  flags: "--format=checkstyle --config ../../.tflint.hcl"

While there's a possibility that the issue could be related to my environment or settings, your confirmation would be greatly appreciated.

Faced with a same problem.

TFLint added a "Bug Fix" with v0.50.0 that added .tflint.hcl as a requirement

BugFixes
Exit with an error if the explicitly passed .tflint.hcl does not exist by @wata727 in terraform-linters/tflint#1940

https://github.com/terraform-linters/tflint/releases/tag/v0.50.0