refactor: migrate prefer_conditional_expressions#303
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the prefer_conditional_expressions lint rule and its quick fix from custom_lint APIs to the standard analyzer and analysis server plugin APIs. It also restructures the visitor and statement info logic, updates configuration documentation, and introduces a comprehensive reflective test suite. The reviewer pointed out a potential bug in the quick fix where inverting a complex condition by prepending ! without parentheses could lead to incorrect operator precedence, suggesting wrapping non-simple conditions in parentheses.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…conditions and update tests
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request migrates the prefer_conditional_expressions lint rule and its associated quick fix to the new analyzer plugin APIs. The rule now extends SolidLintRule and registers its node processors via RuleVisitorRegistry, while the fix is refactored to extend ResolvedCorrectionProducer. Additionally, the AST visitor logic has been cleaned up, and a new comprehensive test suite has been introduced to replace the old test files. There are no review comments, so no further feedback is provided.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Closes #257