Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: Add quick fix to rule82 (multi-fix) #656

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

webwarrior-ws
Copy link
Contributor

Implement quick fix for UsedUnderscorePrefixedElements rule.
It renames identifier with _ prefix to identifier without this prefix (e.g. _foo -> foo).
Quick fix is only applied if no other identifiers with suggested name (without underscore) exist.
There are cases when such identifiers exist, but not in the same scope, and still no quick fix is applied. That is because checking the scope proved to be much more difficult than expected.

webwarrior-ws and others added 3 commits December 28, 2023 10:36
Added tests for suggested quick fix for
UsedUnderscorePrefixedElements rule.
Implement quick fix for UsedUnderscorePrefixedElements. Quick
fix is only applied if no other identifiers with suggested name
(without underscore) exist. There are cases when such
identifiers exist, but not in the same scope, and stil no quick
fix is applied.

Co-authored-by: Mehrshad <[email protected]>
Make ApplyQuickFix method apply all fixes and not only first
one. It's necessary when testing rules that can create more
than one suggested fix.

Co-authored-by: Mehrshad <[email protected]>
@knocte knocte changed the title Add quick fix to rule82 Add quick fix to rule82 (multi-fix) Jan 10, 2024
@knocte knocte changed the title Add quick fix to rule82 (multi-fix) DRAFT: Add quick fix to rule82 (multi-fix) Jan 10, 2024
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.

1 participant