Skip to content

iac-codemod AssertDiffSetsNeedsReplaceForForceNew false-positive on accumulator pattern #539

@intel352

Description

@intel352

Context

Surfaced during P-DO migration (workflow-plugin-digitalocean PR #61): the AST analyzer AssertDiffSetsNeedsReplaceForForceNew flagged VolumeDriver.Diff as a contract violation. The driver actually DOES correctly assign NeedsReplace from a local needsReplace accumulator at line 232 — the analyzer's pattern-matching missed the indirect assignment.

Requested

Tighten the analyzer to recognize the local-accumulator pattern (needsReplace := false; ... needsReplace = true; ... result.NeedsReplace = needsReplace).

Reference

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions