VladRassokhin / intellij-hcl

HCL language support for IntelliJ platform based IDEs
Apache License 2.0
244 stars 47 forks source link

Parser bug around trailing commas in HCL2 #223

Closed VladRassokhin closed 5 years ago

VladRassokhin commented 5 years ago

I would like to report one very minor formatting issue, with trailing commas for HCL1 interpolation syntax/HCL2 functions. See screenshot below.

Screen Shot 2019-06-11 at 6 32 47 AM

Functions that can take variable arguments can end with trailing commas according to HCL grammar, I believe. But the plug-in complains the behaviour as an error. See references below.

It should either be a warning formatting or proposed hint to remove the trailing comma, I think. Please correct me if I am wrong.

Ref: https://www.terraform.io/docs/configuration-0-11/interpolation.html#merge-map1-map2- https://www.terraform.io/docs/configuration/functions.html

Originally posted by @jerrygb in https://github.com/VladRassokhin/intellij-hcl/issues/208#issuecomment-500785521

VladRassokhin commented 5 years ago

Fixed, will be available in next release (not sure about version number)