From 84eeb0a11368680521baf7bbdbb7aba348366f5e Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Fri, 23 Jan 2026 13:37:58 +0100 Subject: [PATCH] improve wording of comments --- internal/deprecation/deprecation.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/deprecation/deprecation.go b/internal/deprecation/deprecation.go index ae5d8dcab6..d7b89f3a93 100644 --- a/internal/deprecation/deprecation.go +++ b/internal/deprecation/deprecation.go @@ -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()