refactor: migrate avoid_returning_widgets rule#243
Conversation
feat: also check FunctionDeclarationStatement
There was a problem hiding this comment.
Code Review
This pull request refactors the AvoidReturningWidgetsRule to utilize the new analyzer-based rule APIs, introducing a dedicated AvoidReturningWidgetsVisitor and adding comprehensive unit tests. Additionally, it registers the rule in the main plugin entry point and cleans up unused dependencies in pubspec.yaml. A critical issue was identified in excluded_identifiers_list_parameter.dart where accessing classDeclaration.namePart will cause a compilation error because namePart does not exist on ClassDeclaration; a suggestion was provided to use classDeclaration.name.lexeme instead.
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.
feat: also check FunctionDeclarationStatement