mirror of
https://github.com/hashicorp/terraform.git
synced 2026-02-03 20:50:59 -05:00
improve wording of comments
This commit is contained in:
parent
edfe22d479
commit
84eeb0a113
1 changed files with 5 additions and 3 deletions
|
|
@ -47,7 +47,10 @@ func (d *Deprecations) Validate(value cty.Value, module addrs.Module, rng *hcl.R
|
|||
return notDeprecatedValue, d.deprecationMarksToDiagnostics(deprecationMarks, module, rng)
|
||||
}
|
||||
|
||||
// ValidateExpressionDeep does the same as Validate but checks deeply nested deprecation marks as well.
|
||||
// ValidateExpressionDeep looks for deprecation marks deeply within the given value
|
||||
// and returns diagnostics for each deprecation found, unless deprecation warnings
|
||||
// are suppressed for the given module. It finds the most specific range possible for
|
||||
// each diagnostic.
|
||||
func (d *Deprecations) ValidateExpressionDeep(value cty.Value, module addrs.Module, expr hcl.Expression) (cty.Value, tfdiags.Diagnostics) {
|
||||
var diags tfdiags.Diagnostics
|
||||
unmarked, pvms := value.UnmarkDeepWithPaths()
|
||||
|
|
@ -100,9 +103,8 @@ func deprecationMarkToDiagnostic(depMark marks.DeprecationMark, subject *hcl.Ran
|
|||
return diag
|
||||
}
|
||||
|
||||
// ValidateConfig checks the given value for deprecation marks and returns diagnostics
|
||||
// ValidateConfig checks the given value deeply for deprecation marks and returns diagnostics
|
||||
// for each deprecation found, unless deprecation warnings are suppressed for the given module.
|
||||
// It checks for deeply nested deprecation marks as well.
|
||||
func (d *Deprecations) ValidateConfig(value cty.Value, schema *configschema.Block, module addrs.Module) (cty.Value, tfdiags.Diagnostics) {
|
||||
var diags tfdiags.Diagnostics
|
||||
unmarked, pvms := value.UnmarkDeepWithPaths()
|
||||
|
|
|
|||
Loading…
Reference in a new issue