thaim / tflint-ruleset-formatter

TFLint ruleset for Terraform Language with more format checking
4 stars 1 forks source link

Rule idea: Check for empty files #31

Closed fatbasstard closed 1 year ago

fatbasstard commented 1 year ago

HI,

looking at adding this ruleset to our TFLint setup (since I live the strictness and consistency it adds) and saw somebody empty a .tf file.

My initial though: Is this rule already?

I would like a rule to check if there are empty .tf files present. They make it confusing when looking at the files (since it gives the impression resources are there).

thaim commented 1 year ago

Thank you for reaching out.

Checking for empty files seems like a good idea for this rule set. Unfortunately, this rule is not yet implemented. I'd be happy to merge it if you send a PR.

fatbasstard commented 1 year ago

Hi @thaim,

Cool, good to hear. I'm planning on creating rulesets myself in the future, so adding a new rule to an existing ruleset is good for me to get familiar with the setup/coding standards etc.

I'll see if I can get a PR in place