tflint icon indicating copy to clipboard operation
tflint copied to clipboard

Is there a way to use all existing rules

Open shchowdhury opened this issue 4 years ago • 3 comments

Hi, I am total newbie of tflint. trying out its features. Looking into https://github.com/terraform-linters/tflint/tree/master/docs/rules, so these rules are already built-in in the tflint binary. However, 3 is enabled by default. is there a shortcut that I use says to tflint, use all those (14 i believe) during execution.

Dont want to individually add each rule in the config file and enable them!

rule "terraform_naming_convention" { enabled = true }

rule "terraform_documented_variables" { enabled = true }

.....

shchowdhury avatar Feb 02 '21 07:02 shchowdhury

Since these rules will be cut out into plugins in the future, enabling/disabling each plugin may solve this problem.

wata727 avatar Feb 14 '21 07:02 wata727

Any news on this one? Any timeframe when the default rules will be packed in plugins?

tgdfool2 avatar Sep 27 '21 07:09 tgdfool2

So, is there an official answer to this question?

Zialus avatar Feb 03 '22 16:02 Zialus

Awesome, enabling all terraform plugin rules is now possible by upgrading to TFLint v0.40.0 and adding the following to your TFLint configuration:

plugin "terraform" {
  enabled = true
}

Note that preset = "recommended", which is now the default when you don't have an explicit "terraform" plugin configuration, already has more rules enabled than < v0.40.0.

Thank you, @wata727!

alexanderdavide avatar Sep 08 '22 07:09 alexanderdavide