Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 778 Bytes

terraform_comment_syntax.md

File metadata and controls

32 lines (20 loc) · 778 Bytes

terraform_comment_syntax

Disallow // comments in favor of #.

Example

# Good
// Bad
$ tflint
1 issue(s) found:

Warning: Single line comments should begin with # (terraform_comment_syntax)

  on main.tf line 2:
   2: // Bad

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.1.0/docs/rules/terraform_comment_syntax.md

Why

The Terraform language supports two different syntaxes for single-line comments: # and //. However, # is the default comment style and should be used in most cases.

How To Fix

Replace the leading double-slash (//) in your comment with the number sign (#).