Skip to main content

Module cache

Module cache 

Source
Expand description

SQLite-backed per-file findings cache.

Stored at <project_root>/.normalize/findings-cache.sqlite. Keyed by (path, engine): each engine stores its own findings per file. A config_hash column invalidates the entry when rule config changes.

Backed by libsql. To keep the public API synchronous (the FileRule trait is sync because rule implementations parse files with tree-sitter and run pure analysis), we own a dedicated current-thread tokio runtime per cache and drive libsql through runtime.block_on(...).

Structs§

FindingsCache
SQLite-backed per-file findings cache.

Traits§

FileRule
Trait for native rules that check individual files.

Functions§

file_mtime_nanos
Get the mtime of a file in nanoseconds since UNIX epoch cast to u64, or 0 on failure.
run_file_rule
Run a FileRule against a set of files with automatic caching and parallel execution.