refactor: migrate avoid_returning_widgets rule#243
refactor: migrate avoid_returning_widgets rule#243andrew-bekhiet-solid wants to merge 25 commits into
Conversation
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.
style: improve variable names refactor: use root package path instead of library path refactor: use pattern matching to reduce nesting
refactor: allow mocking resource provider refactor: extract CachedPackageRules model
refactor: use Map<String, Object?> instead of LintOptions as the enabled field is implicitly true for all rules that the analyzer processes remove RuleConfig as it is no longer needed
refactor: use for loop to register rules
d51e1bf to
0975ba7
Compare
feat: also check FunctionDeclarationStatement
a85c479 to
20d709e
Compare
…migrate/avoid_returning_widgets
feat: also check FunctionDeclarationStatement