Skip to content

Commit 0623c98

Browse files
committed
feedback
1 parent 1af1cce commit 0623c98

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

decoder/hover_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ import (
88
"testing"
99

1010
"github.com/google/go-cmp/cmp"
11+
"github.com/zclconf/go-cty-debug/ctydebug"
12+
"github.com/zclconf/go-cty/cty"
13+
1114
"github.com/hashicorp/hcl-lang/lang"
1215
"github.com/hashicorp/hcl-lang/schema"
1316
"github.com/hashicorp/hcl/v2"
1417
"github.com/hashicorp/hcl/v2/hclsyntax"
1518
"github.com/hashicorp/hcl/v2/json"
16-
"github.com/zclconf/go-cty-debug/ctydebug"
17-
"github.com/zclconf/go-cty/cty"
1819
)
1920

2021
func TestDecoder_HoverAtPos_noSchema(t *testing.T) {
@@ -236,10 +237,11 @@ func TestDecoder_HoverAtPos_nilBodySchema(t *testing.T) {
236237
},
237238
}
238239

239-
ctx := context.Background()
240240

241241
for i, tc := range testCases {
242242
t.Run(fmt.Sprintf("%d-%s", i, tc.name), func(t *testing.T) {
243+
ctx := context.Background()
244+
243245
f, pDiags := hclsyntax.ParseConfig([]byte(tc.config), "test.tf", hcl.InitialPos)
244246
if len(pDiags) > 0 {
245247
t.Fatal(pDiags)

decoder/semantic_tokens_expr_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ import (
66
"testing"
77

88
"github.com/google/go-cmp/cmp"
9+
"github.com/zclconf/go-cty/cty"
10+
911
"github.com/hashicorp/hcl-lang/lang"
1012
"github.com/hashicorp/hcl-lang/reference"
1113
"github.com/hashicorp/hcl-lang/schema"
1214
"github.com/hashicorp/hcl/v2"
1315
"github.com/hashicorp/hcl/v2/hclsyntax"
14-
"github.com/zclconf/go-cty/cty"
1516
)
1617

1718
func TestDecoder_SemanticTokensInFile_expressions(t *testing.T) {
@@ -1434,10 +1435,11 @@ EOT
14341435
},
14351436
}
14361437

1437-
ctx := context.Background()
1438-
14391438
for i, tc := range testCases {
14401439
t.Run(fmt.Sprintf("%d-%s", i, tc.name), func(t *testing.T) {
1440+
1441+
ctx := context.Background()
1442+
14411443
bodySchema := &schema.BodySchema{
14421444
Attributes: tc.attrSchema,
14431445
}

decoder/semantic_tokens_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,12 +1027,12 @@ resource "aws_instance" "app_server" {
10271027
},
10281028
End: hcl.Pos{
10291029
Line: 4,
1030-
Column: 25,
1030+
Column: 26,
10311031
Byte: 85,
10321032
},
10331033
},
10341034
},
1035-
{ // .index
1035+
{ // index
10361036
Type: lang.TokenTraversalStep,
10371037
Modifiers: lang.SemanticTokenModifiers{},
10381038
Range: hcl.Range{

0 commit comments

Comments
 (0)