Skip to content

Commit

Permalink
Use hash instead of double slashes for single line comments
Browse files Browse the repository at this point in the history
HCL syntax accepts both `#` and `//` for line comments, but `#` is more idiomatic.

This is also mentioned in Terraform documentation:

> The # single-line comment style is the default comment style and should be used in most cases. Automatic configuration formatting tools may automatically transform // comments into # comments, **since the double-slash style is not idiomatic.**

https://developer.hashicorp.com/terraform/language/syntax/configuration#comments
  • Loading branch information
jpenna authored and dbanck committed Oct 23, 2024
1 parent e520e7d commit e8bd3bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion language-configuration.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"comments": {
// symbol used for single line comment. Remove this entry if your language does not support line comments
"lineComment": "//",
"lineComment": "#",
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
"blockComment": ["/*", "*/"]
},
Expand Down

0 comments on commit e8bd3bd

Please sign in to comment.