Skip to content

Commit d56bd20

Browse files
improve wording of comments
1 parent 41111c2 commit d56bd20

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

internal/deprecation/deprecation.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ func (d *Deprecations) Validate(value cty.Value, module addrs.Module, rng *hcl.R
4747
return notDeprecatedValue, d.deprecationMarksToDiagnostics(deprecationMarks, module, rng)
4848
}
4949

50-
// ValidateExpressionDeep does the same as Validate but checks deeply nested deprecation marks as well.
50+
// ValidateExpressionDeep looks for deprecation marks deeply within the given value
51+
// and returns diagnostics for each deprecation found, unless deprecation warnings
52+
// are suppressed for the given module. It finds the most specific range possible for
53+
// each diagnostic.
5154
func (d *Deprecations) ValidateExpressionDeep(value cty.Value, module addrs.Module, expr hcl.Expression) (cty.Value, tfdiags.Diagnostics) {
5255
var diags tfdiags.Diagnostics
5356
unmarked, pvms := value.UnmarkDeepWithPaths()
@@ -100,9 +103,8 @@ func deprecationMarkToDiagnostic(depMark marks.DeprecationMark, subject *hcl.Ran
100103
return diag
101104
}
102105

103-
// ValidateConfig checks the given value for deprecation marks and returns diagnostics
106+
// ValidateConfig checks the given value deeply for deprecation marks and returns diagnostics
104107
// for each deprecation found, unless deprecation warnings are suppressed for the given module.
105-
// It checks for deeply nested deprecation marks as well.
106108
func (d *Deprecations) ValidateConfig(value cty.Value, schema *configschema.Block, module addrs.Module) (cty.Value, tfdiags.Diagnostics) {
107109
var diags tfdiags.Diagnostics
108110
unmarked, pvms := value.UnmarkDeepWithPaths()

0 commit comments

Comments
 (0)