Summary
Add a --watch flag to the scan subcommand that keeps the process alive and re-runs the scan whenever a .rs file under the scanned path is modified.
Proposed UX
soroban-guard scan ./src --watch
The process should:
- Run an initial scan and print results as normal.
- Watch for file-system events using the
notify crate.
- On any
.rs file change under the path, re-run the full scan and reprint results (with a timestamp header).
- Exit on
Ctrl-C.
Implementation hints
- Add
notify to crates/cli/Cargo.toml as an optional or default dependency
- Gate the watch loop behind the
--watch flag in Commands::Scan
- Clear the terminal before each re-scan (optional, but improves UX)
- Respect existing
--exclude patterns during watch re-scans
Summary
Add a
--watchflag to thescansubcommand that keeps the process alive and re-runs the scan whenever a.rsfile under the scanned path is modified.Proposed UX
The process should:
notifycrate..rsfile change under the path, re-run the full scan and reprint results (with a timestamp header).Ctrl-C.Implementation hints
notifytocrates/cli/Cargo.tomlas an optional or default dependency--watchflag inCommands::Scan--excludepatterns during watch re-scans