reviewdog / action-tflint

Run tflint with reviewdog on pull requests to enforce best practices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: ability to specify the tflint version to use

longnd opened this issue · comments

According to TFLint documentation, each TFLint version uses a specific Terraform version to do the linting - usually the latest Terraform version. But the written Terraform code isn't always that version, thus we have to use the right Tflint version to check.

TFLint works as a single binary because Terraform is embedded as a library. Note that this means that the version of Terraform used is determined for each TFLint version.
TFLint loads files differently than the installed Terraform, so an error can occur if the version of Terraform supported by TFLint is different from the installed Terraform.

This action always installs the latest Tflint version so false positives/negatives can occur.
Please support the ability to specify the expected TFLint version to use.

Hm... I think we might be able to have variables for the reviewdog and tflint that are automatically updated by action-depup or an automated tool.

I'll do some experiments and see how I can implement this!

@longnd #34 is adding this feature 🙂 I tested it and you can also see in this run on the PR that a custom version is indeed used!

I'll leave the PR open a little while for reviews, but I fully expect it to be merged by the end of next week.