We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d49d67 commit 48003cdCopy full SHA for 48003cd
extract/parameter.go
@@ -165,11 +165,13 @@ func ParameterUsageDiagnostics(p types.Parameter) hcl.Diagnostics {
165
}
166
167
168
- diags = diags.Append(&hcl.Diagnostic{
169
- Severity: hcl.DiagError,
170
- Summary: fmt.Sprintf("Parameter contains %d invalid options", badOpts),
171
- Detail: "The set of options cannot be resolved, and use of the parameter is limited.",
172
- })
+ if badOpts > 0 {
+ diags = diags.Append(&hcl.Diagnostic{
+ Severity: hcl.DiagError,
+ Summary: fmt.Sprintf("Parameter contains %d invalid options", badOpts),
+ Detail: "The set of options cannot be resolved, and use of the parameter is limited.",
173
+ })
174
+ }
175
176
return diags
177
0 commit comments