Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

レシピ

bca と bca-web で作業を進めるためのタスク指向の例です。各レシピは、バイナリがビルド済み(cargo build --release)で、bca が PATH 上にあることを前提とします。

レシピは目的別にまとめられています:

  • Quality reports: generate Markdown reports for pull requests, dashboards, or wikis, including the C/C++ preprocessor-aware workflow.
  • CI integration: wire bca check and bca report into GitHub Actions and GitLab CI, including the baseline / ratchet pattern and the Code Quality widget path.
  • Baselines: record existing offenders in a .bca-baseline.toml so the gate only fires on new or worsened violations, and audit or diff that baseline during review.
  • Local threshold gates: mirror the CI threshold gate on a developer machine with a two-tier (hard + headroom) Makefile / just / pre-commit pattern, so regressions never reach the pull request.
  • Choosing thresholds: learn where the shipped defaults come from, choose language-specific overrides, and select limits for CI, agent feedback, legacy triage, or safety-critical work.
  • Feeding metrics to an agent: wire bca check into an agentic coding tool’s after-edit feedback loop (Claude Code PostToolUse hook, OpenCode plugin), with the anti-gaming guidance that keeps the loop honest.
  • 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.

For 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-analysis is a fork of Mozilla’s rust-code-analysis. Recipes that work for the upstream rust-code-analysis-cli binary usually translate directly: replace the binary name and adjust for the subcommand restructure documented in the migration guide.