reviewdog / action-tflint

Run tflint with reviewdog on pull requests to enforce best practices
MIT License
107 stars 22 forks source link

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

Open fujiya228 opened 10 months ago

fujiya228 commented 10 months ago

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

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.

wallhided commented 10 months ago

Faced with a same problem.

milldr commented 10 months ago

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 https://github.com/terraform-linters/tflint/pull/1940

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