diff --git a/go.mod b/go.mod index bb2873a8a..4def6175a 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/hashicorp/go-uuid v1.0.2 github.com/hashicorp/go-version v1.4.0 github.com/hashicorp/hcl-lang v0.0.0-20211123142056-191cd51dec5b - github.com/hashicorp/hcl/v2 v2.10.1 + github.com/hashicorp/hcl/v2 v2.11.1 github.com/hashicorp/terraform-exec v0.15.0 github.com/hashicorp/terraform-json v0.13.0 github.com/hashicorp/terraform-registry-address v0.0.0-20210816115301-cb2034eba045 diff --git a/go.sum b/go.sum index 8223bc684..5b9c81c0c 100644 --- a/go.sum +++ b/go.sum @@ -270,8 +270,9 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hashicorp/hcl-lang v0.0.0-20211118124824-da3a292c5d7a/go.mod h1:0W3+VP07azoS+fCX5hWk1KxwHnqf1s9J7oBg2cFXm1c= github.com/hashicorp/hcl-lang v0.0.0-20211123142056-191cd51dec5b h1:UircH3n8tUnq881dS1EV/m+ZcIKjZq9jzl0M65PAdWU= github.com/hashicorp/hcl-lang v0.0.0-20211123142056-191cd51dec5b/go.mod h1:0W3+VP07azoS+fCX5hWk1KxwHnqf1s9J7oBg2cFXm1c= -github.com/hashicorp/hcl/v2 v2.10.1 h1:h4Xx4fsrRE26ohAk/1iGF/JBqRQbyUqu5Lvj60U54ys= github.com/hashicorp/hcl/v2 v2.10.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= +github.com/hashicorp/hcl/v2 v2.11.1 h1:yTyWcXcm9XB0TEkyU/JCRU6rYy4K+mgLtzn2wlrJbcc= +github.com/hashicorp/hcl/v2 v2.11.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= diff --git a/internal/state/module_test.go b/internal/state/module_test.go index 2b6ee4ee4..f27b91934 100644 --- a/internal/state/module_test.go +++ b/internal/state/module_test.go @@ -431,19 +431,19 @@ provider "blah" { "test.tf": { { Severity: hcl.DiagError, - Summary: "Argument or block definition required", - Detail: "An argument or block definition is required here.", + Summary: "Unclosed configuration block", + Detail: "There is no closing brace for this block before the end of the file. This may be caused by incorrect brace nesting elsewhere in this file.", Subject: &hcl.Range{ Filename: "test.tf", Start: hcl.Pos{ - Line: 4, - Column: 1, - Byte: 39, + Line: 2, + Column: 17, + Byte: 17, }, End: hcl.Pos{ - Line: 4, - Column: 1, - Byte: 39, + Line: 2, + Column: 18, + Byte: 18, }, }, }, @@ -485,8 +485,8 @@ dev = { "test.tfvars": { { Severity: hcl.DiagError, - Summary: "Invalid expression", - Detail: "Expected the start of an expression, but found an invalid expression token.", + Summary: "Missing expression", + Detail: "Expected the start of an expression, but found the end of the file.", Subject: &hcl.Range{ Filename: "test.tfvars", Start: hcl.Pos{ diff --git a/internal/terraform/parser/module_test.go b/internal/terraform/parser/module_test.go index f1a6bfd00..40ed985ac 100644 --- a/internal/terraform/parser/module_test.go +++ b/internal/terraform/parser/module_test.go @@ -69,12 +69,12 @@ func TestParseModuleFiles(t *testing.T) { "missing-brace.tf": { { Severity: hcl.DiagError, - Summary: "Argument or block definition required", - Detail: "An argument or block definition is required here.", + Summary: "Unclosed configuration block", + Detail: "There is no closing brace for this block before the end of the file. This may be caused by incorrect brace nesting elsewhere in this file.", Subject: &hcl.Range{ Filename: "missing-brace.tf", - Start: hcl.Pos{Line: 10, Column: 1, Byte: 207}, - End: hcl.Pos{Line: 10, Column: 1, Byte: 207}, + Start: hcl.Pos{Line: 1, Column: 40, Byte: 39}, + End: hcl.Pos{Line: 1, Column: 41, Byte: 40}, }, }, },