Thanks for helping improve slop-scan.
This project is a deterministic Bun + TypeScript CLI for explainable slop heuristics on JS/TS repositories. Please keep changes reproducible, stable, and explainable.
Requirements:
- Bun
- Node.js 18+
Install dependencies:
bun installRun the CLI locally:
bun run scan
bun run src/cli.ts scan /path/to/repo --lintRun the standard validation suite before opening a PR:
bun run format:check
bun run lint
bun testbun run lint includes a stable self-scan.
It runs the last published slop-scan release against this repo using the committed root config in slop-scan.config.json, then compares the result to tests/fixtures/self-scan-stable-baseline.json.
The check currently fails only when the stable release reports either:
- a higher finding count
- a higher repo score
Useful commands:
bun run lint:self
bun run lint:self:updateUse bun run lint:self:update only when you intentionally accept the new stable self-scan baseline.
This repo ships with a pinned benchmark set under benchmarks/.
Fetch the pinned checkouts:
bun run benchmark:fetchScan them with the analyzer's default config:
bun run benchmark:scanRegenerate the markdown report:
bun run benchmark:reportOr do all three:
bun run benchmark:updateBenchmark artifacts:
- manifest:
benchmarks/sets/known-ai-vs-solid-oss.json - snapshot:
benchmarks/results/known-ai-vs-solid-oss.json - report:
reports/known-ai-vs-solid-oss-benchmark.md
Notes:
- checkouts live under
benchmarks/.cache/and are gitignored - regenerate benchmark artifacts intentionally when the benchmark set or analyzer changes materially
- if rule behavior changes in a benchmark-facing way, rerun
bun run benchmark:update
A Husky pre-commit hook runs:
bun run format:check
bun run lintIssues and pull requests are welcome.
A good PR usually includes:
- focused code and docs changes
- updated tests when behavior changes
- benchmark refreshes when benchmark-facing behavior changes materially
- a short explanation of any intentional stable self-scan baseline change