Skip to content

refactor: migrate prefer_conditional_expressions#303

Open
solid-illiaaihistov wants to merge 2 commits into
solid-software:analysis_server_migrationfrom
solid-illiaaihistov:257-migrate-prefer_conditional_expressions
Open

refactor: migrate prefer_conditional_expressions#303
solid-illiaaihistov wants to merge 2 commits into
solid-software:analysis_server_migrationfrom
solid-illiaaihistov:257-migrate-prefer_conditional_expressions

Conversation

@solid-illiaaihistov

Copy link
Copy Markdown
Collaborator

Closes #257

@solid-illiaaihistov solid-illiaaihistov linked an issue Jun 25, 2026 that may be closed by this pull request

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@solid-illiaaihistov

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

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.

Migrate prefer_conditional_expressions

1 participant