indents(hcl): fix indentation queries

This commit adds tests for hcl indentation and fixes various bugs
This commit is contained in:
Michael Hoffmann 2022-04-23 11:17:10 +02:00 committed by Stephan Seitz
parent 91f912f2d1
commit b1e8b61a94
9 changed files with 84 additions and 4 deletions

View file

@ -0,0 +1,6 @@
test {
x = {
1: "foo",
2: "bar",
}
}

View file

@ -0,0 +1,6 @@
test {
x = [
1,
2,
]
}

View file

@ -0,0 +1,7 @@
test {
/*
foo
bar
baz
*/
}

View file

@ -0,0 +1,4 @@
test {
x = ["foo", "bar"]
y = {"fizz": "buzz"}
}

View file

@ -0,0 +1,6 @@
test {
x = "foo"
}
test {
y = "bar"
}

View file

@ -0,0 +1,5 @@
test {
nest {
x = "bar"
}
}

View file

@ -0,0 +1,4 @@
# Issue #2590
locals {
titles = ["test0", "test1"]
}