Closed kmccarp closed 2 years ago
Update: This is a parsing issue, the prefix is missing before Normalize touches the AST.
Parsing the HCL in tests shows the space before binary operators is missing:
@Test
fun test() = assertParsePrintAndProcess(
"""
create_vnic_details {
assign_public_ip = (var.instance_visibility == "Private") ? false : true
}
""".trimIndent()
)
@Test
fun test2() = assertParsePrintAndProcess(
"""
resource "oci_core_instance" "app_instance" {
availability_domain = random_shuffle.compute_ad.result[count.index % length(random_shuffle.compute_ad.result)]
}
""".trimIndent()
)
Problem
HCL formatting appears to shift operators to the left when it shouldn't.
Expected behavior
HCL operators not be shifted to the left.
Example diff
Recipes in example diff:
References:
qqM97