comment-syntax
What it does
Section titled “What it does”Reports a // comment where # is the convention. The fix writes #.
Why it matters
Section titled “Why it matters”Both forms are valid in the language, but the style that the Terraform documentation and the formatter use is #. Comments in one style are easy to search for and look the same in every module.
Example
Section titled “Example”// old style# finex = 1 // trailing/* block */# old style# finex = 1 # trailing/* block */Configuration
Section titled “Configuration”hcl: lint: rules: comment-syntax: warn # off (default), warn, errorSuppress one line with sudsy-disable-next-line comment-syntax in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| tflint | terraform_comment_syntax |
full |