Incremental scan cache
vulkro-sf antipatterns caches per-file findings under
~/.vulkro/sf-antipattern-cache.json so a second scan against the
same source returns instantly for unchanged files. Hot path on
managed-package-scale codebases (NPSP at ~50k files): roughly 10x
wall-time speedup on a re-run with no source changes.
Cache key
Each entry is keyed by:
- Source SHA-256 of the file. Any edit invalidates the entry.
- Detector version. A new vulkro-sf release that materially
changes a detector bumps
DETECTOR_VERSIONand the old entries are silently bypassed (they live under the previous version key in the cache file, and the JSON map grows by one key). - Compliance flags (
hipaa,pci- sorted, comma-joined). Different flags = different finding set, so a scan with HIPAA and a scan without it cache separately under the same source. - Own-namespace set (from
sfdx-project.json+ the--exclude-namespaceflag + theextra_excluded_namespacesconfig field - sorted, comma-joined). Different namespace filters = different finding set, same reason.
The key is constructed as sha256|compliance_csv|namespaces_csv,
hashed once per file at scan time.