feat(scanner): add Dart and Flutter dependency analysis - #145
Conversation
|
Thanks for this — it's a strong contribution: the rules were verified empirically across the full directive surface (conditional imports, deferred/ 1. BLOCKING — the bundled ast-grep 0.42.1 rejects two rule kinds, which kills the ENTIRE scan for bundle usersI downloaded the actual pinned bundle (
Two workable fixes, verified against both versions:
Either way, please run 2. BLOCKING —
|
|
Addressed in c84dc9d.
Verification:
|
|
Verified and merged. Re-ran the Dart suite against the actual bundled linux 0.42.1 binary and against 0.45.1 — green on both, so the whole-scan poisoning case is closed; the dependency-scoped Heads-up for the future: #146 (CUE) will resolve a couple of one-line conflicts against your language-table entries when it lands; nothing needed from you. Generated by Claude Code |
What does this PR do?
Adds first-class Dart and Flutter dependency analysis across the scanner pipeline:
.dartfiles in the canonical language registrypubspec.yamlpackage:URIs across multi-package workspaces.dart_toolcontentThe pinned ast-grep 0.42.1 release already includes its Dart parser, so this does not require a separate grammar download or release-workflow change.
Type of change
Checklist
go build && ./codemap .Verification
go test ./...go test -race ./scanner ./rendergo vet ./...staticcheck ./...git diff --checkTested against a real multi-package Flutter repository: 166 Dart files, 1,178 functions, 366 resolved dependency edges. This covered same-package imports, cross-package workspace imports, generated localization sources, tests, and vendored Flutter packages.
Additional notes
The existing language-contribution instructions reference the retired tree-sitter query layout. This implementation follows the current embedded ast-grep rule architecture used by
scanner/astgrep.goandscanner/sg-rules.