Recipes
Task-oriented examples for getting work done with bca and bca-web.
Each recipe assumes you have built the binaries (cargo build --release) and that bca is on your PATH.
The recipes are grouped by goal:
- Quality reports — generate Markdown reports suitable for pull requests, dashboards, or wikis, including the C/C++ preprocessor-aware workflow.
- CI integration — wire
bca checkandbca reportinto GitHub Actions and GitLab CI, including the baseline / ratchet pattern and the Code Quality widget path. - Local threshold gates — mirror the CI threshold
gate on a developer machine with a two-tier (hard + headroom)
Makefile /
just/pre-commitpattern, so regressions never reach the pull request. - AST queries — search for syntactic constructs, count node types, dump trees, and detect parse errors.
- Exporting metric data — emit structured output (JSON / YAML / TOML / CBOR) and consume it from shell pipelines.
- Driving the REST API — run the HTTP server and call
every endpoint with
curl.
If you want a deeper look at any flag the recipes use, see the per-command pages under Commands. For the full list of metrics that show up in these recipes, see Supported Metrics.
Upstream reference.
big-code-analysisis a fork of Mozilla'srust-code-analysis. Recipes that work for the upstreamrust-code-analysis-clibinary usually translate directly — replace the binary name and adjust for the subcommand restructure documented in the migration guide.