-
Notifications
You must be signed in to change notification settings - Fork 389
Closed
Description
Introduction
Uneven commas can make terraform code confusing. On dictionaries, they should either be on all or none.
I would expect that tflint would raise an warning on this snippet of code:
locals {
a_dictionary = {
"one" = "fish"
"two" = "fish",
"red" = "fish"
"blue" = "fish"
}
}I would expect the two line to be flagged as the rest of the lines do not have commas.
Proposal
The rule should take these values:
all: All dictionary entries should end in a comma.none: All dictionary entries should not end in a comma.match: All the dictionary entries in a given dictionary should be the same; either all commas or all without commas.
References
None
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels