check method
Inspect a parsed file and return any findings.
MUST be pure (no side effects, no I/O). MUST be fast (<10ms typical). MUST return an empty list rather than throw on unexpected input.
Implementation
@override
List<Issue> check(ParsedFile file) {
if (file.source.path.contains('/test/') ||
file.source.path.endsWith('_test.dart')) {
return const [];
}
final issues = <Issue>[];
file.unit.visitChildren(_Visitor(file, issues));
return issues;
}