Skip to content

Latest commit

 

History

History
115 lines (74 loc) · 2.54 KB

File metadata and controls

115 lines (74 loc) · 2.54 KB

Contributing to slop-scan

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.

Development setup

Requirements:

  • Bun
  • Node.js 18+

Install dependencies:

bun install

Run the CLI locally:

bun run scan
bun run src/cli.ts scan /path/to/repo --lint

Local validation

Run the standard validation suite before opening a PR:

bun run format:check
bun run lint
bun test

Stable self-scan

bun 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:update

Use bun run lint:self:update only when you intentionally accept the new stable self-scan baseline.

Benchmarks

This repo ships with a pinned benchmark set under benchmarks/.

Fetch the pinned checkouts:

bun run benchmark:fetch

Scan them with the analyzer's default config:

bun run benchmark:scan

Regenerate the markdown report:

bun run benchmark:report

Or do all three:

bun run benchmark:update

Benchmark artifacts:

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

Pre-commit hook

A Husky pre-commit hook runs:

bun run format:check
bun run lint

Pull requests

Issues 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