Replies: 1 comment
-
Rule configuration is kept intentionally minimal. You can use There's a proposal to have these annotations also work at the block level: terraform-linters/tflint#1641. In which case you'd be able to ignore violations across all locals in a given block. Whereas currently you'd have to include it on each unused local value expression. For generic boilerplate a file-level annotation might be suitable too. I don't anticipate adding a rule config attribute for which block types to check such that you could ignore all unused locals in all blocks. I'd rather invest that time in making ignores more flexible versus implementing granular opt-outs in specific rules. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there an ability to specify which unused
terraform_unused_declarations
can be set.I would like the ability to define say
local {foo = "bar"}
, and not havetflint
complain that this local is being not used. Due to some complex conditionals that are being used for a handful of similar repos I have, I would like to be able to create locals even though they may not be used.I know I can disable this ruleset, but like it's use case for variables and data sources (just don't want it for locals due to my unique case and module usage)
Beta Was this translation helpful? Give feedback.
All reactions