Skip to content

refactor: migrate avoid_using_api#304

Open
solid-illiaaihistov wants to merge 2 commits into
solid-software:analysis_server_migrationfrom
solid-illiaaihistov:249-migrate-avoid_using_api
Open

refactor: migrate avoid_using_api#304
solid-illiaaihistov wants to merge 2 commits into
solid-software:analysis_server_migrationfrom
solid-illiaaihistov:249-migrate-avoid_using_api

Conversation

@solid-illiaaihistov

Copy link
Copy Markdown
Collaborator

Closes #249

@solid-illiaaihistov solid-illiaaihistov linked an issue Jun 30, 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 refactors the avoid_using_api lint rule to utilize the analyzer-based RuleContext and RuleVisitorRegistry instead of custom_lint APIs. It replaces AvoidUsingApiLinter with AvoidUsingApiVisitor (extending SimpleAstVisitor), introduces several AST node helper extensions in node_utils.dart, refactors path matching in path_utils.dart, and replaces old integration tests with a comprehensive unit test suite. The review feedback suggests making the rootPath parameter in _getActiveEntries nullable to align with shouldSkipFile and passing context.package?.root.path directly instead of coalescing it to an empty string.

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.

Comment thread lib/src/lints/avoid_using_api/visitors/avoid_using_api_visitor.dart
Comment thread lib/src/lints/avoid_using_api/visitors/avoid_using_api_visitor.dart
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 avoid_using_api

1 participant