Repository navigation
[analysis] Migrate issue and repository link syntax rules to flutter_analyzer_plugin - #191127
Merged
auto-submit[bot] merged 7 commits intoAug 15, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request migrates the issue link and repository link validation checks from the legacy analyze.dart script into the flutter_analyzer_plugin as two new analyzer rules: IssueLinkSyntax and RepositoryLinkSyntax. The review feedback suggests preventing IssueLinkSyntax from self-triggering on its own source file, and adding support for analyzing adjacent string literals in both rules to ensure split links are correctly validated without double-reporting.
… in IssueLinkSyntax
srawlins
approved these changes
Aug 15, 2026
| final AnalysisRule rule; | ||
| final RuleContext context; | ||
|
|
||
| bool _shouldSkip() { |
Contributor
There was a problem hiding this comment.
FWIW we sometimes put checks like this all the way up in the registerNodeProcessors code, so that the rule isn't even registered for files that aren't meant to be considered. Saves performance.
pull Bot
pushed a commit
to NOUIY/flutter
that referenced
this pull request
Aug 16, 2026
…le path (flutter#191159) ## Description This PR optimizes static analysis performance in `dev/flutter_analyzer_plugin` by early-exiting in `registerNodeProcessors` based on file path for rules that only target specific files: - `IssueLinkSyntax`: Early exits for unit tests (`_test.dart`) and the rule's definition file (`issue_link_syntax.dart`), removing `_shouldSkip()` from the visitor. - `IntegrationTestTimeouts`: Early exits for non-integration-test files (files not containing `test_driver` or `test.dart`), removing the redundant per-invocation file path check in `visitMethodInvocation`. - `NoBadImportsInFlutter`: Early exits for files not in `packages/flutter/lib/src/`, removing redundant path checks in `visitImportDirective`. This avoids unnecessary AST visitor registration and listener callbacks across non-applicable files in the repository. Addresses feedback from @srawlins in flutter#191127. ## Related Issues - Follow-up to flutter#191127 ## Tests - All existing tests in `dev/flutter_analyzer_plugin/test/` continue to pass.
This was referenced Aug 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates
verifyIssueLinksandverifyRepositoryLinksfromdev/bots/analyze.dartto AST-basedAnalysisRules indev/flutter_analyzer_plugin.Changes
IssueLinkSyntaxindev/flutter_analyzer_plugin/lib/src/rules/issue_link_syntax.dart.RepositoryLinkSyntaxindev/flutter_analyzer_plugin/lib/src/rules/repository_link_syntax.dart.dev/flutter_analyzer_plugin/test/issue_link_syntax_test.dartanddev/flutter_analyzer_plugin/test/repository_link_syntax_test.dart.dev/flutter_analyzer_plugin/lib/main.dart.verifyIssueLinks,verifyRepositoryLinks,'issue-links', and'repository-links'fromdev/bots/analyze.dartanddev/bots/test/analyze_test.dart.