Repository navigation
[analysis] Migrate verifyNoTestImports to flutter_analyzer_plugin - #191124
Merged
auto-submit[bot] merged 4 commits intoAug 14, 2026
Merged
Conversation
bkonyi
force-pushed
the
migrate_no_test_imports_rule
branch
from
August 14, 2026 16:35
6f00053 to
77bbc15
Compare
Contributor
There was a problem hiding this comment.
Code Review
This pull request migrates the 'no test imports' validation from the custom analyzer script (dev/bots/analyze.dart) to a formal analyzer plugin rule (NoTestImports) within dev/flutter_analyzer_plugin. Feedback suggests rephrasing the diagnostic message of the new rule to be clearer when displayed inline, and adding documentation to the public code member to comply with the repository style guide.
bkonyi
force-pushed
the
migrate_no_test_imports_rule
branch
from
August 14, 2026 16:36
77bbc15 to
886ebb9
Compare
bkonyi
force-pushed
the
migrate_no_test_imports_rule
branch
from
August 14, 2026 16:37
886ebb9 to
44acc73
Compare
srawlins
approved these changes
Aug 14, 2026
|
|
||
| const Set<String> _exemptTestImports = <String>{ | ||
| 'package:flutter_test/flutter_test.dart', | ||
| 'hit_test.dart', |
Contributor
There was a problem hiding this comment.
Lol the beauty of writing bespoke lint rules for a specific codebase. No hand-wringing over little exceptions like this.
This was referenced Aug 15, 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
verifyNoTestImportsfromdev/bots/analyze.dartto an AST-basedAnalysisRule(NoTestImports) indev/flutter_analyzer_plugin.Changes
NoTestImportsindev/flutter_analyzer_plugin/lib/src/rules/no_test_imports.dart.dev/flutter_analyzer_plugin/test/no_test_imports_test.dart.NoTestImportsindev/flutter_analyzer_plugin/lib/main.dart.verifyNoTestImportsand'no-test-imports'fromdev/bots/analyze.dart.