bake/hclparser/gohcl: fix typo

Looks like we forked this code, including the typo. As we already modify
the code to add the `//nolint`, we may as well fix the typo itself instead.
https://github.com/hashicorp/hcl/blob/dfa124f3c93ff1764fda03702a7a9aa8c9db48d8/gohcl/decode_test.go#L417-L423

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-07-03 13:27:37 +02:00
parent 63bb3db985
commit 5da2ff5990
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -413,11 +413,10 @@ func TestDecodeBody(t *testing.T) {
} `hcl:"noodle,block"` } `hcl:"noodle,block"`
}{}), }{}),
func(gotI any) bool { func(gotI any) bool {
//nolint:misspell
// Generating two diagnostics is good enough for this one. // Generating two diagnostics is good enough for this one.
// (one for the missing noodle block and the other for // (one for the missing noodle block and the other for
// the JSON serialization detecting the missing level of // the JSON serialization detecting the missing level of
// heirarchy for the label.) // hierarchy for the label.)
return true return true
}, },
2, 2,
+1 -2
View File
@@ -52,8 +52,7 @@ func ImpliedBodySchema(val any) (schema *hcl.BodySchema, partial bool) {
switch { switch {
case field.Type.AssignableTo(exprType): case field.Type.AssignableTo(exprType):
//nolint:misspell // If we're decoding to hcl.Expression then absence can be
// If we're decoding to hcl.Expression then absense can be
// indicated via a null value, so we don't specify that // indicated via a null value, so we don't specify that
// the field is required during decoding. // the field is required during decoding.
required = false required = false