Skip to content

feat: add first-class cargo-crap integration#235

Merged
dpc merged 2 commits into
rustshop:masterfrom
dpc:dpc/jj-kmrlowukmxls
Jul 8, 2026
Merged

feat: add first-class cargo-crap integration#235
dpc merged 2 commits into
rustshop:masterfrom
dpc:dpc/jj-kmrlowukmxls

Conversation

@dpc

@dpc dpc commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

PR published by Tau

Summary

Add first-class cargo-crap support to flakebox and an opt-in pre-commit cargo-crap gate. This makes cargo-crap available like the other supported Rust/dev tooling, with generated defaults and documented configuration.

Details

This packages cargo-crap, exposes it through flakebox outputs/lib, adds a default-enabled cargo-crap module that installs the tool in dev shells and generates .cargo-crap.toml, and adds just crap. It also adds opt-in cargo-crap.pre-commit.* options for projects that want a generated gate in their pre-commit hook.

dpc added 2 commits July 8, 2026 15:47
### Summary

Add an opt-in cargo-crap pre-commit gate to the existing flakebox cargo-crap integration without making expensive CRAP checks run by default. The hook is generated only when `cargo-crap.pre-commit.enable = true`, and projects can customize the cargo-crap CLI arguments through Nix configuration.

### Details

The new `cargo-crap.pre-commit.args` option defaults to `--workspace --fail-above`, using thresholds from the generated `.cargo-crap.toml`, while allowing projects to add coverage, baseline, or stricter threshold arguments. The hook runs `cargo-crap` directly through `flakebox-in-each-cargo-workspace` for consistency with existing cargo pre-commit workspace handling. The change also clarifies cargo-crap option descriptions, gives `just crap` the usual bash/root guard, adds human docs and flakeboxLib docs, and adds module regression coverage for default, disabled, config-disabled, and pre-commit-enabled cases. Validation and independent review passed.
@dpc dpc merged commit d80cccd into rustshop:master Jul 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant