Draft: Refactor policy scope cop
What does this MR do and why?
This Merge Request improves the existing RuboCop for policy condition scope usage that was introduced in Add cop for policy condition scope. During recent discussions in the related issue, we discovered that the current cop does not correctly handle several valid scope declaration patterns, and some incorrect cases are not being detected.
This MR picks up from the earlier draft and aligns the implementation with the feedback and edge cases discussed in the parent issue.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Sahil Sarawagi