Skip to content

fix: Prefer-Equals-Comparison Edge Case With Multiple "="#1824

Merged
charlieegan3 merged 3 commits intoopen-policy-agent:mainfrom
SeanLedford:s_ledford/prefer-equals-comparison-multiple-eq-edge-case
Jan 13, 2026
Merged

fix: Prefer-Equals-Comparison Edge Case With Multiple "="#1824
charlieegan3 merged 3 commits intoopen-policy-agent:mainfrom
SeanLedford:s_ledford/prefer-equals-comparison-multiple-eq-edge-case

Conversation

@SeanLedford
Copy link
Copy Markdown
Contributor

Addresses issue #1818, where the prefer-equals comparison fixer would replace the wrong "=" when fixing the violation. Now correctly targets the expression that is given via the violation location.

…same line of the prefer-equals comparison violation

Signed-off-by: Sean Ledford <s_ledford@apple.com>
Signed-off-by: Sean Ledford <s_ledford@apple.com>
@SeanLedford SeanLedford force-pushed the s_ledford/prefer-equals-comparison-multiple-eq-edge-case branch from 032eb21 to 8c1850d Compare January 12, 2026 19:48
Copy link
Copy Markdown
Contributor

@charlieegan3 charlieegan3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good to me! nice to have the test too

@charlieegan3 charlieegan3 enabled auto-merge (squash) January 13, 2026 11:15
@charlieegan3 charlieegan3 merged commit 593e221 into open-policy-agent:main Jan 13, 2026
8 checks passed
@anderseknert anderseknert linked an issue Jan 15, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.38.0 fix command fails to parse policies

2 participants