Skip to main content

Module scanner

Module scanner 

Source

Structs§

AstGrepRule
The subset of a slopguard rule that ast-grep understands. slopguard-only fields (category, fix as free text, tests) are deliberately left out.

Enums§

ScanError

Functions§

count_severities
Count errors and warnings in one pass.
scan
Scan the given paths for rule violations.
scan_cached
Scan with file-level caching. Files whose content hash matches a cached entry (and whose rules have not changed) return cached findings without reparsing.
scan_files
Scan an explicit list of files instead of walking directories.
scan_files_cached
Cached variant of scan_files. Cache pruning is skipped: a partial scan must not evict the entries of files it did not look at.
scan_files_unused_disables
Explicit-file (diff) variant of scan_unused_disables. Cross-file rules run over the whole project, as in scan_files, and only the changed files are checked for unused directives.
scan_unused_disables
Compute unused-disable findings for the given walked paths: a full raw scan (disable comments not applied) whose findings reveal which directives would have suppressed something. Cross-file rules run, as in scan.