diff --git a/.claude/hooks/bca-guidance.txt b/.claude/hooks/bca-guidance.txt index 2df5e58a..776cc757 100644 --- a/.claude/hooks/bca-guidance.txt +++ b/.claude/hooks/bca-guidance.txt @@ -22,6 +22,10 @@ simpler -- not the number smaller. names; it is nexits, never exit -- an unknown metric voids the whole marker). A clear function with an honest suppression beats a "compliant" tangle. +- Keep the fix where the violation is. The flag is scoped to the + function you just edited. Fix it there, mention anything larger you + noticed, and do not widen the change into a module rewrite to bring + the number down. This repo also gates at the task boundary: run `make self-scan` (and `make pre-commit`) before declaring work done. The per-edit hook is an diff --git a/.claude/skills/batch-fix/SKILL.md b/.claude/skills/batch-fix/SKILL.md index c0c05fe2..91fdcebb 100644 --- a/.claude/skills/batch-fix/SKILL.md +++ b/.claude/skills/batch-fix/SKILL.md @@ -250,6 +250,11 @@ respecting crate conflicts, dependencies, and quick-win priority. early waves, giving rapid feedback and reducing blast radius. 6. User-specified order is preserved as a tiebreaker within each crate group (after dependency and quick-win sorting). +7. **Wave size cap**: a wave holds at most six issues. In worktree mode each + agent clones the workspace, and this workspace has twelve crate manifests, + so an uncapped wave can start a dozen concurrent clones and exhaust the + disk. Issues past the sixth roll into the next wave. The cap is harmless in + branch mode, where agents already run one at a time. ### Algorithm @@ -266,10 +271,14 @@ for crate in classified: waves = [] scheduled = set() # issue numbers already assigned to a wave remaining = copy of classified (dict of crate -> [issue list]) +MAX_WAVE = 6 # see scheduling rule 7: bounds concurrent worktree clones + while remaining is not empty: wave = [] crates_in_wave = set() for crate in list(remaining.keys()) sorted by most issues first: + if len(wave) >= MAX_WAVE: + break if crate not in crates_in_wave: # Find the first issue whose dependencies are all scheduled candidate = None @@ -784,7 +793,9 @@ Follow the `/fix-issue` workflow: public API, run `find_referencing_symbols` (or workspace-wide `rg`) to enumerate every call site. If the implementation reveals issues the plan missed, revise the plan the same way before proceeding. -7. Self-review the implementation: +7. Check the implementation against the project-specific traps this + checklist exists to catch — it is a domain checklist, not a generic + second look: - Correctness: root cause addressed, not just symptom? - Performance: appropriate algorithms and data structures? No O(n²) on hot paths (whole-repo analysis, large source files, deep ASTs)? @@ -796,7 +807,9 @@ Follow the `/fix-issue` workflow: - Conventions: no `unwrap`/`expect`/`panic` outside tests, no `unsafe`, newtypes for domain invariants, narrow visibility, borrowing over cloning, no `to_string_lossy()` on identifier paths. -8. Fix any issues found in self-review. If fixes were non-trivial, re-review. +8. Fix anything the checklist turned up. Do not re-run the checklist over + your own fixes — Phase 3 reviews this diff from outside the fix + context, which is where a second look actually pays. 9. **Write tests.** Sufficient testing is mandatory before proceeding. At minimum: - **Unit tests**: for all new or changed public functions. Each edge @@ -945,8 +958,9 @@ For each finding, classify severity and effort: - **performance** or **code-smell** (medium+ effort) -> fix if safe - **trivial code-smell** or **test-gap** -> fix if trivial, note otherwise -Fix all actionable findings. If fixes were non-trivial, re-review the new -diff. Do NOT proceed with known bugs or security issues. +Fix all actionable findings, then proceed to Phase 4 — re-running this +review over your own fixes costs a pass and finds nothing. Do NOT proceed +with known bugs or security issues. ### Phase 4: Validate diff --git a/.claude/skills/cleanup-crate/SKILL.md b/.claude/skills/cleanup-crate/SKILL.md index a91c59fe..5fd956f3 100644 --- a/.claude/skills/cleanup-crate/SKILL.md +++ b/.claude/skills/cleanup-crate/SKILL.md @@ -213,7 +213,10 @@ approval-required). Re-run without --dry-run to apply." #### Worktree mode **CRITICAL**: Every agent MUST be launched with `isolation: "worktree"`. -Launch all removal area agents in parallel. +Launch removal area agents in parallel, at most six at a time — each one +clones the workspace, and a crate with a dozen removal areas will fill +the disk with scratch clones if they all start at once. Queue the rest +and launch each as a slot frees. #### Branch mode diff --git a/.claude/skills/doc-author/SKILL.md b/.claude/skills/doc-author/SKILL.md index 7163e106..cb98fb10 100644 --- a/.claude/skills/doc-author/SKILL.md +++ b/.claude/skills/doc-author/SKILL.md @@ -109,8 +109,11 @@ with a fresh-context critique, scaled to the size of the change: - **Fallback** (no subagent available): run this skill again in `review` mode, in a fresh turn, against the saved file. -Apply the findings through the Step 5 fix discipline, then re-run the -reviewer once to confirm it comes back clean. +Apply the findings through the Step 5 fix discipline. Do not re-run the +reviewer to confirm your fixes landed — a second pass over prose you +just corrected finds nothing. Re-review only when the findings forced a +structural rewrite, because the rewritten sections are new prose nobody +has read yet. ### Step 7: Verify lint diff --git a/.claude/skills/improve-crate/SKILL.md b/.claude/skills/improve-crate/SKILL.md index 7b867ce1..73894e2d 100644 --- a/.claude/skills/improve-crate/SKILL.md +++ b/.claude/skills/improve-crate/SKILL.md @@ -189,7 +189,10 @@ to apply." #### Worktree mode **CRITICAL**: every agent MUST be launched with `isolation: "worktree"`. -Launch all change area agents in parallel. +Launch change area agents in parallel, at most six at a time — each one +clones the workspace, and a crate with a dozen change areas will fill +the disk with scratch clones if they all start at once. Queue the rest +and launch each as a slot frees. #### Branch mode diff --git a/.claude/skills/simplify-rust/SKILL.md b/.claude/skills/simplify-rust/SKILL.md index ba8c6b60..54db080d 100644 --- a/.claude/skills/simplify-rust/SKILL.md +++ b/.claude/skills/simplify-rust/SKILL.md @@ -24,7 +24,11 @@ Determine what to review based on `$ARGUMENTS`: 1. Collect the diff for the chosen scope 2. Read each changed file to understand context around the diff hunks -3. Use the Agent tool to spawn three parallel **read-only** review agents (one per dimension below). Agents analyse and return findings — they do NOT edit files. +3. Review against the three dimensions below, scaling the work to the diff. + A diff you can hold in one context — roughly one crate, under ~10 + changed files — is faster to review directly than to farm out. Beyond + that, spawn **read-only** review agents, one per dimension and no more + than three. Agents analyse and return findings — they do NOT edit files. 4. Aggregate findings, deduplicate, and classify by priority 5. Apply fixes directly to the code (orchestrator only — not the review agents) 6. Run `make pre-commit` to validate formatting, linting, and tests. Fall diff --git a/.opencode/plugins/bca-check.js b/.opencode/plugins/bca-check.js index 486258c9..04c16ce7 100644 --- a/.opencode/plugins/bca-check.js +++ b/.opencode/plugins/bca-check.js @@ -28,7 +28,9 @@ not the number smaller. Do not extract a meaningless helper or split a cohesive function to dodge the count — a spurious helper often raises file-level nom/nargs and helps nothing. If the complexity is essential and the function is clearest left whole, add a suppression marker with -a one-line reason instead of contorting the code. +a one-line reason instead of contorting the code. Keep the fix in the +function that was flagged rather than widening it into a module +rewrite. `.trim() // Resolve the analyzer with the same precedence as the shell hook: diff --git a/AGENTS.md b/AGENTS.md index bc51aead..551a94ee 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -408,6 +408,10 @@ smaller. [Suppression markers](big-code-analysis-book/src/commands/suppression.md) and the full recipe at [`recipes/agent-feedback.md`](big-code-analysis-book/src/recipes/agent-feedback.md). +- **Keep the fix where the violation is.** The flag is scoped to the + function you just edited. Fix it there, mention anything larger you + noticed, and do not widen the change into a module rewrite to bring + the number down. The per-edit hook is an early-warning convenience; the task-boundary gate (`make self-scan` / `make pre-commit`) is the real check before diff --git a/CHANGELOG.md b/CHANGELOG.md index 61581a68..3527963a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -322,6 +322,20 @@ for historical reference. ### Fixed +- `make book-pot` writes `messages.pot` to the book's `po/` directory + again, and now refuses to run against an unsupported mdBook. The + target passed a relative `-d po`, which mdBook 0.4 resolved against + the book root but 0.5 resolves against the working directory, so + under 0.5 the pot silently landed in `./po/` at the repository root + and `make book-po-update` then failed on a missing file. The + destination is now absolute. A version guard was added alongside it: + mdbook-i18n-helpers 0.3.x pairs only with mdBook 0.4.x, and the + mismatched pair that does *not* error — helpers 0.4.x — extracts + fenced code blocks one entry per line instead of one per block, so + the following `msgmerge` marks every code-block entry fuzzy and + rewrites `po/ja.po` against msgids the pinned toolchain never + produces. `docs/development/translations.md` now pins both halves of + the toolchain and describes both failure modes. - Comment-only rows are no longer counted as physical lines of code in Tcl, iRules (#1135), and Perl (#1137). Both defects let a token reach the `_` catch-all that ends `stats.ploc.lines.insert(start)`: in the diff --git a/CLAUDE.md b/CLAUDE.md index ad2e2839..a55e6704 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -42,6 +42,59 @@ destroys other agents' in-progress work: - For non-code files: use targeted `Edit` tool calls with scoped `old_string` / `new_string` pairs. +### Communication during a task + +- Say in one sentence what you are about to do before the first tool + call. After that, speak up when you find something that changes the + plan or the conclusion — not once per file read. +- Lead the closing message with the outcome: what happened, what + broke, or what you found. Supporting detail goes underneath it, for + the reader who wants it. +- Keep answers short and caveats shorter. When asked to explain a + design decision or a metric, give the high-level answer and expand + only if asked. + +### Length of written deliverables + +Documents produced here — audit and triage reports, GitHub issue +bodies, changelog entries, lessons-learned drafts, book pages — should +be as long as their substance requires and no longer. No filler +sections, no summary that restates the section above it, no +boilerplate heading carrying nothing. A skill's report template is a +maximum shape, not a quota: drop a section with no findings rather +than padding it. `doc-author` and +[`docs/conventions/documentation.md`](docs/conventions/documentation.md) +own the prose rules; this length rule applies to every other written +artifact too. + +### Delegating to subagents + +Skills that fan work out set their own agent counts — follow them. +Outside those, the default is to do the work yourself: + +- Delegate only for work that is genuinely independent and larger than + a handful of tool calls: a wide multi-file investigation, one fix + per crate. Reading three files and editing one is not worth an + agent. +- One agent that can carry the whole task beats three that split it. +- Do not spawn an agent to check work you just did. The independent + reviewers in `simplify-rust`, `review`, and `doc-author` exist + because a fresh context catches what an authoring context cannot; + that is a different thing from re-verifying your own output, which + costs tokens and finds nothing. +- Keep concurrent `isolation: "worktree"` agents to six or fewer. + Each clones the workspace, and this workspace has twelve crate + manifests, so unbounded fan-out has filled the disk with scratch + clones. Queue the remainder and start each as a slot frees. The + fan-out skills encode this same six: `batch-fix` caps wave size, + `improve-crate` and `cleanup-crate` cap concurrent area agents. +- Match the model to the stage. The Agent tool takes `model`, so a + mechanical pass (collecting a diff, running a lint, filling in a + template) can run on a smaller one while analysis keeps the default. + There is no reasoning-effort knob on the Agent tool — only + `Workflow`'s `agent()` accepts one, and no skill here uses + `Workflow`. + ### Skills available under `.claude/skills/` | Skill | Use when… | diff --git a/Makefile b/Makefile index 9fb37ff6..e773a0e5 100644 --- a/Makefile +++ b/Makefile @@ -952,9 +952,26 @@ book-serve: # demand and is not tracked. Untranslated or stale (fuzzy) entries # fall back to English at build time, so doc PRs never block on # translation. See docs/development/translations.md. +# +# `-d` is absolute on purpose: mdbook 0.4 resolved a relative dest +# against the book root, 0.5 resolves it against the cwd. Under 0.5 the +# former `-d po` silently wrote the pot to ./po/ at the repo root, and +# book-po-update then failed on the missing file. book-pot: @command -v mdbook-xgettext >/dev/null 2>&1 || { echo "mdbook-xgettext not found; install with: cargo install mdbook-i18n-helpers --version '=0.3.6' --locked"; exit 1; } - MDBOOK_OUTPUT='{"xgettext": {}}' mdbook build big-code-analysis-book -d po + @command -v mdbook >/dev/null 2>&1 || { echo "mdbook not found; this workflow needs the 0.4.x line (see MDBOOK_VERSION in .github/workflows/pages.yml and docs/development/translations.md)"; exit 1; } + @ver="$$(mdbook --version | awk '{print $$2}' | tr -d v)"; \ + case "$$ver" in \ + 0.4.*) ;; \ + *) echo "mdbook $$ver cannot be paired with mdbook-i18n-helpers 0.3.x."; \ + echo "CI pins mdbook 0.4.40 + helpers 0.3.6 (MDBOOK_VERSION in"; \ + echo ".github/workflows/pages.yml); helpers 0.4.0+ target mdbook 0.5."; \ + echo "A mismatched pair still produces a pot, but one that splits"; \ + echo "code blocks per line instead of whole — msgmerge then marks"; \ + echo "every code-block entry fuzzy and silently shreds po/ja.po."; \ + exit 1 ;; \ + esac + MDBOOK_OUTPUT='{"xgettext": {}}' mdbook build big-code-analysis-book -d "$(CURDIR)/big-code-analysis-book/po" book-po-update: book-pot msgmerge --update --backup=off big-code-analysis-book/po/ja.po big-code-analysis-book/po/messages.pot diff --git a/big-code-analysis-book/po/ja.po b/big-code-analysis-book/po/ja.po index 4a88d15c..6738e3c6 100644 --- a/big-code-analysis-book/po/ja.po +++ b/big-code-analysis-book/po/ja.po @@ -1,7 +1,8 @@ +# msgid "" msgstr "" "Project-Id-Version: big-code-analysis Documentation\n" -"POT-Creation-Date: 2026-07-21T17:28:43-07:00\n" +"POT-Creation-Date: 2026-07-31T16:12:26-07:00\n" "PO-Revision-Date: 2026-07-21\n" "Last-Translator: big-code-analysis maintainers\n" "Language-Team: Japanese\n" @@ -39,13 +40,13 @@ msgstr "CLI 移行ガイド" msgid "Commands" msgstr "コマンド" -#: src/SUMMARY.md:9 src/commands/index.md:104 src/commands/metrics.md:1 -#: src/commands/check.md:119 +#: src/SUMMARY.md:9 src/commands/index.md:143 src/commands/metrics.md:1 +#: src/commands/check.md:129 msgid "Metrics" msgstr "メトリクス" #: src/SUMMARY.md:10 src/SUMMARY.md:45 src/commands/vcs.md:1 -#: src/commands/rest.md:580 src/python/vcs.md:1 +#: src/commands/rest.md:604 src/python/vcs.md:1 msgid "Change-history (VCS) metrics" msgstr "変更履歴(VCS)メトリクス" @@ -61,7 +62,7 @@ msgstr "チェック" msgid "Suppression markers" msgstr "抑制マーカー" -#: src/SUMMARY.md:14 src/commands/index.md:116 src/commands/nodes.md:1 +#: src/SUMMARY.md:14 src/commands/index.md:155 src/commands/nodes.md:1 msgid "Nodes" msgstr "ノード" @@ -85,7 +86,7 @@ msgstr "品質レポート" msgid "CI integration" msgstr "CI 連携" -#: src/SUMMARY.md:20 src/commands/check.md:281 +#: src/SUMMARY.md:20 src/commands/check.md:291 msgid "Baselines" msgstr "ベースライン" @@ -219,8 +220,8 @@ msgstr "" "**big-code-analysis** は、多くの異なるプログラミング言語で書かれたソースコー" "ドを分析し、情報を抽出するための Rust ライブラリです。パーサージェネレーター" "であり、インクリメンタルなパースを行うライブラリでもある Tree Sitter をベー" -"スにしています。" +"tree-sitter.github.io/tree-sitter/\" target=\"_blank\">Tree Sitter を" +"ベースにしています。" #: src/index.md:11 msgid "" @@ -243,9 +244,9 @@ msgid "" "authoritative, always-current reference generated straight from the source." msgstr "" "**📖 Rust API リファレンス:** クレートの型とメソッドの完全なリファレンスは " -"docs.rs " -"にあります。本書はタスク指向であり、docs.rs はソースから直接生成される、常に" -"最新の正式なリファレンスです。" +"docs.rs にあります。本書はタスク指向であり、docs.rs はソースから直接生成される、" +"常に最新の正式なリファレンスです。" #: src/index.md:22 msgid "Supported platforms" @@ -265,8 +266,8 @@ msgid "" "target=\"_blank\">GitHub Release Page you can find the `Linux` and " "`Windows` binaries already compiled and packed for you." msgstr "" -"コンパイル済みでパッケージ化された `Linux` および `Windows` のバイナリは、GitHub Release Page から入手できます。" #: src/index.md:32 @@ -277,8 +278,8 @@ msgstr "API ドキュメント" msgid "" "If you prefer to use **big-code-analysis** as a crate, the complete `API " "docs` generated by `Rustdoc` — every public type, trait, and function, " -"including the feature-gated `vcs` module — live on docs.rs." +"including the feature-gated `vcs` module — live on docs.rs." msgstr "" "**big-code-analysis** をクレートとして利用したい場合は、`Rustdoc` で生成され" "た完全な `API docs`(フィーチャゲートされた `vcs` モジュールを含む、すべての" @@ -292,8 +293,8 @@ msgid "" "as a Library](library/index.html) section." msgstr "" "クレートの組み込みに関するタスク指向のガイド(クイックスタート、メモリ上での" -"分析、`FuncSpace` 結果のたどり方、エラー処理)については、[ライブラリとしての" -"利用](library/index.html) セクションを参照してください。" +"分析、`FuncSpace` 結果のたどり方、エラー処理)については、[ライブラリとして" +"の利用](library/index.html) セクションを参照してください。" #: src/index.md:43 msgid "" @@ -331,8 +332,8 @@ msgid "" "Cargo feature documented in [Per-language Cargo features](./library/cargo-" "features.md)." msgstr "" -"これは **big-code-analysis** がパースするプログラミング言語の一覧です。以下の" -"各エントリは(`src/langs.rs` の `mk_langs!` 呼び出しで定義される)実際の " +"これは **big-code-analysis** がパースするプログラミング言語の一覧です。以下" +"の各エントリは(`src/langs.rs` の `mk_langs!` 呼び出しで定義される)実際の " "`LANG` バリアントであり、[言語ごとの Cargo フィーチャ](./library/cargo-" "features.md) に記載された、対応する言語別 Cargo フィーチャの背後にゲートされ" "ています。" @@ -432,54 +433,54 @@ msgstr "Typescript" #: src/languages.md:33 msgid "" "Some entries are variants of a shared grammar pipeline. `JavaScript` (the " -"upstream `tree-sitter-javascript` grammar) is the default for `.js`, `.mjs`, " -"`.cjs`, and `.jsx` files; `Mozjs` is the Mozilla / SpiderMonkey fork, now " -"opt-in — it owns only the `.jsm` (Firefox module) extension and reports the " -"canonical slug `mozjs`. The two are metric-equivalent on ordinary " +"upstream `tree-sitter-javascript` grammar) is the default for `.js`, `." +"mjs`, `.cjs`, and `.jsx` files; `Mozjs` is the Mozilla / SpiderMonkey fork, " +"now opt-in — it owns only the `.jsm` (Firefox module) extension and reports " +"the canonical slug `mozjs`. The two are metric-equivalent on ordinary " "JavaScript. `Tsx` is `Typescript` with JSX syntax enabled and reports the " "distinct slug `tsx`. Since #721 C has its own variant `C` (slug `c`, " "upstream `tree-sitter-c`), owning `.c` and the `c` emacs mode; the `C/C++` " -"variant (slug `cpp`, upstream `tree-sitter-cpp` since #720) keeps `.cpp` / `." -"cc` / `.h` and the rest. `.h` deliberately stays on `Cpp`: a C++ header " +"variant (slug `cpp`, upstream `tree-sitter-cpp` since #720) keeps `.cpp` / " +"`.cc` / `.h` and the rest. `.h` deliberately stays on `Cpp`: a C++ header " "through the C grammar ERROR-cascades on `class` / `template`, whereas a C " "header through the C++ grammar only trips on C++-keyword identifiers. The " "Mozilla/Gecko C++ dialect is the opt-in `Mozcpp` variant (slug `mozcpp`), " "which owns no file extensions and is selected only by name — exactly as " -"`Mozjs` relates to `JavaScript` (C# reports `csharp`). Since #724 `Objective-" -"C` (slug `objc`, upstream `tree-sitter-objc`) owns `.m` and the `objc` / " -"`objective-c` emacs modes. Objective-C++ (`.mm`) stays on `Cpp`: a `.mm` " -"file mixes Objective-C with C++, and the `tree-sitter-objc` grammar cannot " -"parse the C++ half (templates, namespaces, `::`), so the C++ grammar — which " -"only stumbles on the Objective-C glue — degrades more gracefully there, the " -"same trade-off `.h` uses. Metrics for the Objective-C parts of a `.mm` file " -"are therefore approximate. Every variant's slug is its `LANG::name`, " -"lowercase and punctuation-free so it round-trips through `FromStr`." +"`Mozjs` relates to `JavaScript` (C# reports `csharp`). Since #724 " +"`Objective-C` (slug `objc`, upstream `tree-sitter-objc`) owns `.m` and the " +"`objc` / `objective-c` emacs modes. Objective-C++ (`.mm`) stays on `Cpp`: a " +"`.mm` file mixes Objective-C with C++, and the `tree-sitter-objc` grammar " +"cannot parse the C++ half (templates, namespaces, `::`), so the C++ grammar " +"— which only stumbles on the Objective-C glue — degrades more gracefully " +"there, the same trade-off `.h` uses. Metrics for the Objective-C parts of a " +"`.mm` file are therefore approximate. Every variant's slug is its `LANG::" +"name`, lowercase and punctuation-free so it round-trips through `FromStr`." msgstr "" "一部のエントリは、共有の文法パイプラインのバリアントです。`JavaScript`(アッ" "プストリームの `tree-sitter-javascript` 文法)は `.js`、`.mjs`、`.cjs`、`." -"jsx` ファイルのデフォルトです。`Mozjs` は Mozilla / SpiderMonkey フォークで、" -"現在はオプトインです — `.jsm`(Firefox モジュール)拡張子のみを所有し、正規の" -"スラッグ `mozjs` を報告します。両者は通常の JavaScript に対してメトリクス的に" -"等価です。`Tsx` は JSX 構文を有効にした `Typescript` であり、別個のスラッグ " -"`tsx` を報告します。#721 以降、C には独自のバリアント `C`(スラッグ `c`、アッ" -"プストリームの `tree-sitter-c`)があり、`.c` と emacs モード `c` を所有しま" -"す。`C/C++` バリアント(スラッグ `cpp`、#720 以降はアップストリームの `tree-" -"sitter-cpp`)は `.cpp` / `.cc` / `.h` とその他を引き続き受け持ちます。`.h` は" -"意図的に `Cpp` のままです。C++ ヘッダーを C 文法に通すと `class` / " -"`template` で ERROR が連鎖するのに対し、C ヘッダーを C++ 文法に通しても C++ " -"キーワードと同名の識別子でつまずくだけだからです。Mozilla/Gecko の C++ 方言は" -"オプトインの `Mozcpp` バリアント(スラッグ `mozcpp`)で、ファイル拡張子を所有" -"せず、名前でのみ選択されます — ちょうど `Mozjs` と `JavaScript` の関係と同じ" -"です(C# は `csharp` を報告します)。#724 以降、`Objective-C`(スラッグ " -"`objc`、アップストリームの `tree-sitter-objc`)は `.m` と emacs モード " -"`objc` / `objective-c` を所有します。Objective-C++(`.mm`)は `Cpp` のままで" -"す。`.mm` ファイルには Objective-C と C++ が混在しており、`tree-sitter-objc` " -"文法は C++ 側(テンプレート、名前空間、`::`)をパースできないため、Objective-" -"C の接合部分でしかつまずかない C++ 文法のほうが、この場合はより穏やかに劣化し" -"ます — `.h` と同じトレードオフです。したがって `.mm` ファイルの Objective-C " -"部分のメトリクスは近似値です。各バリアントのスラッグはその `LANG::name` であ" -"り、小文字かつ句読点を含まないため、`FromStr` を通じてラウンドトリップできま" -"す。" +"jsx` ファイルのデフォルトです。`Mozjs` は Mozilla / SpiderMonkey フォーク" +"で、現在はオプトインです — `.jsm`(Firefox モジュール)拡張子のみを所有し、" +"正規のスラッグ `mozjs` を報告します。両者は通常の JavaScript に対してメトリ" +"クス的に等価です。`Tsx` は JSX 構文を有効にした `Typescript` であり、別個の" +"スラッグ `tsx` を報告します。#721 以降、C には独自のバリアント `C`(スラッ" +"グ `c`、アップストリームの `tree-sitter-c`)があり、`.c` と emacs モード " +"`c` を所有します。`C/C++` バリアント(スラッグ `cpp`、#720 以降はアップスト" +"リームの `tree-sitter-cpp`)は `.cpp` / `.cc` / `.h` とその他を引き続き受け" +"持ちます。`.h` は意図的に `Cpp` のままです。C++ ヘッダーを C 文法に通すと " +"`class` / `template` で ERROR が連鎖するのに対し、C ヘッダーを C++ 文法に通" +"しても C++ キーワードと同名の識別子でつまずくだけだからです。Mozilla/Gecko " +"の C++ 方言はオプトインの `Mozcpp` バリアント(スラッグ `mozcpp`)で、ファイ" +"ル拡張子を所有せず、名前でのみ選択されます — ちょうど `Mozjs` と " +"`JavaScript` の関係と同じです(C# は `csharp` を報告します)。#724 以降、" +"`Objective-C`(スラッグ `objc`、アップストリームの `tree-sitter-objc`)は `." +"m` と emacs モード `objc` / `objective-c` を所有します。Objective-C++(`." +"mm`)は `Cpp` のままです。`.mm` ファイルには Objective-C と C++ が混在してお" +"り、`tree-sitter-objc` 文法は C++ 側(テンプレート、名前空間、`::`)をパース" +"できないため、Objective-C の接合部分でしかつまずかない C++ 文法のほうが、こ" +"の場合はより穏やかに劣化します — `.h` と同じトレードオフです。したがって `." +"mm` ファイルの Objective-C 部分のメトリクスは近似値です。各バリアントのス" +"ラッグはその `LANG::name` であり、小文字かつ句読点を含まないため、`FromStr` " +"を通じてラウンドトリップできます。" #: src/languages.md:60 msgid "Internal helper variants" @@ -488,14 +489,14 @@ msgstr "内部ヘルパーバリアント" #: src/languages.md:62 msgid "" "The following `LANG` variants are not user-facing languages — they are " -"internal helpers in the C-family analysis pipeline (they ride every C-family " -"Cargo feature: `cpp`, `c`, and `mozcpp`) and are not selected directly when " -"analysing source files:" +"internal helpers in the C-family analysis pipeline (they ride every C-" +"family Cargo feature: `cpp`, `c`, and `mozcpp`) and are not selected " +"directly when analysing source files:" msgstr "" -"以下の `LANG` バリアントはユーザー向けの言語ではありません — C ファミリー分析" -"パイプラインの内部ヘルパーであり(すべての C ファミリー Cargo フィーチャ " -"`cpp`、`c`、`mozcpp` に同梱されます)、ソースファイルの分析時に直接選択される" -"ことはありません:" +"以下の `LANG` バリアントはユーザー向けの言語ではありません — C ファミリー分" +"析パイプラインの内部ヘルパーであり(すべての C ファミリー Cargo フィーチャ " +"`cpp`、`c`、`mozcpp` に同梱されます)、ソースファイルの分析時に直接選択され" +"ることはありません:" #: src/languages.md:67 msgid "`Ccomment` — focuses on C/C++ comments." @@ -509,9 +510,9 @@ msgstr "`Preproc` — C/C++ のプリプロセッサマクロに特化してい msgid "" "**Note:** Since #720 the Mozilla/Gecko C++ dialect is exposed as the " "`Mozcpp` `LANG` variant (backed by the vendored `bca-tree-sitter-mozcpp` " -"crate, pulled in by the opt-in `mozcpp` feature). It is a fully public, name-" -"selectable language that owns no file extensions — unlike the `Ccomment` / " -"`Preproc` helpers above, it is _not_ internal." +"crate, pulled in by the opt-in `mozcpp` feature). It is a fully public, " +"name-selectable language that owns no file extensions — unlike the " +"`Ccomment` / `Preproc` helpers above, it is _not_ internal." msgstr "" "**注:** #720 以降、Mozilla/Gecko の C++ 方言は `Mozcpp` `LANG` バリアントと" "して公開されています(ベンダリングされた `bca-tree-sitter-mozcpp` クレートに" @@ -523,18 +524,18 @@ msgstr "" msgid "" "This chapter is a guided tour of every metric that **big-code-analysis** " "computes. Each section starts from the original research paper, walks " -"through the algorithm, and explains both the way the metric was _originally_ " -"meant to be used and the ways the industry has actually ended up using it " -"years later. If you are new to software metrics, read the sections in order " -"— the later metrics (Maintainability Index in particular) are explicitly " -"built on top of the earlier ones (Halstead, Cyclomatic, LOC)." +"through the algorithm, and explains both the way the metric was " +"_originally_ meant to be used and the ways the industry has actually ended " +"up using it years later. If you are new to software metrics, read the " +"sections in order — the later metrics (Maintainability Index in particular) " +"are explicitly built on top of the earlier ones (Halstead, Cyclomatic, LOC)." msgstr "" "この章は、**big-code-analysis** が計算するすべてのメトリクスのガイドツアーで" "す。各セクションは元の研究論文から出発してアルゴリズムを順に解説し、そのメト" "リクスが _本来_ 意図されていた使われ方と、数年後に業界が実際に行き着いた使わ" "れ方の両方を説明します。ソフトウェアメトリクスに不慣れな場合は、セクションを" -"順番に読んでください — 後半のメトリクス(特に保守容易性指数)は、前半のメトリ" -"クス(Halstead、循環的複雑度、LOC)の上に明示的に構築されています。" +"順番に読んでください — 後半のメトリクス(特に保守容易性指数)は、前半のメト" +"リクス(Halstead、循環的複雑度、LOC)の上に明示的に構築されています。" #: src/metrics.md:12 src/metrics-vcs.md:20 msgid "A few framing notes before we start:" @@ -549,24 +550,24 @@ msgid "" "ago; this module versus its siblings; this codebase versus an industry " "baseline. Absolute thresholds are rough heuristics at best." msgstr "" -"**メトリクスは測定値であって、判定ではありません。** このページのすべての数値" -"は、ソースコードの構造的な性質を要約したものです。正しさ、生産性、開発者のス" -"キルを測るものは一つもありません。どのメトリクスにとっても最も重要な問いは常" -"に「何と比較して?」です — 1 か月前の同じモジュール、兄弟モジュールと比べたこ" -"のモジュール、業界のベースラインと比べたこのコードベース、というように。絶対" -"的なしきい値は、せいぜい大まかなヒューリスティックにすぎません。" +"**メトリクスは測定値であって、判定ではありません。** このページのすべての数" +"値は、ソースコードの構造的な性質を要約したものです。正しさ、生産性、開発者の" +"スキルを測るものは一つもありません。どのメトリクスにとっても最も重要な問いは" +"常に「何と比較して?」です — 1 か月前の同じモジュール、兄弟モジュールと比べ" +"たこのモジュール、業界のベースラインと比べたこのコードベース、というように。" +"絶対的なしきい値は、せいぜい大まかなヒューリスティックにすぎません。" #: src/metrics.md:21 msgid "" -"**Most metrics here are computed at three scopes**: per _function / method_, " -"per _class or unit-like space_, and per _file_. The underlying tree-sitter " -"parser produces a tree of \"spaces\" (functions, closures, classes, " -"namespaces, …) and every metric is rolled up through that tree." +"**Most metrics here are computed at three scopes**: per _function / " +"method_, per _class or unit-like space_, and per _file_. The underlying " +"tree-sitter parser produces a tree of \"spaces\" (functions, closures, " +"classes, namespaces, …) and every metric is rolled up through that tree." msgstr "" "**ここにあるほとんどのメトリクスは 3 つのスコープで計算されます**: _関数 / " -"メソッド_ ごと、 _クラスやユニット的なスペース_ ごと、そして 「ファイル」 ごと" -"です。基盤となる tree-sitter パーサーは「スペース」(関数、クロージャ、クラ" -"ス、名前空間など)のツリーを生成し、すべてのメトリクスはそのツリーを通じて" +"メソッド_ ごと、 _クラスやユニット的なスペース_ ごと、そして 「ファイル」 ご" +"とです。基盤となる tree-sitter パーサーは「スペース」(関数、クロージャ、ク" +"ラス、名前空間など)のツリーを生成し、すべてのメトリクスはそのツリーを通じて" "ロールアップされます。" #: src/metrics.md:26 @@ -584,7 +585,7 @@ msgstr "" msgid "Index" msgstr "一覧" -#: src/metrics.md:33 src/metrics-vcs.md:50 src/commands/check.md:102 +#: src/metrics.md:33 src/metrics-vcs.md:50 src/commands/check.md:112 #: src/library/selecting-metrics.md:50 src/python/metrics.md:79 msgid "Metric" msgstr "メトリクス" @@ -754,16 +755,16 @@ msgid "" "The **ABC** metric measures the size of a piece of code as a three-" "dimensional vector. Each component counts one kind of operation:" msgstr "" -"**ABC** メトリクスは、コード片のサイズを 3 次元ベクトルとして測定します。各成" -"分は 1 種類の操作をカウントします:" +"**ABC** メトリクスは、コード片のサイズを 3 次元ベクトルとして測定します。各" +"成分は 1 種類の操作をカウントします:" #: src/metrics.md:54 msgid "" "**A**ssignments — anything that stores a value into a variable, including " "compound assignments (`+=`, `++`) and explicit initialisation." msgstr "" -"**A**ssignments(代入)— 値を変数に格納するあらゆる操作で、複合代入(`+=`、`+" -"+`)や明示的な初期化を含みます。" +"**A**ssignments(代入)— 値を変数に格納するあらゆる操作で、複合代入(`+=`、" +"`++`)や明示的な初期化を含みます。" #: src/metrics.md:57 msgid "" @@ -778,29 +779,30 @@ msgstr "" #: src/metrics.md:60 msgid "" "**C**onditions — boolean tests: comparison operators (`==`, `!=`, `<=`, " -"`>=`, `<`, `>`), ternary operators (`?`), and the fixed keyword set (`else`, " -"`case`, `try`, `catch`). The `default` / wildcard arm is **not** counted in " -"any language (see the per-language deviations below). The short-circuit " -"logical operators `&&` and `||` are **not** counted on their own — instead, " -"each non-comparison operand of a `&&` / `||` chain contributes one condition " -"via Fitzpatrick's \"unary conditional expression\" rule. The next subsection " -"walks through the rules, the per-language deviations, and worked examples." +"`>=`, `<`, `>`), ternary operators (`?`), and the fixed keyword set " +"(`else`, `case`, `try`, `catch`). The `default` / wildcard arm is **not** " +"counted in any language (see the per-language deviations below). The short-" +"circuit logical operators `&&` and `||` are **not** counted on their own — " +"instead, each non-comparison operand of a `&&` / `||` chain contributes one " +"condition via Fitzpatrick's \"unary conditional expression\" rule. The next " +"subsection walks through the rules, the per-language deviations, and worked " +"examples." msgstr "" "**C**onditions(条件)— ブール判定です。比較演算子(`==`、`!=`、`<=`、`>=`、" "`<`、`>`)、三項演算子(`?`)、および固定のキーワード集合(`else`、`case`、" "`try`、`catch`)が対象です。`default` / ワイルドカードアームはどの言語でも**" "カウントされません**(後述の言語別の逸脱を参照)。短絡論理演算子 `&&` と `||" -"` は単独では**カウントされず**、代わりに `&&` / `||` チェーンの比較でない各オ" -"ペランドが、Fitzpatrick の「単項条件式(unary conditional expression)」規則" -"によって 1 条件として寄与します。次の節では、規則、言語別の逸脱、および実例を" -"順に説明します。" +"` は単独では**カウントされず**、代わりに `&&` / `||` チェーンの比較でない各" +"オペランドが、Fitzpatrick の「単項条件式(unary conditional expression)」規" +"則によって 1 条件として寄与します。次の節では、規則、言語別の逸脱、および実" +"例を順に説明します。" #: src/metrics.md:72 msgid "" "The metric was introduced by Jerry Fitzpatrick in the 1997 C++ Report " "article _Applying the ABC metric to C, C++ and Java_. The current canonical " -"specification, including the rules for what counts as an _A_, _B_, or _C_ in " -"modern languages, is maintained on Fitzpatrick's [Software Renovation]" +"specification, including the rules for what counts as an _A_, _B_, or _C_ " +"in modern languages, is maintained on Fitzpatrick's [Software Renovation]" "(https://www.softwarerenovation.com/Articles.aspx) site." msgstr "" "このメトリクスは、Jerry Fitzpatrick が 1997 年の C++ Report 誌の記事 " @@ -821,10 +823,10 @@ msgid "" "summarises what counts in each component, with each row attributed to the " "figure that introduces it." msgstr "" -"Fitzpatrick の論文は規則を 3 つの図で列挙しています — Figure 2(C)、Figure 3" -"(C++、Figure 2 を拡張)、Figure 4(Java)です。Big-code-analysis はこれらの" -"規則集合を言語ごとにそのまま実装しています。以下の表は、各コンポーネントで何" -"がカウントされるかを、各行をそれを導入した図に帰属させてまとめたものです。" +"Fitzpatrick の論文は規則を 3 つの図で列挙しています — Figure 2(C)、Figure " +"3(C++、Figure 2 を拡張)、Figure 4(Java)です。Big-code-analysis はこれら" +"の規則集合を言語ごとにそのまま実装しています。以下の表は、各コンポーネントで" +"何がカウントされるかを、各行をそれを導入した図に帰属させてまとめたものです。" #: src/metrics.md:87 msgid "Assignments" @@ -922,8 +924,8 @@ msgstr "`goto label`、`break label`、`continue label`" #: src/metrics.md:104 msgid "" -"Figure 2 (C) / Figure 3 (C++) / Figure 4 (Java, labeled `break` / `continue` " -"only — Java has no `goto`)" +"Figure 2 (C) / Figure 3 (C++) / Figure 4 (Java, labeled `break` / " +"`continue` only — Java has no `goto`)" msgstr "" "Figure 2(C)/ Figure 3(C++)/ Figure 4(Java、ラベル付き `break` / " "`continue` のみ — Java に `goto` はありません)" @@ -980,23 +982,23 @@ msgstr "Figure 3、Rule 7 / Figure 4、Rule 9" msgid "" "The short-circuit logical operators (`&&`, `||`, and per-language " "equivalents — Ruby `and` / `or`, Python `and` / `or`, Perl `and` / `or` / " -"`xor`, Lua `and` / `or`, Tcl `&&` / `||`, iRules `&&` / `||` / `and` / `or`) " -"do **not** contribute a condition on their own. Each non-comparison operand " -"contributes one instead, via the unary-conditional rule. The paper makes " -"this explicit twice:" +"`xor`, Lua `and` / `or`, Tcl `&&` / `||`, iRules `&&` / `||` / `and` / " +"`or`) do **not** contribute a condition on their own. Each non-comparison " +"operand contributes one instead, via the unary-conditional rule. The paper " +"makes this explicit twice:" msgstr "" "短絡論理演算子(`&&`、`||`、および各言語の同等物 — Ruby の `and` / `or`、" "Python の `and` / `or`、Perl の `and` / `or` / `xor`、Lua の `and` / `or`、" "Tcl の `&&` / `||`、iRules の `&&` / `||` / `and` / `or`)は、単独では条件に" -"**寄与しません**。代わりに、単項条件規則によって比較でない各オペランドが 1 条" -"件として寄与します。論文はこれを 2 か所で明示しています。" +"**寄与しません**。代わりに、単項条件規則によって比較でない各オペランドが 1 " +"条件として寄与します。論文はこれを 2 か所で明示しています。" #: src/metrics.md:125 msgid "" -"**Listing 2** annotates `(am >= 0 && am <= 0xF) ? '/' : 'C'` as `accc` — one " -"assignment plus three conditions, where the three conditions are the two " -"comparisons (`>=`, `<=`) and the ternary (`?`). The `&&` itself contributes " -"zero." +"**Listing 2** annotates `(am >= 0 && am <= 0xF) ? '/' : 'C'` as `accc` — " +"one assignment plus three conditions, where the three conditions are the " +"two comparisons (`>=`, `<=`) and the ternary (`?`). The `&&` itself " +"contributes zero." msgstr "" "**Listing 2** は `(am >= 0 && am <= 0xF) ? '/' : 'C'` に `accc` と注記してい" "ます — 代入 1 つと条件 3 つで、3 つの条件は 2 つの比較(`>=`、`<=`)と三項演" @@ -1010,9 +1012,9 @@ msgid "" "The `||` again contributes zero; `x` and `y` each contribute one." msgstr "" "一方 **Rule 7 / Rule 9** は各オペランドをカウントします。`if (x || y) " -"printf(\"test failure\\n\");` について、論文は「`x` と `y` の両方が条件式とし" -"て評価されるため、単項条件は 2 つある」と記しています。ここでも `||` の寄与は" -"ゼロで、`x` と `y` がそれぞれ 1 ずつ寄与します。" +"printf(\"test failure\\n\");` について、論文は「`x` と `y` の両方が条件式と" +"して評価されるため、単項条件は 2 つある」と記しています。ここでも `||` の寄" +"与はゼロで、`x` と `y` がそれぞれ 1 ずつ寄与します。" #: src/metrics.md:135 src/metrics.md:315 msgid "Per-language deviations" @@ -1078,33 +1080,34 @@ msgstr "`default` / `_` ワイルドカードアームを条件集合から除 #: src/metrics.md:145 msgid "" -"Fitzpatrick's Figure 2 lists `default`, but it falls through unconditionally " -"— counting it would inflate `C` on every `switch` / `match` regardless of " -"body. big-code-analysis omits it for every language (the Rust `_ =>` and " -"Java `default:` arms included)." +"Fitzpatrick's Figure 2 lists `default`, but it falls through " +"unconditionally — counting it would inflate `C` on every `switch` / `match` " +"regardless of body. big-code-analysis omits it for every language (the Rust " +"`_ =>` and Java `default:` arms included)." msgstr "" -"Fitzpatrick の Figure 2 は `default` を挙げていますが、これは無条件にフォール" -"スルーします — カウントすると、本体に関係なくすべての `switch` / `match` で " -"`C` が膨らみます。big-code-analysis はすべての言語でこれを省略します(Rust " -"の `_ =>` アームや Java の `default:` アームも含みます)。" +"Fitzpatrick の Figure 2 は `default` を挙げていますが、これは無条件にフォー" +"ルスルーします — カウントすると、本体に関係なくすべての `switch` / `match` " +"で `C` が膨らみます。big-code-analysis はすべての言語でこれを省略します" +"(Rust の `_ =>` アームや Java の `default:` アームも含みます)。" #: src/metrics.md:146 msgid "" "Chain-operand unary conditions wired; bare-truthy / argument / `return` " "slots are not" msgstr "" -"チェーンオペランドの単項条件は実装済み。裸の真偽値 / 引数 / `return` スロット" -"は未実装" +"チェーンオペランドの単項条件は実装済み。裸の真偽値 / 引数 / `return` スロッ" +"トは未実装" #: src/metrics.md:146 msgid "" "Each operand of a `&&` / `\\|\\|` chain inside `expr {…}` counts as one " -"condition, so `if {$a && $b}` reports two. The broader Phase 2B slot routing " -"is not wired, so a bare-truthy `if {$a}` still reports zero." +"condition, so `if {$a && $b}` reports two. The broader Phase 2B slot " +"routing is not wired, so a bare-truthy `if {$a}` still reports zero." msgstr "" -"`expr {…}` 内の `&&` / `\\|\\|` チェーンの各オペランドが 1 条件としてカウント" -"されるため、`if {$a && $b}` は 2 を報告します。より広い Phase 2B のスロット振" -"り分けは未実装のため、裸の真偽値の `if {$a}` は依然として 0 を報告します。" +"`expr {…}` 内の `&&` / `\\|\\|` チェーンの各オペランドが 1 条件としてカウン" +"トされるため、`if {$a && $b}` は 2 を報告します。より広い Phase 2B のスロッ" +"ト振り分けは未実装のため、裸の真偽値の `if {$a}` は依然として 0 を報告しま" +"す。" #: src/metrics.md:147 msgid "iRules" @@ -1112,8 +1115,8 @@ msgstr "iRules" #: src/metrics.md:147 msgid "" -"Chain-operand unary conditions wired (unlike its Tcl sibling); bare-truthy / " -"argument / `return` slots are not" +"Chain-operand unary conditions wired (unlike its Tcl sibling); bare-" +"truthy / argument / `return` slots are not" msgstr "" "チェーンオペランドの単項条件は実装済み(同系の Tcl と異なります)。裸の真偽" "値 / 引数 / `return` スロットは未実装" @@ -1121,18 +1124,18 @@ msgstr "" #: src/metrics.md:147 msgid "" "Each operand of a `&&` / `\\|\\|` / `and` / `or` chain counts as one " -"condition (Rule 9), so `if {!$a && !$b}` reports two. iRules also recognises " -"the word-form string-match comparators (`contains`, `starts_with`, " -"`ends_with`, `equals`, `matches`, …) that Tcl lacks (Tcl's `eq` / `ne` / " -"`in` / `ni` are shared). The broader Phase 2B slot routing is not wired, so " -"a bare-truthy `if {$a}` still reports zero." +"condition (Rule 9), so `if {!$a && !$b}` reports two. iRules also " +"recognises the word-form string-match comparators (`contains`, " +"`starts_with`, `ends_with`, `equals`, `matches`, …) that Tcl lacks (Tcl's " +"`eq` / `ne` / `in` / `ni` are shared). The broader Phase 2B slot routing is " +"not wired, so a bare-truthy `if {$a}` still reports zero." msgstr "" "`&&` / `\\|\\|` / `and` / `or` チェーンの各オペランドが 1 条件としてカウント" -"される(Rule 9)ため、`if {!$a && !$b}` は 2 を報告します。iRules は Tcl には" -"ない語形式の文字列一致比較子(`contains`、`starts_with`、`ends_with`、" -"`equals`、`matches` など)も認識します(Tcl の `eq` / `ne` / `in` / `ni` は共" -"通です)。より広い Phase 2B のスロット振り分けは未実装のため、裸の真偽値の " -"`if {$a}` は依然として 0 を報告します。" +"される(Rule 9)ため、`if {!$a && !$b}` は 2 を報告します。iRules は Tcl に" +"はない語形式の文字列一致比較子(`contains`、`starts_with`、`ends_with`、" +"`equals`、`matches` など)も認識します(Tcl の `eq` / `ne` / `in` / `ni` は" +"共通です)。より広い Phase 2B のスロット振り分けは未実装のため、裸の真偽値" +"の `if {$a}` は依然として 0 を報告します。" #: src/metrics.md:148 msgid "" @@ -1164,8 +1167,8 @@ msgid "" "Bare-predicate `if` / `unless` / `while` / `until` (block and modifier " "forms) count one condition" msgstr "" -"裸の述語の `if` / `unless` / `while` / `until`(ブロック形式と修飾子形式)は " -"1 条件としてカウント" +"裸の述語の `if` / `unless` / `while` / `until`(ブロック形式と修飾子形式)" +"は 1 条件としてカウント" #: src/metrics.md:149 msgid "" @@ -1178,15 +1181,15 @@ msgstr "" "慣用的な Ruby は裸の述語(`if flag`、`x if flag`)を好みます。条件スロットを" "カウントすることで、ABC の条件数が Ruby の循環的複雑度の判断数以上に保たれま" "す(他の言語でも同じ整合が強制されています)。述語内の比較(`if a == b`)や " -"`&&` / `\\|\\|` チェーンは、それ自身の演算子 / ウォーカーのアームでカウントさ" -"れ、二重カウントはされません。" +"`&&` / `\\|\\|` チェーンは、それ自身の演算子 / ウォーカーのアームでカウント" +"され、二重カウントはされません。" #: src/metrics.md:150 msgid "" "`if` / `elif` / `while` and each non-wildcard `case` arm count one condition" msgstr "" -"`if` / `elif` / `while` と、ワイルドカードでない各 `case` アームは 1 条件とし" -"てカウント" +"`if` / `elif` / `while` と、ワイルドカードでない各 `case` アームは 1 条件と" +"してカウント" #: src/metrics.md:150 msgid "" @@ -1206,12 +1209,12 @@ msgstr "`catch` に加えて `try` も 1 条件としてカウント" #: src/metrics.md:151 msgid "" -"Fitzpatrick counts both keywords, and Java / C# / C++ / Groovy already count " -"both; Kotlin previously counted only the catch block." +"Fitzpatrick counts both keywords, and Java / C# / C++ / Groovy already " +"count both; Kotlin previously counted only the catch block." msgstr "" -"Fitzpatrick は両方のキーワードをカウントし、Java / C# / C++ / Groovy はすでに" -"両方をカウントしています。Kotlin は以前は catch ブロックのみをカウントしてい" -"ました。" +"Fitzpatrick は両方のキーワードをカウントし、Java / C# / C++ / Groovy はすで" +"に両方をカウントしています。Kotlin は以前は catch ブロックのみをカウントして" +"いました。" #: src/metrics.md:153 msgid "Worked example" @@ -1323,9 +1326,9 @@ msgid "" msgstr "" "ウォーカーは `am_in_range` と `force_letter` をそれぞれ 1 回ずつカウントしま" "す(Rule 7 / 9 の単項条件)。`||` 演算子自体の寄与はゼロです。これは論文にあ" -"る Fitzpatrick の Rule 7 / 9 の実例 `if (x || y) printf(\"test failure\\n\");" -"` — 「x と y の両方が条件式として評価されるため、単項条件は 2 つある」— と一" -"致します。" +"る Fitzpatrick の Rule 7 / 9 の実例 `if (x || y) printf(\"test " +"failure\\n\");` — 「x と y の両方が条件式として評価されるため、単項条件は 2 " +"つある」— と一致します。" #: src/metrics.md:197 msgid "Comparison with other ABC tools" @@ -1339,18 +1342,18 @@ msgid "" "rubocop.org/rubocop/cops_metrics.html#metricsabcsize) (which counts `and` / " "`or` directly) and matches [`StepicOrg/abcmeter`](https://github.com/" "StepicOrg/abcmeter) and [`eoinnoble/python-abc`](https://github.com/" -"eoinnoble/python-abc). When comparing ABC numbers across tools, the operator-" -"counting choice is the single biggest source of disagreement on the same " -"source." +"eoinnoble/python-abc). When comparing ABC numbers across tools, the " +"operator-counting choice is the single biggest source of disagreement on " +"the same source." msgstr "" "本プロジェクトは `&&` / `||` について Fitzpatrick の原論文に従います。演算子" -"自体はカウントせず、比較でない各オペランドを単項条件として 1 回ずつカウントし" -"ます。これは(`and` / `or` を直接カウントする)[RuboCop の `Metrics/AbcSize`]" -"(https://docs.rubocop.org/rubocop/cops_metrics.html#metricsabcsize) とは異な" -"り、[`StepicOrg/abcmeter`](https://github.com/StepicOrg/abcmeter) および " -"[`eoinnoble/python-abc`](https://github.com/eoinnoble/python-abc) と一致しま" -"す。ツール間で ABC の数値を比較するとき、同じソースに対する食い違いの最大の原" -"因は、この演算子カウントの選択です。" +"自体はカウントせず、比較でない各オペランドを単項条件として 1 回ずつカウント" +"します。これは(`and` / `or` を直接カウントする)[RuboCop の `Metrics/" +"AbcSize`](https://docs.rubocop.org/rubocop/cops_metrics." +"html#metricsabcsize) とは異なり、[`StepicOrg/abcmeter`](https://github.com/" +"StepicOrg/abcmeter) および [`eoinnoble/python-abc`](https://github.com/" +"eoinnoble/python-abc) と一致します。ツール間で ABC の数値を比較するとき、同" +"じソースに対する食い違いの最大の原因は、この演算子カウントの選択です。" #: src/metrics.md:210 src/metrics.md:267 src/metrics.md:355 src/metrics.md:558 #: src/metrics.md:651 src/metrics.md:924 src/metrics-vcs.md:81 @@ -1397,12 +1400,12 @@ msgid "" "The metric is specialised per language in `src/languages/language_*.rs`." msgstr "" "完全なシリアライズ出力(`src/metrics/abc.rs`)は、これら 4 つに加えて、" -"`value`(CLI がしきい値判定に使うスペースごとのマグニチュードで、葉スペースで" -"は `magnitude` と等しい値)、コンポーネントごとの平均" +"`value`(CLI がしきい値判定に使うスペースごとのマグニチュードで、葉スペース" +"では `magnitude` と等しい値)、コンポーネントごとの平均" "(`assignments_average`、`branches_average`、`conditions_average`)、および" -"ファイルスコープでのコンポーネントごとの `*_min` / `*_max` を出力し、合計 14 " -"フィールドになります。このメトリクスは `src/languages/language_*.rs` で言語ご" -"とに特殊化されています。" +"ファイルスコープでのコンポーネントごとの `*_min` / `*_max` を出力し、合計 " +"14 フィールドになります。このメトリクスは `src/languages/language_*.rs` で言" +"語ごとに特殊化されています。" #: src/metrics.md:231 src/metrics.md:296 src/metrics.md:414 src/metrics.md:514 #: src/metrics.md:576 src/metrics.md:660 src/metrics.md:700 src/metrics.md:738 @@ -1417,15 +1420,16 @@ msgstr "読み方" #: src/metrics.md:233 msgid "" -"ABC is a _size_ metric, not a complexity metric — a long, dull function with " -"no decisions still scores high if it does a lot of assignments. " -"Fitzpatrick's original recommendation was to use the magnitude as a relative " -"ruler: rank a file's functions by ABC magnitude and look at the top decile." +"ABC is a _size_ metric, not a complexity metric — a long, dull function " +"with no decisions still scores high if it does a lot of assignments. " +"Fitzpatrick's original recommendation was to use the magnitude as a " +"relative ruler: rank a file's functions by ABC magnitude and look at the " +"top decile." msgstr "" -"ABC は複雑度メトリクスではなく _サイズ_ メトリクスです — 判断を持たない長く単" -"調な関数でも、代入を多く行えば高いスコアになります。Fitzpatrick の当初の推奨" -"は、マグニチュードを相対的な物差しとして使うことでした。すなわち、ファイル内" -"の関数を ABC マグニチュードで順位付けし、上位 1 割に注目します。" +"ABC は複雑度メトリクスではなく _サイズ_ メトリクスです — 判断を持たない長く" +"単調な関数でも、代入を多く行えば高いスコアになります。Fitzpatrick の当初の推" +"奨は、マグニチュードを相対的な物差しとして使うことでした。すなわち、ファイル" +"内の関数を ABC マグニチュードで順位付けし、上位 1 割に注目します。" #: src/metrics.md:239 msgid "" @@ -1434,16 +1438,17 @@ msgid "" "(https://github.com/seattlerb/flog) both default to threshold-based " "warnings. A Ruby method with an ABC magnitude over about 17 is " "conventionally a refactoring candidate; over 30 is considered hard to " -"maintain. Those thresholds are language-specific — expect higher values in C+" -"+ and Java, which use explicit getter/setter assignments more aggressively." +"maintain. Those thresholds are language-specific — expect higher values in " +"C++ and Java, which use explicit getter/setter assignments more " +"aggressively." msgstr "" "実際には、ABC は Ruby コミュニティで最も広く採用されるようになりました。" "[`rubocop` リンタ](https://rubocop.org/) と [`flog` ツール](https://github." "com/seattlerb/flog) は、どちらもデフォルトでしきい値ベースの警告を出します。" "ABC マグニチュードがおよそ 17 を超える Ruby メソッドは慣例的にリファクタリン" -"グ候補とされ、30 を超えると保守が難しいと見なされます。これらのしきい値は言語" -"固有です — 明示的なゲッター / セッター代入をより多用する C++ や Java では、よ" -"り高い値になると考えてください。" +"グ候補とされ、30 を超えると保守が難しいと見なされます。これらのしきい値は言" +"語固有です — 明示的なゲッター / セッター代入をより多用する C++ や Java で" +"は、より高い値になると考えてください。" #: src/metrics.md:248 msgid "Cognitive Complexity" @@ -1451,8 +1456,8 @@ msgstr "認知的複雑度" #: src/metrics.md:250 msgid "" -"**Cognitive Complexity** was introduced by G. Ann Campbell at SonarSource in " -"the 2017 white paper _Cognitive Complexity — A new way of measuring " +"**Cognitive Complexity** was introduced by G. Ann Campbell at SonarSource " +"in the 2017 white paper _Cognitive Complexity — A new way of measuring " "understandability_ and the follow-up IEEE TechDebt 2018 paper [_Cognitive " "Complexity — An Overview and Evaluation_](https://ieeexplore.ieee.org/" "document/8595102/). The white paper itself is available as " @@ -1460,8 +1465,8 @@ msgid "" "CognitiveComplexity.pdf) on the SonarSource site." msgstr "" "**認知的複雑度**は、SonarSource の G. Ann Campbell が 2017 年のホワイトペー" -"パー _Cognitive Complexity — A new way of measuring understandability_ と、そ" -"の後の IEEE TechDebt 2018 論文 [_Cognitive Complexity — An Overview and " +"パー _Cognitive Complexity — A new way of measuring understandability_ と、" +"その後の IEEE TechDebt 2018 論文 [_Cognitive Complexity — An Overview and " "Evaluation_](https://ieeexplore.ieee.org/document/8595102/) で導入しました。" "ホワイトペーパー自体は SonarSource のサイトで [`CognitiveComplexity.pdf`]" "(https://www.sonarsource.com/docs/CognitiveComplexity.pdf) として入手できま" @@ -1477,11 +1482,11 @@ msgid "" "reader has a much harder time following the nested code." msgstr "" "このメトリクスは、コード品質ツールにおける循環的複雑度の意図的な置き換えとし" -"て設計されました。Campbell の主張は、循環的複雑度が測るのはコードの _テスト_ " -"のしにくさであって、_理解_ のしにくさではない、というものです。1024 アームの " -"`switch` 文は、同一のロジックを実行する深くネストした `if` の連鎖と同じスコア" -"になりますが、人間の読み手にとってはネストしたコードの方がはるかに追いにくい" -"のです。" +"て設計されました。Campbell の主張は、循環的複雑度が測るのはコードの _テスト" +"_ のしにくさであって、_理解_ のしにくさではない、というものです。1024 アーム" +"の `switch` 文は、同一のロジックを実行する深くネストした `if` の連鎖と同じス" +"コアになりますが、人間の読み手にとってはネストしたコードの方がはるかに追いに" +"くいのです。" #: src/metrics.md:269 msgid "" @@ -1504,9 +1509,9 @@ msgstr "" #: src/metrics.md:277 msgid "" -"**Penalise breaks in linear flow.** Every `if`, `else if`, `else`, `switch`, " -"`try`/`catch`, loop, jump (`goto`, `break label`, `continue label`), and " -"recursive call adds at least `+1`." +"**Penalise breaks in linear flow.** Every `if`, `else if`, `else`, " +"`switch`, `try`/`catch`, loop, jump (`goto`, `break label`, `continue " +"label`), and recursive call adds at least `+1`." msgstr "" "**線形フローの中断にはペナルティを課します。** すべての `if`、`else if`、" "`else`、`switch`、`try`/`catch`、ループ、ジャンプ(`goto`、`break label`、" @@ -1520,22 +1525,22 @@ msgid "" "where a flat sequence of the same three constructs would have scored `1 + 1 " "+ 1 = 3`." msgstr "" -"**ネストを罰します。** すでにネストされたブロックの _内側_ に制御フローが現れ" -"るたびに、メトリクスは _ネストの深さごとに_ 追加の `+1` を加えます。メソッド" -"内の外側の `if` の中の `for` の中の `if` は `1 + 2 + 3 = 6` になりますが、同" -"じ 3 つの構文をフラットに並べた場合は `1 + 1 + 1 = 3` です。" +"**ネストを罰します。** すでにネストされたブロックの _内側_ に制御フローが現" +"れるたびに、メトリクスは _ネストの深さごとに_ 追加の `+1` を加えます。メソッ" +"ド内の外側の `if` の中の `for` の中の `if` は `1 + 2 + 3 = 6` になりますが、" +"同じ 3 つの構文をフラットに並べた場合は `1 + 1 + 1 = 3` です。" #: src/metrics.md:286 msgid "" "Sequences of identical boolean operators (`a && b && c`) score `+1` for the " "whole run, on the grounds that a chain of `&&`s is no harder to read than a " -"single `&&`. Switching operators (`a && b || c`) is where the cognitive load " -"jumps, so the second operator earns its own `+1`." +"single `&&`. Switching operators (`a && b || c`) is where the cognitive " +"load jumps, so the second operator earns its own `+1`." msgstr "" "同一のブール演算子の連なり(`a && b && c`)は、`&&` の連鎖は単一の `&&` より" "読みにくいわけではないという理由で、連なり全体で `+1` になります。演算子が切" -"り替わる(`a && b || c`)ところで認知負荷が跳ね上がるため、2 つ目の演算子は独" -"自の `+1` を得ます。" +"り替わる(`a && b || c`)ところで認知負荷が跳ね上がるため、2 つ目の演算子は" +"独自の `+1` を得ます。" #: src/metrics.md:292 msgid "" @@ -1554,15 +1559,15 @@ msgid "" "above `15` as \"too complex\" and Campbell's recommendation in the white " "paper is that a function should rarely exceed about `25`. Unlike Cyclomatic " "Complexity, the metric scales smoothly: deeply nested code with the same " -"number of decisions scores significantly higher than flat code with the same " -"decisions." +"number of decisions scores significantly higher than flat code with the " +"same decisions." msgstr "" "認知的複雑度が `0` の関数は純粋に線形で、分岐もループもありません。" "SonarSource のツールはデフォルトで `15` を超える関数を「複雑すぎる」とフラグ" -"し、Campbell がホワイトペーパーで推奨しているのは、関数がおよそ `25` を超える" -"ことはめったにないようにすることです。循環的複雑度と異なり、このメトリクスは" -"滑らかにスケールします。判断の数が同じでも、深くネストしたコードはフラットな" -"コードより大幅に高いスコアになります。" +"し、Campbell がホワイトペーパーで推奨しているのは、関数がおよそ `25` を超え" +"ることはめったにないようにすることです。循環的複雑度と異なり、このメトリクス" +"は滑らかにスケールします。判断の数が同じでも、深くネストしたコードはフラット" +"なコードより大幅に高いスコアになります。" #: src/metrics.md:306 msgid "" @@ -1571,33 +1576,33 @@ msgid "" "the kind of function that benefits from an early-return or \"extract " "method\" refactor. SonarLint's IDE plugins (IntelliJ, VS Code, Visual " "Studio, Eclipse) all surface it as the headline complexity number on hover, " -"and the metric has since been picked up by several language servers and code-" -"review platforms outside the Sonar ecosystem." +"and the metric has since been picked up by several language servers and " +"code-review platforms outside the Sonar ecosystem." msgstr "" "後から定着したユースケースは**コードレビュー時のリファクタリング指針**です。" "このメトリクスはネストを特にペナルティ対象とするため、早期リターンや「メソッ" "ドの抽出」リファクタリングの恩恵を受けるような関数をまさに検出する傾向があり" "ます。SonarLint の IDE プラグイン(IntelliJ、VS Code、Visual Studio、" -"Eclipse)はいずれも、ホバー時の代表的な複雑度としてこの値を表示し、このメトリ" -"クスはその後、Sonar エコシステム外のいくつかの言語サーバーやコードレビュープ" -"ラットフォームにも採用されています。" +"Eclipse)はいずれも、ホバー時の代表的な複雑度としてこの値を表示し、このメト" +"リクスはその後、Sonar エコシステム外のいくつかの言語サーバーやコードレビュー" +"プラットフォームにも採用されています。" #: src/metrics.md:317 msgid "" "**Elixir** does not score recursion or jump statements. Elixir control flow " "(`if` / `unless` / `cond` / `case` / `with`) is built from macro-shaped " -"`Call` nodes rather than dedicated grammar productions, and the language has " -"no `break` / `continue` / `goto`; the implementation therefore scores only " -"the nesting-bearing constructs it can identify and omits the recursion (B3) " -"and unstructured-jump (B2) increments that the SonarSource specification " -"adds for languages that expose those shapes syntactically." +"`Call` nodes rather than dedicated grammar productions, and the language " +"has no `break` / `continue` / `goto`; the implementation therefore scores " +"only the nesting-bearing constructs it can identify and omits the recursion " +"(B3) and unstructured-jump (B2) increments that the SonarSource " +"specification adds for languages that expose those shapes syntactically." msgstr "" "**Elixir** は再帰やジャンプ文をスコアしません。Elixir の制御フロー(`if` / " -"`unless` / `cond` / `case` / `with`)は、専用の文法プロダクションではなくマク" -"ロ形の `Call` ノードから構築されており、言語に `break` / `continue` / `goto` " -"はありません。そのため実装は、識別できるネストを伴う構文のみをスコアし、これ" -"らの形を構文として公開する言語向けに SonarSource 仕様が追加する再帰(B3)と非" -"構造化ジャンプ(B2)の加算を省略します。" +"`unless` / `cond` / `case` / `with`)は、専用の文法プロダクションではなくマ" +"クロ形の `Call` ノードから構築されており、言語に `break` / `continue` / " +"`goto` はありません。そのため実装は、識別できるネストを伴う構文のみをスコア" +"し、これらの形を構文として公開する言語向けに SonarSource 仕様が追加する再帰" +"(B3)と非構造化ジャンプ(B2)の加算を省略します。" #: src/metrics.md:326 msgid "" @@ -1609,8 +1614,8 @@ msgid "" "equivalent constructs therefore score identically across languages." msgstr "" "構文上の関数定義ノードを持つすべての言語で、ネストした関数(ローカル関数、ラ" -"ムダ、またはローカル / 内部クラスのメソッド)は、その境界で**ネストカウンタを" -"ゼロにリセット**し、関数深度の加算を追加します。そのため、その内側の制御フ" +"ムダ、またはローカル / 内部クラスのメソッド)は、その境界で**ネストカウンタ" +"をゼロにリセット**し、関数深度の加算を追加します。そのため、その内側の制御フ" "ローは、外側の関数のネストではなく、ネストした関数自身の深さに対してスコアさ" "れます。したがって、バイト単位で等価な構文は言語間で同一のスコアになります。" @@ -1635,20 +1640,20 @@ msgid "" "function. If you draw every basic block as a node and every jump between " "blocks as an edge, the cyclomatic number of that graph is" msgstr "" -"McCabe のアイデアは、関数の _制御フローグラフ_ にグラフ理論を適用することでし" -"た。各基本ブロックをノード、ブロック間の各ジャンプをエッジとして描くと、その" -"グラフのサイクロマティック数は次のようになります。" +"McCabe のアイデアは、関数の _制御フローグラフ_ にグラフ理論を適用することで" +"した。各基本ブロックをノード、ブロック間の各ジャンプをエッジとして描くと、そ" +"のグラフのサイクロマティック数は次のようになります。" #: src/metrics.md:349 msgid "" "where `E` is the number of edges, `N` the number of nodes, and `P` the " -"number of connected components. Crucially, `M` is also exactly the number of " -"**linearly independent paths** through the function — in other words, the " -"minimum number of test cases needed to cover every branch at least once." +"number of connected components. Crucially, `M` is also exactly the number " +"of **linearly independent paths** through the function — in other words, " +"the minimum number of test cases needed to cover every branch at least once." msgstr "" "ここで `E` はエッジ数、`N` はノード数、`P` は連結成分の数です。重要なのは、" -"`M` が関数を通る**線形独立パス**の数、言い換えれば、すべての分岐を少なくとも " -"1 回カバーするのに必要な最小のテストケース数と正確に一致することです。" +"`M` が関数を通る**線形独立パス**の数、言い換えれば、すべての分岐を少なくと" +"も 1 回カバーするのに必要な最小のテストケース数と正確に一致することです。" #: src/metrics.md:357 msgid "" @@ -1657,8 +1662,8 @@ msgid "" "paper for structured programs:" msgstr "" "big-code-analysis は制御フローグラフを文字どおりに構築するわけではありませ" -"ん。代わりに、McCabe が 1976 年の論文で構造化プログラムについて証明した、等価" -"ではるかに安価な定式化を使います。" +"ん。代わりに、McCabe が 1976 年の論文で構造化プログラムについて証明した、等" +"価ではるかに安価な定式化を使います。" #: src/metrics.md:361 msgid "_Cyclomatic Complexity = 1 + (number of decision points)_" @@ -1696,9 +1701,9 @@ msgid "" "across method bodies is provided separately by [WMC](#wmc) below." msgstr "" "`src/metrics/cyclomatic.rs` にある言語別の `Cyclomatic` トレイトが、各 tree-" -"sitter ノードに「これは判断か」を問い合わせてカウンタをインクリメントします。" -"このメトリクスは関数ごととファイルごとにロールアップされます。メソッド本体を" -"またぐクラス単位の集約は、後述の [WMC](#wmc) が別途提供します。" +"sitter ノードに「これは判断か」を問い合わせてカウンタをインクリメントしま" +"す。このメトリクスは関数ごととファイルごとにロールアップされます。メソッド本" +"体をまたぐクラス単位の集約は、後述の [WMC](#wmc) が別途提供します。" #: src/metrics.md:377 msgid "Modified cyclomatic" @@ -1708,15 +1713,25 @@ msgstr "修正循環的複雑度" msgid "" "big-code-analysis also reports a **modified** variant that collapses all " "`case` / `match` / `when` arms inside a _single_ switch statement into one " -"decision point, regardless of how many arms it has. This tends to undercount " -"big dispatch tables in a way that often matches developer intuition better " -"than the strict McCabe definition — a 30-arm `enum` dispatch reads as one " -"decision, not thirty. (The convention itself is not original to this " -"project: it echoes the long-standing `-m` mode from Terry Yin's [lizard]" -"(https://github.com/terryyin/lizard) tool, which is where many readers will " -"first have seen it.) Both numbers are exported side by side; pick one and be " -"consistent." -msgstr "big-code-analysis は、_単一の_ switch 文の中のすべての `case` / `match` / `when` アームを、アーム数に関係なく 1 つの判断点に折りたたむ**修正(modified)** 版も報告します。これは大きなディスパッチテーブルを少なめにカウントする傾向があり、厳密な McCabe の定義よりも開発者の直感に合うことがよくあります — 30 アームの `enum` ディスパッチは、30 ではなく 1 つの判断として読まれるからです。(この慣例自体は本プロジェクト独自のものではありません。Terry Yin の [lizard](https://github.com/terryyin/lizard) ツールに古くからある `-m` モードを踏襲したもので、多くの読者はそこで初めて目にしているはずです。)両方の数値は並べて出力されます。どちらか一方を選び、一貫して使ってください。" +"decision point, regardless of how many arms it has. This tends to " +"undercount big dispatch tables in a way that often matches developer " +"intuition better than the strict McCabe definition — a 30-arm `enum` " +"dispatch reads as one decision, not thirty. (The convention itself is not " +"original to this project: it echoes the long-standing `-m` mode from Terry " +"Yin's [lizard](https://github.com/terryyin/lizard) tool, which is where " +"many readers will first have seen it.) Both numbers are exported side by " +"side; pick one and be consistent." +msgstr "" +"big-code-analysis は、_単一の_ switch 文の中のすべての `case` / `match` / " +"`when` アームを、アーム数に関係なく 1 つの判断点に折りたたむ**修正" +"(modified)** 版も報告します。これは大きなディスパッチテーブルを少なめにカ" +"ウントする傾向があり、厳密な McCabe の定義よりも開発者の直感に合うことがよく" +"あります — 30 アームの `enum` ディスパッチは、30 ではなく 1 つの判断として読" +"まれるからです。(この慣例自体は本プロジェクト独自のものではありません。" +"Terry Yin の [lizard](https://github.com/terryyin/lizard) ツールに古くからあ" +"る `-m` モードを踏襲したもので、多くの読者はそこで初めて目にしているはずで" +"す。)両方の数値は並べて出力されます。どちらか一方を選び、一貫して使ってくだ" +"さい。" #: src/metrics.md:391 msgid "Counting Rust's `?` operator" @@ -1724,19 +1739,20 @@ msgstr "Rust の `?` 演算子のカウント" #: src/metrics.md:393 msgid "" -"By default Rust's `?` operator (the `try_expression` grammar node) adds `+1` " -"to both standard and modified cyclomatic, matching upstream rust-code-" +"By default Rust's `?` operator (the `try_expression` grammar node) adds " +"`+1` to both standard and modified cyclomatic, matching upstream rust-code-" "analysis: `?` is an early-return branch. When cyclomatic is used as a " "maintainability _gate_, this can over-penalize linear-but- fallible code " "that threads a handful of `?` through a happy path. You can opt out so `?` " "is treated as linear error propagation:" msgstr "" -"デフォルトでは、Rust の `?` 演算子(文法ノード `try_expression`)は、標準と修" -"正の両方の循環的複雑度に `+1` を加えます。これはアップストリームの rust-code-" -"analysis と同じ挙動で、`?` は早期リターンの分岐だからです。循環的複雑度を保守" -"性の 「ゲート」 として使う場合、この挙動は、ハッピーパスにいくつかの `?` を通し" -"ているだけの、線形だが失敗しうるコードに過剰なペナルティを与えることがありま" -"す。次の方法でオプトアウトし、`?` を線形なエラー伝播として扱えます。" +"デフォルトでは、Rust の `?` 演算子(文法ノード `try_expression`)は、標準と" +"修正の両方の循環的複雑度に `+1` を加えます。これはアップストリームの rust-" +"code-analysis と同じ挙動で、`?` は早期リターンの分岐だからです。循環的複雑度" +"を保守性の 「ゲート」 として使う場合、この挙動は、ハッピーパスにいくつかの " +"`?` を通しているだけの、線形だが失敗しうるコードに過剰なペナルティを与えるこ" +"とがあります。次の方法でオプトアウトし、`?` を線形なエラー伝播として扱えま" +"す。" #: src/metrics.md:400 msgid "Library: `MetricsOptions::default().with_count_cyclomatic_try(false)`." @@ -1745,13 +1761,13 @@ msgstr "" #: src/metrics.md:401 msgid "" -"CLI: `--cyclomatic-count-try=false` (or the deprecated `--no-cyclomatic-try` " -"alias), or `cyclomatic_count_try = false` in `bca.toml` (the CLI value " +"CLI: `--cyclomatic-count-try=false` (or the deprecated `--no-cyclomatic-" +"try` alias), or `cyclomatic_count_try = false` in `bca.toml` (the CLI value " "overrides the key in either direction)." msgstr "" "CLI: `--cyclomatic-count-try=false`(または非推奨の `--no-cyclomatic-try` エ" -"イリアス)、あるいは `bca.toml` の `cyclomatic_count_try = false`(CLI の値は" -"どちらの方向でもこのキーを上書きします)。" +"イリアス)、あるいは `bca.toml` の `cyclomatic_count_try = false`(CLI の値" +"はどちらの方向でもこのキーを上書きします)。" #: src/metrics.md:404 msgid "" @@ -1761,10 +1777,10 @@ msgid "" "baseline.toml` in the same change." msgstr "" "リポジトリのゲート: 自動検出される `bca.toml` に `cyclomatic_count_try = " -"false` を設定します(本プロジェクト自身の `make self-scan` はまさにこれを行っ" -"ており、フラグも環境変数も使いません)。このポリシーの切り替えは循環的複雑度" -"の値を変化させるため、同じ変更の中で `.bca-baseline.toml` を再生成してくださ" -"い。" +"false` を設定します(本プロジェクト自身の `make self-scan` はまさにこれを" +"行っており、フラグも環境変数も使いません)。このポリシーの切り替えは循環的複" +"雑度の値を変化させるため、同じ変更の中で `.bca-baseline.toml` を再生成してく" +"ださい。" #: src/metrics.md:410 msgid "" @@ -1772,25 +1788,25 @@ msgid "" "are preserved. The toggle is Rust-only; no other language emits " "`try_expression`." msgstr "" -"デフォルトは変わりません — `?` は引き続きカウントされるため、公開済みのメトリ" -"クス値は保たれます。このトグルは Rust 専用です。他の言語は `try_expression` " -"を出力しません。" +"デフォルトは変わりません — `?` は引き続きカウントされるため、公開済みのメト" +"リクス値は保たれます。このトグルは Rust 専用です。他の言語は " +"`try_expression` を出力しません。" #: src/metrics.md:416 msgid "" "McCabe's original recommendation, repeated in the 1976 paper and preserved " "by [NIST's _Structured Testing_ report](https://www.nist.gov/publications/" "structured-testing-testing-methodology-using-cyclomatic-complexity-metric) " -"(Special Publication 500-235, 1996), is to treat `10` as the upper bound for " -"a single function: above that, the number of test cases needed for branch " -"coverage grows uncomfortably large." +"(Special Publication 500-235, 1996), is to treat `10` as the upper bound " +"for a single function: above that, the number of test cases needed for " +"branch coverage grows uncomfortably large." msgstr "" -"McCabe の当初の推奨は、1976 年の論文で繰り返し述べられ、[NIST の _Structured " -"Testing_ レポート](https://www.nist.gov/publications/structured-testing-" -"testing-methodology-using-cyclomatic-complexity-metric)(Special Publication " -"500-235、1996 年)にも引き継がれているもので、単一の関数の上限を `10` とする" -"ことです。これを超えると、分岐カバレッジに必要なテストケース数が不快なほど増" -"大します。" +"McCabe の当初の推奨は、1976 年の論文で繰り返し述べられ、[NIST の " +"_Structured Testing_ レポート](https://www.nist.gov/publications/structured-" +"testing-testing-methodology-using-cyclomatic-complexity-metric)(Special " +"Publication 500-235、1996 年)にも引き継がれているもので、単一の関数の上限" +"を `10` とすることです。これを超えると、分岐カバレッジに必要なテストケース数" +"が不快なほど増大します。" #: src/metrics.md:423 msgid "The emergent uses of cyclomatic complexity have been:" @@ -1802,8 +1818,9 @@ msgid "" "with the _probability_ of a function containing a bug, and most static-" "analysis tools flag high-CC functions as risky." msgstr "" -"**欠陥予測。** 複雑度は — 完全ではないものの — 関数がバグを含む _確率_ とよく" -"相関し、ほとんどの静的解析ツールは CC の高い関数をリスクありとフラグします。" +"**欠陥予測。** 複雑度は — 完全ではないものの — 関数がバグを含む _確率_ とよ" +"く相関し、ほとんどの静的解析ツールは CC の高い関数をリスクありとフラグしま" +"す。" #: src/metrics.md:428 msgid "" @@ -1821,8 +1838,8 @@ msgid "" "between two functions that look similar in length." msgstr "" "**リファクタリングのトリアージ。** 循環的複雑度はほぼすべてのコード品質ダッ" -"シュボードで筆頭に挙げられる「複雑度」の数値であり、長さが同程度に見える 2 つ" -"の関数の優先順位を決めるタイブレーカーとしてもよく使われます。" +"シュボードで筆頭に挙げられる「複雑度」の数値であり、長さが同程度に見える 2 " +"つの関数の優先順位を決めるタイブレーカーとしてもよく使われます。" #: src/metrics.md:436 msgid "" @@ -1833,12 +1850,12 @@ msgid "" "designed to fix exactly that." msgstr "" "このメトリクスのよく知られた盲点に注意してください。すべての判断を同じ重みと" -"して扱う点です。enum に対する 30 分岐の `switch` と、それぞれがさらにネストし" -"た `if` を内包する 2 つのネストした `if` を持つ関数は、読む体験としてはまった" -"く異なるにもかかわらず、どちらもおよそ 30 というスコアになります。認知的複雑" -"度(前述)は、まさにこの点を解決するために設計されました。" +"して扱う点です。enum に対する 30 分岐の `switch` と、それぞれがさらにネスト" +"した `if` を内包する 2 つのネストした `if` を持つ関数は、読む体験としては" +"まったく異なるにもかかわらず、どちらもおよそ 30 というスコアになります。認知" +"的複雑度(前述)は、まさにこの点を解決するために設計されました。" -#: src/metrics.md:443 src/commands/check.md:105 src/python/metrics.md:84 +#: src/metrics.md:443 src/commands/check.md:115 src/python/metrics.md:84 msgid "Halstead" msgstr "Halstead" @@ -1859,9 +1876,9 @@ msgstr "" "Elements_of_software_science)(Elsevier、ISBN 0-444-00205-7)で導入したもの" "で、Wikipedia の [Halstead complexity measures](https://en.wikipedia.org/" "wiki/Halstead_complexity_measures) のページに公式がまとめられています。" -"Halstead の構想は驚くほど野心的でした。物理学が物質を対象とする経験科学である" -"のと同じ意味で、定量的・経験的な _ソフトウェアの科学_ を打ち立てようとしたの" -"です。" +"Halstead の構想は驚くほど野心的でした。物理学が物質を対象とする経験科学であ" +"るのと同じ意味で、定量的・経験的な _ソフトウェアの科学_ を打ち立てようとした" +"のです。" #: src/metrics.md:456 msgid "The four base counts" @@ -1882,8 +1899,8 @@ msgid "" "syntax, punctuation that controls flow." msgstr "" "**演算子(operator)** — 何かを _行う_ もの。キーワード(`if`、`return`、" -"`while`)、算術・論理演算子、代入、関数呼び出しの構文、制御フローを担う句読記" -"号です。" +"`while`)、算術・論理演算子、代入、関数呼び出しの構文、制御フローを担う句読" +"記号です。" #: src/metrics.md:464 msgid "**Operands** — anything that _is_ something: identifiers and literals." @@ -1984,13 +2001,13 @@ msgstr "導出メトリクス" #: src/metrics.md:489 msgid "" -"Halstead then derives a small zoo of formulas. big-code-analysis reports all " -"of the standard ones, plus three less-common derivations " +"Halstead then derives a small zoo of formulas. big-code-analysis reports " +"all of the standard ones, plus three less-common derivations " "(`estimated_program_length`, `purity_ratio`, `level`) that are part of the " "original suite:" msgstr "" -"Halstead はここから数多くの公式を導出します。big-code-analysis は標準的なもの" -"すべてに加えて、元のスイートに含まれるあまり一般的でない 3 つの導出値" +"Halstead はここから数多くの公式を導出します。big-code-analysis は標準的なも" +"のすべてに加えて、元のスイートに含まれるあまり一般的でない 3 つの導出値" "(`estimated_program_length`、`purity_ratio`、`level`)も報告します。" #: src/metrics.md:507 @@ -2003,8 +2020,8 @@ msgid "" msgstr "" "これらの数値定数は、FORTRAN、PL/I、Algol 系言語を含む CDC 時代の異種プログラ" "ム群に対する Halstead の経験的フィッティングに由来します。`T = E / 18` の" -"「Stroud 数」は別系統で、心理学に由来します。Halstead は、人間の頭脳が 1 秒あ" -"たり約 18 回の基本的な弁別を行うという John Stroud の推定を借用しました。" +"「Stroud 数」は別系統で、心理学に由来します。Halstead は、人間の頭脳が 1 秒" +"あたり約 18 回の基本的な弁別を行うという John Stroud の推定を借用しました。" #: src/metrics.md:516 msgid "" @@ -2034,8 +2051,8 @@ msgid "" "As inputs into composite metrics — most importantly the Maintainability " "Index (next section), which depends on Halstead _volume_." msgstr "" -"複合メトリクスへの入力として。最も重要なのは、Halstead の _ボリューム_ に依存" -"する保守容易性指数(次節)です。" +"複合メトリクスへの入力として。最も重要なのは、Halstead の _ボリューム_ に依" +"存する保守容易性指数(次節)です。" #: src/metrics.md:529 msgid "" @@ -2052,8 +2069,8 @@ msgid "" "is the one more likely to introduce regressions." msgstr "" "**相対的な工数見積もり**のため。2 つのリファクタリング候補の循環的複雑度が同" -"程度の場合、Halstead の difficulty が高いほうがリグレッションを持ち込む可能性" -"が高くなります。" +"程度の場合、Halstead の difficulty が高いほうがリグレッションを持ち込む可能" +"性が高くなります。" #: src/metrics.md:536 msgid "Lines of Code" @@ -2064,24 +2081,24 @@ msgid "" "This section covers the five LOC variants — SLOC, PLOC, LLOC, CLOC, and " "BLANK. \"Counting lines\" sounds trivial until you have to define exactly " "what counts. The five variants below are the de-facto standard breakdown, " -"going back to Samuel Conte, Hubert Dunsmore and Vincent Shen's 1986 textbook " -"[_Software Engineering Metrics and Models_](https://books.google.com/books/" -"about/Software_Engineering_Metrics_and_Models.html?id=PKlQAAAAMAAJ) " -"(Benjamin/Cummings, ISBN 0-8053-2162-4), which codified the distinction " -"between physical and logical lines. The Wikipedia entry on [source lines of " -"code](https://en.wikipedia.org/wiki/Source_lines_of_code) is a readable " -"summary of that physical-versus-logical distinction." +"going back to Samuel Conte, Hubert Dunsmore and Vincent Shen's 1986 " +"textbook [_Software Engineering Metrics and Models_](https://books.google." +"com/books/about/Software_Engineering_Metrics_and_Models.html?" +"id=PKlQAAAAMAAJ) (Benjamin/Cummings, ISBN 0-8053-2162-4), which codified " +"the distinction between physical and logical lines. The Wikipedia entry on " +"[source lines of code](https://en.wikipedia.org/wiki/Source_lines_of_code) " +"is a readable summary of that physical-versus-logical distinction." msgstr "" "この節では 5 つの LOC バリアント — SLOC、PLOC、LLOC、CLOC、BLANK — を扱いま" "す。「行を数える」ことは、何を数えるのかを正確に定義しなければならなくなるま" -"では簡単に聞こえます。以下の 5 つのバリアントは事実上の標準的な分類で、その起" -"源は Samuel Conte、Hubert Dunsmore、Vincent Shen による 1986 年の教科書 " +"では簡単に聞こえます。以下の 5 つのバリアントは事実上の標準的な分類で、その" +"起源は Samuel Conte、Hubert Dunsmore、Vincent Shen による 1986 年の教科書 " "[_Software Engineering Metrics and Models_](https://books.google.com/books/" "about/Software_Engineering_Metrics_and_Models.html?id=PKlQAAAAMAAJ)" -"(Benjamin/Cummings、ISBN 0-8053-2162-4)に遡ります。この本が物理行と論理行の" -"区別を体系化しました。Wikipedia の [source lines of code](https://en." -"wikipedia.org/wiki/Source_lines_of_code) の項目は、この物理行対論理行の区別を" -"読みやすくまとめています。" +"(Benjamin/Cummings、ISBN 0-8053-2162-4)に遡ります。この本が物理行と論理行" +"の区別を体系化しました。Wikipedia の [source lines of code](https://en." +"wikipedia.org/wiki/Source_lines_of_code) の項目は、この物理行対論理行の区別" +"を読みやすくまとめています。" #: src/metrics.md:550 msgid "Variant" @@ -2151,11 +2168,11 @@ msgid "" "counts as a statement is language-defined." msgstr "" "big-code-analysis は、tree-sitter の構文木を 1 回走査するだけで 5 つのカウン" -"トすべてを導出します(`src/metrics/loc.rs` を参照)。コメントと文字列は字句走" -"査ではなく AST(抽象構文木)のノード型で識別されるため、複数行文字列、raw 文" -"字列、doc コメント、文字列補間はすべて正しく処理されます。言語ごとの `Loc` ト" -"レイトが、LLOC で「文」として数えるノード種別を規定します。何が文として数えら" -"れるかは言語ごとに定義されるため、ここが微妙な部分です。" +"トすべてを導出します(`src/metrics/loc.rs` を参照)。コメントと文字列は字句" +"走査ではなく AST(抽象構文木)のノード型で識別されるため、複数行文字列、raw " +"文字列、doc コメント、文字列補間はすべて正しく処理されます。言語ごとの " +"`Loc` トレイトが、LLOC で「文」として数えるノード種別を規定します。何が文と" +"して数えられるかは言語ごとに定義されるため、ここが微妙な部分です。" #: src/metrics.md:569 msgid "The five counts satisfy a couple of useful identities:" @@ -2167,17 +2184,17 @@ msgid "" "the canonical size proxy, but is sensitive to formatting and not portable " "across language conventions." msgstr "" -"**SLOC** は、多くの人が口語的に「コード行数」と言うときに指すものです。標準的" -"なサイズの代理指標ですが、フォーマットの影響を受けやすく、言語の慣習をまたい" -"だ移植性はありません。" +"**SLOC** は、多くの人が口語的に「コード行数」と言うときに指すものです。標準" +"的なサイズの代理指標ですが、フォーマットの影響を受けやすく、言語の慣習をまた" +"いだ移植性はありません。" #: src/metrics.md:581 msgid "" "**PLOC** strips away the visual noise. It is the size measure used inside " "the Maintainability Index formula below." msgstr "" -"**PLOC** は視覚的なノイズを取り除いたものです。後述の保守容易性指数の公式の内" -"部で使われるサイズ指標です。" +"**PLOC** は視覚的なノイズを取り除いたものです。後述の保守容易性指数の公式の" +"内部で使われるサイズ指標です。" #: src/metrics.md:583 msgid "" @@ -2208,14 +2225,14 @@ msgstr "" #: src/metrics.md:592 msgid "" -"The emergent uses of LOC variants go well beyond raw size. They are the most " -"common input into cost-estimation models (COCOMO and COCOMO II both use " -"KSLOC — thousands of source lines — as their base unit), they feed effort " -"prediction in product-portfolio dashboards, and they are used as a " +"The emergent uses of LOC variants go well beyond raw size. They are the " +"most common input into cost-estimation models (COCOMO and COCOMO II both " +"use KSLOC — thousands of source lines — as their base unit), they feed " +"effort prediction in product-portfolio dashboards, and they are used as a " "normalising denominator for almost every other metric: _defects per KSLOC_, " "_churn per KSLOC_, _test cases per KSLOC_. The weakness — LOC is easy to " -"game and a 10× difference in coding style can produce a 2× difference in LOC " -"— is the reason this chapter has so many other metrics in it." +"game and a 10× difference in coding style can produce a 2× difference in " +"LOC — is the reason this chapter has so many other metrics in it." msgstr "" "LOC バリアントの発展的な用途は、単なるサイズの測定を大きく超えています。コス" "ト見積もりモデルへの最も一般的な入力であり(COCOMO も COCOMO II も KSLOC — " @@ -2223,8 +2240,8 @@ msgstr "" "ボードにおける工数予測にも使われ、さらに他のほぼすべてのメトリクスを正規化す" "る分母として使われます。_KSLOC あたりの欠陥数_、_KSLOC あたりのチャーン_、" "_KSLOC あたりのテストケース数_ などです。弱点 — LOC は容易に操作でき、コー" -"ディングスタイルの 10 倍の違いが LOC の 2 倍の違いを生み得ること — こそが、こ" -"の章にこれほど多くの他のメトリクスがある理由です。" +"ディングスタイルの 10 倍の違いが LOC の 2 倍の違いを生み得ること — こそが、" +"この章にこれほど多くの他のメトリクスがある理由です。" #: src/metrics.md:602 msgid "Maintainability Index (MI)" @@ -2233,8 +2250,8 @@ msgstr "保守容易性指数(MI)" #: src/metrics.md:604 msgid "" "The **Maintainability Index** is a composite metric that rolls several of " -"the metrics above into a single 0-to-100ish number meant to be read as \"how " -"maintainable is this code?\". It was proposed by Paul Oman and Jack " +"the metrics above into a single 0-to-100ish number meant to be read as " +"\"how maintainable is this code?\". It was proposed by Paul Oman and Jack " "Hagemeister in their 1992 ICSM paper _Metrics for assessing a software " "system's maintainability_ and refined by Don Coleman, Dan Ash, Bruce " "Lowther, and Paul Oman in the 1994 IEEE Computer paper [_Using metrics to " @@ -2246,18 +2263,18 @@ msgid "" "combination. The combination that survived used Halstead volume, cyclomatic " "complexity, lines of code, and comment density." msgstr "" -"**保守容易性指数**は、前述のメトリクスのいくつかを 1 つの 0〜100 程度の数値に" -"まとめ上げ、「このコードはどれだけ保守しやすいか」として読むことを意図した複" -"合メトリクスです。Paul Oman と Jack Hagemeister が 1992 年の ICSM 論文 " +"**保守容易性指数**は、前述のメトリクスのいくつかを 1 つの 0〜100 程度の数値" +"にまとめ上げ、「このコードはどれだけ保守しやすいか」として読むことを意図した" +"複合メトリクスです。Paul Oman と Jack Hagemeister が 1992 年の ICSM 論文 " "_Metrics for assessing a software system's maintainability_ で提案し、Don " "Coleman、Dan Ash、Bruce Lowther、Paul Oman が 1994 年の IEEE Computer 論文 " "[_Using metrics to evaluate software system maintainability_](https://www." -"ecs.csun.edu/~rlingard/comp589/ColemanPaper.pdf)(IEEE Computer 27(8)、44-49 " -"ページ)で改良しました。彼らの方法論は経験的なものでした。Hewlett-Packard の" -"少数の本番システムについて専門家による保守性評価を収集し、それぞれに 40 個の" -"候補メトリクスを計算し、回帰分析に最良の線形結合を選ばせたのです。生き残った" -"組み合わせは、Halstead ボリューム、循環的複雑度、コード行数、コメント密度を使" -"うものでした。" +"ecs.csun.edu/~rlingard/comp589/ColemanPaper.pdf)(IEEE Computer 27(8)、" +"44-49 ページ)で改良しました。彼らの方法論は経験的なものでした。Hewlett-" +"Packard の少数の本番システムについて専門家による保守性評価を収集し、それぞれ" +"に 40 個の候補メトリクスを計算し、回帰分析に最良の線形結合を選ばせたのです。" +"生き残った組み合わせは、Halstead ボリューム、循環的複雑度、コード行数、コメ" +"ント密度を使うものでした。" #: src/metrics.md:619 msgid "" @@ -2267,8 +2284,8 @@ msgstr "big-code-analysis は、実践で定着した 3 つの公式を報告し #: src/metrics.md:622 msgid "" "The three values nest under the `mi` object as the keys `original`, `sei`, " -"and `visual_studio` (the dotted threshold names `mi.original`, `mi.sei`, `mi." -"visual_studio`):" +"and `visual_studio` (the dotted threshold names `mi.original`, `mi.sei`, " +"`mi.visual_studio`):" msgstr "" "3 つの値は `mi` オブジェクトの下に `original`、`sei`、`visual_studio` という" "キーでネストされます(ドット区切りのしきい値名は `mi.original`、`mi.sei`、" @@ -2291,12 +2308,12 @@ msgid "" "ratio in `[0, 1]`); the code feeds this percentage straight into the SEI " "term (see `src/metrics/mi.rs` and issue #241)." msgstr "" -"`mi.sei` は Software Engineering Institute による改良版で、コメント密度の項を" -"追加しています。`sin(√(...))` という形は、コメントが _ある程度_ は役立つもの" -"の、一定量を超えて増やしても効果がないように選ばれました。" -"`comment_percentage` は `[0, 100]` のパーセントで表したコメント行の割合であり" -"(`[0, 1]` の比率ではありません)、コードはこのパーセント値をそのまま SEI 項" -"に与えます(`src/metrics/mi.rs` と issue #241 を参照)。" +"`mi.sei` は Software Engineering Institute による改良版で、コメント密度の項" +"を追加しています。`sin(√(...))` という形は、コメントが _ある程度_ は役立つも" +"のの、一定量を超えて増やしても効果がないように選ばれました。" +"`comment_percentage` は `[0, 100]` のパーセントで表したコメント行の割合であ" +"り(`[0, 1]` の比率ではありません)、コードはこのパーセント値をそのまま SEI " +"項に与えます(`src/metrics/mi.rs` と issue #241 を参照)。" #: src/metrics.md:641 msgid "" @@ -2304,9 +2321,9 @@ msgid "" "Studio, where the score is clamped to `[0, 100]` and shown to developers " "traffic-light style: green ≥ 20, yellow ≥ 10, red below." msgstr "" -"`mi.visual_studio` は Microsoft が Visual Studio 用に選んだ線形リスケーリング" -"で、スコアは `[0, 100]` にクランプされ、信号機方式で開発者に表示されます。緑" -"は 20 以上、黄は 10 以上、赤はそれ未満です。" +"`mi.visual_studio` は Microsoft が Visual Studio 用に選んだ線形リスケーリン" +"グで、スコアは `[0, 100]` にクランプされ、信号機方式で開発者に表示されます。" +"緑は 20 以上、黄は 10 以上、赤はそれ未満です。" #: src/metrics.md:646 msgid "" @@ -2323,16 +2340,16 @@ msgstr "" #: src/metrics.md:653 msgid "" "The implementation is purely arithmetic — `src/metrics/mi.rs` consumes the " -"already-computed `Halstead`, `Cyclomatic`, and `LOC` metrics and applies the " -"three formulas. Because the formulas use the natural log of Halstead volume " -"and SLOC, MI is undefined for empty files; big-code-analysis returns `0.0` " -"for any file with zero SLOC or zero Halstead volume." +"already-computed `Halstead`, `Cyclomatic`, and `LOC` metrics and applies " +"the three formulas. Because the formulas use the natural log of Halstead " +"volume and SLOC, MI is undefined for empty files; big-code-analysis returns " +"`0.0` for any file with zero SLOC or zero Halstead volume." msgstr "" "実装は純粋な算術です。`src/metrics/mi.rs` は計算済みの `Halstead`、" "`Cyclomatic`、`LOC` メトリクスを受け取り、3 つの公式を適用します。公式が " "Halstead ボリュームと SLOC の自然対数を使うため、MI は空のファイルに対しては" -"未定義です。big-code-analysis は、SLOC がゼロまたは Halstead ボリュームがゼロ" -"のファイルに対して `0.0` を返します。" +"未定義です。big-code-analysis は、SLOC がゼロまたは Halstead ボリュームがゼ" +"ロのファイルに対して `0.0` を返します。" #: src/metrics.md:662 msgid "" @@ -2342,19 +2359,20 @@ msgid "" "measurably before a system enters the \"legacy\" quadrant." msgstr "" "MI は _本来_ ポートフォリオレベルのスコアとして設計されました。「このコード" -"ベースから今後 1 年でどれだけの保守の苦労が見込まれるか」というものです。健全" -"なシステムではリリースをまたいでかなり安定しており、システムが「レガシー」の" -"象限に入る前に目に見えて低下する傾向があります。" +"ベースから今後 1 年でどれだけの保守の苦労が見込まれるか」というものです。健" +"全なシステムではリリースをまたいでかなり安定しており、システムが「レガシー」" +"の象限に入る前に目に見えて低下する傾向があります。" #: src/metrics.md:668 msgid "" "The emergent use case is the **Visual Studio traffic-light rendering**: " "every C# developer who has hovered a method in the IDE has seen the green / " "yellow / red icon, and the underlying number is `mi.visual_studio`. This " -"made MI by far the most user-facing software metric for an entire generation " -"of .NET developers, which is also why it is the metric that has attracted " -"the most criticism. Treat it as a smoke detector, not a thermostat: a sudden " -"drop is a useful signal, but the absolute number is noisy." +"made MI by far the most user-facing software metric for an entire " +"generation of .NET developers, which is also why it is the metric that has " +"attracted the most criticism. Treat it as a smoke detector, not a " +"thermostat: a sudden drop is a useful signal, but the absolute number is " +"noisy." msgstr "" "発展的なユースケースは **Visual Studio の信号機表示**です。IDE でメソッドに" "カーソルを合わせたことのある C# 開発者は皆、緑・黄・赤のアイコンを見たことが" @@ -2413,15 +2431,16 @@ msgstr "" #: src/metrics.md:702 msgid "" "A function with many arguments is hard to call correctly and even harder to " -"test exhaustively — the test matrix grows roughly exponentially. The classic " -"refactoring advice is the _introduce parameter object_ pattern: when a " -"function takes more than four related arguments, group them into a record / " -"struct / dataclass." +"test exhaustively — the test matrix grows roughly exponentially. The " +"classic refactoring advice is the _introduce parameter object_ pattern: " +"when a function takes more than four related arguments, group them into a " +"record / struct / dataclass." msgstr "" "引数の多い関数は正しく呼び出すのが難しく、網羅的にテストするのはさらに困難で" "す。テストマトリクスはおおよそ指数関数的に増大します。古典的なリファクタリン" -"グの助言は _パラメータオブジェクトの導入_ パターンです。関数が 4 つを超える関" -"連した引数を取る場合、それらをレコード / 構造体 / データクラスにまとめます。" +"グの助言は _パラメータオブジェクトの導入_ パターンです。関数が 4 つを超える" +"関連した引数を取る場合、それらをレコード / 構造体 / データクラスにまとめま" +"す。" #: src/metrics.md:708 msgid "" @@ -2434,10 +2453,10 @@ msgid "" msgstr "" "発展的な用途は、**レビューをブロックする lint ルール**としてです。現代的なリ" "ンターの多く(`pylint` の `R0913`、ESLint の `max-params`、Checkstyle の " -"`ParameterNumber`)は、設定可能なしきい値を超える引数を持つ関数にフラグを立て" -"ます。NArgs は API 設計ダッシュボードの構成要素としても有用です。平均 NArgs " -"が時間とともにじわじわ増えている公開 API は、「あともう 1 つだけパラメータ" -"を」という機能フラグを積み重ねてきた API であることが多いのです。" +"`ParameterNumber`)は、設定可能なしきい値を超える引数を持つ関数にフラグを立" +"てます。NArgs は API 設計ダッシュボードの構成要素としても有用です。平均 " +"NArgs が時間とともにじわじわ増えている公開 API は、「あともう 1 つだけパラ" +"メータを」という機能フラグを積み重ねてきた API であることが多いのです。" #: src/metrics.md:715 msgid "NExits" @@ -2445,10 +2464,10 @@ msgstr "NExits" #: src/metrics.md:717 msgid "" -"**NExits** counts the number of distinct exit points from a function — every " -"explicit `return`, every `throw` / `raise`, and (in Rust) every `?` early-" -"return. The implicit fall-through return at the end of a function is **not** " -"counted; only explicit exits are (see issue #243)." +"**NExits** counts the number of distinct exit points from a function — " +"every explicit `return`, every `throw` / `raise`, and (in Rust) every `?` " +"early-return. The implicit fall-through return at the end of a function is " +"**not** counted; only explicit exits are (see issue #243)." msgstr "" "**NExits** は、関数からの相異なる出口点の数を数えます。すべての明示的な " "`return`、すべての `throw` / `raise`、そして(Rust では)すべての `?` による" @@ -2475,11 +2494,11 @@ msgstr "" #: src/metrics.md:732 msgid "" -"big-code-analysis walks each function's syntax tree, identifies the language-" -"specific exit nodes (see the per-language `Exit` trait in `src/metrics/" -"nexits.rs`), and reports per-function counts plus file-level `sum`, " -"`average`, `min`, and `max`. The serialised field name is `nexits`, matching " -"the prose acronym used here." +"big-code-analysis walks each function's syntax tree, identifies the " +"language-specific exit nodes (see the per-language `Exit` trait in `src/" +"metrics/nexits.rs`), and reports per-function counts plus file-level `sum`, " +"`average`, `min`, and `max`. The serialised field name is `nexits`, " +"matching the prose acronym used here." msgstr "" "big-code-analysis は各関数の構文木を走査し、言語固有の出口ノードを特定し" "(`src/metrics/nexits.rs` の言語ごとの `Exit` トレイトを参照)、関数ごとのカ" @@ -2493,17 +2512,17 @@ msgid "" "DO-178C) for avionics, MISRA C for embedded automotive — see [MISRA's " "official site](https://misra.org.uk/)) still require an NExits of 1 per " "function, because multiple exit points complicate certified control-flow " -"analysis. Outside those domains, an NExits of `2-4` is usually a _good_ sign " -"— it almost always means the function uses guard clauses to handle " +"analysis. Outside those domains, an NExits of `2-4` is usually a _good_ " +"sign — it almost always means the function uses guard clauses to handle " "preconditions and then proceeds in a flat body." msgstr "" "厳格な SESE コーディング標準(アビオニクス向けの [DO-178C](https://en." -"wikipedia.org/wiki/DO-178C)、組み込み自動車向けの MISRA C — [MISRA の公式サイ" -"ト](https://misra.org.uk/) を参照)は、今でも関数あたりの NExits を 1 とする" -"ことを要求しています。複数の出口点は、認証対象の制御フロー解析を複雑にするた" -"めです。これらの領域の外では、NExits が `2-4` であることはたいてい _良い_ 兆" -"候です。ほとんどの場合、その関数がガード節で事前条件を処理し、その後フラット" -"な本体で処理を進めていることを意味するからです。" +"wikipedia.org/wiki/DO-178C)、組み込み自動車向けの MISRA C — [MISRA の公式サ" +"イト](https://misra.org.uk/) を参照)は、今でも関数あたりの NExits を 1 とす" +"ることを要求しています。複数の出口点は、認証対象の制御フロー解析を複雑にする" +"ためです。これらの領域の外では、NExits が `2-4` であることはたいてい _良い_ " +"兆候です。ほとんどの場合、その関数がガード節で事前条件を処理し、その後フラッ" +"トな本体で処理を進めていることを意味するからです。" #: src/metrics.md:749 msgid "" @@ -2511,9 +2530,9 @@ msgid "" "the function should have been split into several smaller functions, with " "each \"successful branch\" becoming its own helper." msgstr "" -"_非常に_ 高い NExits — たとえば 8 超 — は警告のサインです。たいていの場合、そ" -"の関数は複数の小さな関数に分割されるべきであり、それぞれの「成功する分岐」が" -"独自のヘルパーになるべきだったことを意味します。" +"_非常に_ 高い NExits — たとえば 8 超 — は警告のサインです。たいていの場合、" +"その関数は複数の小さな関数に分割されるべきであり、それぞれの「成功する分岐」" +"が独自のヘルパーになるべきだったことを意味します。" #: src/metrics.md:753 msgid "NOM" @@ -2526,29 +2545,29 @@ msgid "" "object-oriented codebases it is one of the first metrics introduced by Mark " "Lorenz and Jeff Kidd in their 1994 book [_Object-Oriented Software Metrics_]" "(https://books.google.com/books/about/Object_oriented_Software_Metrics.html?" -"id=lsJnQgAACAAJ) (Prentice Hall, ISBN 0-13-179292-X), where it is treated as " -"the primary class-size indicator." +"id=lsJnQgAACAAJ) (Prentice Hall, ISBN 0-13-179292-X), where it is treated " +"as the primary class-size indicator." msgstr "" "**NOM** は _Number Of Methods_(メソッド数)の略で、あるスコープ(ファイル、" "クラス、または名前空間)内で定義されたすべての関数・メソッド・クロージャを数" "えます。オブジェクト指向コードベースにとっては、Mark Lorenz と Jeff Kidd が " "1994 年の著書 [_Object-Oriented Software Metrics_](https://books.google.com/" -"books/about/Object_oriented_Software_Metrics.html?id=lsJnQgAACAAJ)(Prentice " -"Hall、ISBN 0-13-179292-X)で最初期に導入したメトリクスの 1 つであり、同書では" -"主要なクラスサイズ指標として扱われています。" +"books/about/Object_oriented_Software_Metrics.html?id=lsJnQgAACAAJ)" +"(Prentice Hall、ISBN 0-13-179292-X)で最初期に導入したメトリクスの 1 つであ" +"り、同書では主要なクラスサイズ指標として扱われています。" #: src/metrics.md:764 msgid "" "big-code-analysis reports the count split by callable kind in `src/metrics/" "nom.rs`. The serialised fields are `functions`, `closures`, " -"`functions_average`, `closures_average`, `total`, `average` (overall average " -"across containing spaces), and per-kind `functions_min`, `functions_max`, " -"`closures_min`, `closures_max`." +"`functions_average`, `closures_average`, `total`, `average` (overall " +"average across containing spaces), and per-kind `functions_min`, " +"`functions_max`, `closures_min`, `closures_max`." msgstr "" "big-code-analysis は `src/metrics/nom.rs` で、呼び出し可能要素の種類ごとに分" "割してカウントを報告します。シリアライズされるフィールドは `functions`、" -"`closures`、`functions_average`、`closures_average`、`total`、`average`(内包" -"するスペース全体での平均)、および種類ごとの `functions_min`、" +"`closures`、`functions_average`、`closures_average`、`total`、`average`(内" +"包するスペース全体での平均)、および種類ごとの `functions_min`、" "`functions_max`、`closures_min`、`closures_max` です。" #: src/metrics.md:770 @@ -2564,23 +2583,23 @@ msgstr "" #: src/metrics.md:777 msgid "" -"NOM is the input to several other metrics — WMC sums _cyclomatic_ complexity " -"across the same set of methods that NOM counts, and NPM filters that same " -"set down to public methods. As a standalone metric, the Lorenz–Kidd " -"recommendation is `≤ 20` methods per class. The emergent use is as a _God-" -"class detector_: a class with NOM in the dozens is almost always doing too " -"much, and is a strong candidate for \"extract collaborator\" refactoring as " -"documented in Martin Fowler's [_Refactoring_ catalogue entry on Large Class]" -"(https://refactoring.com/catalog/extractClass.html)." -msgstr "" -"NOM は他のいくつかのメトリクスへの入力です。WMC は NOM が数えるのと同じメソッ" -"ド集合に対して _循環的_ 複雑度を合計し、NPM は同じ集合を公開メソッドだけに絞" -"り込みます。単独のメトリクスとしては、Lorenz–Kidd の推奨はクラスあたり `≤ " -"20` メソッドです。発展的な用途は _God クラス検出器_ としてです。NOM が数十に" -"達するクラスはほぼ確実に多くを抱え込みすぎており、Martin Fowler の " +"NOM is the input to several other metrics — WMC sums _cyclomatic_ " +"complexity across the same set of methods that NOM counts, and NPM filters " +"that same set down to public methods. As a standalone metric, the Lorenz–" +"Kidd recommendation is `≤ 20` methods per class. The emergent use is as a " +"_God-class detector_: a class with NOM in the dozens is almost always doing " +"too much, and is a strong candidate for \"extract collaborator\" " +"refactoring as documented in Martin Fowler's [_Refactoring_ catalogue entry " +"on Large Class](https://refactoring.com/catalog/extractClass.html)." +msgstr "" +"NOM は他のいくつかのメトリクスへの入力です。WMC は NOM が数えるのと同じメ" +"ソッド集合に対して _循環的_ 複雑度を合計し、NPM は同じ集合を公開メソッドだけ" +"に絞り込みます。単独のメトリクスとしては、Lorenz–Kidd の推奨はクラスあたり " +"`≤ 20` メソッドです。発展的な用途は _God クラス検出器_ としてです。NOM が数" +"十に達するクラスはほぼ確実に多くを抱え込みすぎており、Martin Fowler の " "[_Refactoring_ カタログの Large Class の項目](https://refactoring.com/" -"catalog/extractClass.html) に記述されている「コラボレーターの抽出」リファクタ" -"リングの有力候補です。" +"catalog/extractClass.html) に記述されている「コラボレーターの抽出」リファク" +"タリングの有力候補です。" #: src/metrics.md:787 msgid "NPA" @@ -2589,8 +2608,8 @@ msgstr "NPA" #: src/metrics.md:789 msgid "" "**NPA** counts the **number of public attributes** (a.k.a. fields, " -"properties, instance variables) declared by a class or interface. It is part " -"of the metric family introduced by Lorenz and Kidd in _Object-Oriented " +"properties, instance variables) declared by a class or interface. It is " +"part of the metric family introduced by Lorenz and Kidd in _Object-Oriented " "Software Metrics_ (1994) and was later folded into the MOOD (\"Metrics for " "Object-Oriented Design\") suite proposed by [Brito e Abreu and Carapuça " "(1994)](https://www.researchgate.net/publication/267412803_Object-" @@ -2602,8 +2621,8 @@ msgstr "" "リーの一部であり、後に [Brito e Abreu と Carapuça(1994 年)](https://www." "researchgate.net/publication/267412803_Object-" "Oriented_Software_Engineering_Measuring_and_Controlling_the_Development_Process) " -"が提案した MOOD(「Metrics for Object-Oriented Design」)スイートに取り込まれ" -"ました。" +"が提案した MOOD(「Metrics for Object-Oriented Design」)スイートに取り込ま" +"れました。" #: src/metrics.md:797 msgid "" @@ -2614,40 +2633,49 @@ msgid "" "`class_attributes` (sum of _all_ attributes — public or not — across " "classes), `interface_attributes`, `class_cda` (class density of public " "attributes — an accessibility _ratio_, not an average), `interface_cda`, " -"`total`, `total_attributes`, and `cda`. The per-language `Npa` trait decides " -"what counts as \"public\" (Java `public`, C# `public`, Rust `pub`, Python's " -"\"no leading underscore\" convention, …) and what counts as \"attribute\" " -"rather than \"method\"." +"`total`, `total_attributes`, and `cda`. The per-language `Npa` trait " +"decides what counts as \"public\" (Java `public`, C# `public`, Rust `pub`, " +"Python's \"no leading underscore\" convention, …) and what counts as " +"\"attribute\" rather than \"method\"." msgstr "" "big-code-analysis は、定義箇所の種類ごとにカウントを分割します。_クラス_(状" -"態を持つ具象型)と _インターフェイス_(抽象的な契約)です。シリアライズされた" -"出力(`src/metrics/npa.rs`)は `class_npa_sum`(全クラスにわたる NPA の合" -"計)、`interface_npa_sum`(インターフェイスにわたる合計)、`class_attributes`" -"(公開か否かを問わない _すべての_ 属性のクラスにわたる合計)、" -"`interface_attributes`、`class_cda`(クラスの公開属性密度 — 平均ではなくアク" -"セシビリティの _比率_)、`interface_cda`、`total`、`total_attributes`、`cda` " -"です。言語ごとの `Npa` トレイトが、何を「公開」と見なすか(Java の `public`、" -"C# の `public`、Rust の `pub`、Python の「先頭にアンダースコアを付けない」慣" -"習など)、そして何を「メソッド」ではなく「属性」と見なすかを決定します。" +"態を持つ具象型)と _インターフェイス_(抽象的な契約)です。シリアライズされ" +"た出力(`src/metrics/npa.rs`)は `class_npa_sum`(全クラスにわたる NPA の合" +"計)、`interface_npa_sum`(インターフェイスにわたる合計)、" +"`class_attributes`(公開か否かを問わない _すべての_ 属性のクラスにわたる合" +"計)、`interface_attributes`、`class_cda`(クラスの公開属性密度 — 平均ではな" +"くアクセシビリティの _比率_)、`interface_cda`、`total`、" +"`total_attributes`、`cda` です。言語ごとの `Npa` トレイトが、何を「公開」と" +"見なすか(Java の `public`、C# の `public`、Rust の `pub`、Python の「先頭に" +"アンダースコアを付けない」慣習など)、そして何を「メソッド」ではなく「属性」" +"と見なすかを決定します。" #: src/metrics.md:812 msgid "" "NPA is a _direct_ measure of encapsulation. Every public attribute is a " -"piece of internal state that callers can read or write without going through " -"a method, which means it is a piece of internal state the class cannot " -"validate or evolve without breaking callers. The canonical guidance — first " -"explicitly stated in Bertrand Meyer's [_Object-Oriented Software " +"piece of internal state that callers can read or write without going " +"through a method, which means it is a piece of internal state the class " +"cannot validate or evolve without breaking callers. The canonical guidance " +"— first explicitly stated in Bertrand Meyer's [_Object-Oriented Software " "Construction_](https://en.wikipedia.org/wiki/Object-" "Oriented_Software_Construction) (Prentice Hall, 1988) and known as the " "_Uniform Access Principle_ — is to keep NPA at or near zero and to expose " "state through public methods instead." -msgstr "NPA はカプセル化の _直接的な_ 尺度です。すべての公開属性は、呼び出し側がメソッドを介さずに読み書きできる内部状態であり、つまりクラスが呼び出し側を壊さずには検証も進化もさせられない内部状態だということです。標準的な指針 — Bertrand Meyer の [_Object-Oriented Software Construction_](https://en.wikipedia.org/wiki/Object-Oriented_Software*Construction)(Prentice Hall、1988 年)で最初に明示的に述べられ、* 統一アクセスの原則_ として知られています — は、NPA をゼロまたはその近くに保ち、代わりに公開メソッドを通じて状態を公開することです。" +msgstr "" +"NPA はカプセル化の _直接的な_ 尺度です。すべての公開属性は、呼び出し側がメ" +"ソッドを介さずに読み書きできる内部状態であり、つまりクラスが呼び出し側を壊さ" +"ずには検証も進化もさせられない内部状態だということです。標準的な指針 — " +"Bertrand Meyer の [_Object-Oriented Software Construction_](https://en." +"wikipedia.org/wiki/Object-Oriented_Software*Construction)(Prentice Hall、" +"1988 年)で最初に明示的に述べられ、* 統一アクセスの原則_ として知られていま" +"す — は、NPA をゼロまたはその近くに保ち、代わりに公開メソッドを通じて状態を" +"公開することです。" #: src/metrics.md:823 msgid "" -"The emergent use is **API-stability auditing**: a public library class whose " -"NPA grows over time accumulates breaking-change liability faster than its " -"public-method surface." +"The emergent use is **API-stability auditing**: a public library class " +"whose NPA grows over time accumulates breaking-change liability faster than " +"its public-method surface." msgstr "" "発展的な用途は **API 安定性の監査**です。時間とともに NPA が増えていく公開ラ" "イブラリのクラスは、公開メソッドの表面よりも速いペースで破壊的変更の負債を蓄" @@ -2676,20 +2704,20 @@ msgid "" "`interface_methods`, `class_coa`, `interface_coa` (operation-accessibility " "_ratios_, not averages), `total`, `total_methods`, and `coa`. The language-" "specific `Npm` trait decides what counts as public — for example, Rust's " -"`pub`, Python's leading-underscore convention, C++'s `public:` section — and " -"folds together regular methods, constructors, and operator overloads as " +"`pub`, Python's leading-underscore convention, C++'s `public:` section — " +"and folds together regular methods, constructors, and operator overloads as " "appropriate." msgstr "" -"NPA と同様に、big-code-analysis は NPM を定義箇所の種類(クラス対インターフェ" -"イス)で分割します。シリアライズされた出力(`src/metrics/npm.rs`)は " +"NPA と同様に、big-code-analysis は NPM を定義箇所の種類(クラス対インター" +"フェイス)で分割します。シリアライズされた出力(`src/metrics/npm.rs`)は " "`class_npm_sum`(クラスにわたる NPM の合計)、`interface_npm_sum`、" "`class_methods`(公開か否かを問わない _すべての_ メソッドのクラスにわたる合" -"計)、`interface_methods`、`class_coa`、`interface_coa`(平均ではなく操作アク" -"セシビリティの _比率_)、`total`、`total_methods`、`coa` です。言語固有の " +"計)、`interface_methods`、`class_coa`、`interface_coa`(平均ではなく操作ア" +"クセシビリティの _比率_)、`total`、`total_methods`、`coa` です。言語固有の " "`Npm` トレイトが、何を公開と見なすかを決定し — たとえば Rust の `pub`、" -"Python の先頭アンダースコアの慣習、C++ の `public:` セクション — 通常のメソッ" -"ド、コンストラクタ、演算子オーバーロードを言語に応じて適切にまとめて扱いま" -"す。" +"Python の先頭アンダースコアの慣習、C++ の `public:` セクション — 通常のメ" +"ソッド、コンストラクタ、演算子オーバーロードを言語に応じて適切にまとめて扱い" +"ます。" #: src/metrics.md:845 msgid "" @@ -2716,10 +2744,10 @@ msgstr "" "NPM は**公開インターフェイスのサイズ**です。NPM が数十に達するクラスは、API " "の契約が大きすぎるクラスです。すべての公開メソッドは呼び出し側が依存し得るも" "のであり、それに対するあらゆる変更は破壊的変更になります。Lorenz–Kidd の指針" -"はクラスあたり公開メソッド `≤ 20` で、`40` を超えるものは強力なリファクタリン" -"グ候補と見なされます。同じルールは Java や C# の _インターフェイス_ に特に強" -"く当てはまります。そこでは契約こそが、クライアントが依存の拠り所とする形その" -"ものだからです。" +"はクラスあたり公開メソッド `≤ 20` で、`40` を超えるものは強力なリファクタリ" +"ング候補と見なされます。同じルールは Java や C# の _インターフェイス_ に特に" +"強く当てはまります。そこでは契約こそが、クライアントが依存の拠り所とする形そ" +"のものだからです。" #: src/metrics.md:861 msgid "" @@ -2729,8 +2757,8 @@ msgid "" "of internal fields." msgstr "" "発展的な用途は、ライブラリ向けの**公開 API 変更トラッカー**としてです。パッ" -"ケージレベルで NPM を監視すると、NPA が内部フィールドの偶発的な露出を捉えるの" -"と同じように、ライブラリの表面積の偶発的な拡大を捉えられます。" +"ケージレベルで NPM を監視すると、NPA が内部フィールドの偶発的な露出を捉える" +"のと同じように、ライブラリの表面積の偶発的な拡大を捉えられます。" #: src/metrics.md:866 msgid "Tokens" @@ -2739,20 +2767,20 @@ msgstr "Tokens" #: src/metrics.md:868 msgid "" "**Tokens** is a per-function and per-file count of the _tree-sitter leaf " -"tokens_ — identifiers, literals, keywords, punctuation — excluding any token " -"whose AST ancestor is a comment node. It is a modern, lexer-driven size " -"proxy intended as a more formatting-resilient alternative to LOC. (The same " -"idea is well known from Terry Yin's [`lizard`](https://github.com/terryyin/" -"lizard) command-line tool, which is where many readers will first have seen " -"a token-count metric.)" +"tokens_ — identifiers, literals, keywords, punctuation — excluding any " +"token whose AST ancestor is a comment node. It is a modern, lexer-driven " +"size proxy intended as a more formatting-resilient alternative to LOC. (The " +"same idea is well known from Terry Yin's [`lizard`](https://github.com/" +"terryyin/lizard) command-line tool, which is where many readers will first " +"have seen a token-count metric.)" msgstr "" "**Tokens** は、_tree-sitter のリーフトークン_ — 識別子、リテラル、キーワー" -"ド、句読記号 — を関数ごと・ファイルごとに数えるカウントで、AST 上の祖先にコメ" -"ントノードを持つトークンは除外されます。フォーマットの影響を受けにくい LOC の" -"代替として意図された、現代的なレクサー駆動のサイズ代理指標です。(同じアイデ" -"アは Terry Yin の [`lizard`](https://github.com/terryyin/lizard) コマンドライ" -"ンツールでよく知られており、多くの読者がトークンカウントメトリクスを最初に目" -"にするのはそこでしょう。)" +"ド、句読記号 — を関数ごと・ファイルごとに数えるカウントで、AST 上の祖先にコ" +"メントノードを持つトークンは除外されます。フォーマットの影響を受けにくい " +"LOC の代替として意図された、現代的なレクサー駆動のサイズ代理指標です。(同じ" +"アイデアは Terry Yin の [`lizard`](https://github.com/terryyin/lizard) コマ" +"ンドラインツールでよく知られており、多くの読者がトークンカウントメトリクスを" +"最初に目にするのはそこでしょう。)" #: src/metrics.md:877 msgid "" @@ -2767,41 +2795,41 @@ msgid "" "language where they are optional — do change the count." msgstr "" "実装は `src/metrics/tokens.rs` にあります。Tokens は Halstead が意図的に飛ば" -"す句読記号を含む _すべての_ リーフを数えるため、値は Halstead の `N1 + N2` と" -"は一致しません。また、行ではなくトークンを数えるため、どの LOC バリアントとも" -"等価では*「ありません」*。空白のみの再フォーマットでは Tokens は変化しません。" -"変数のリネームでもカウントは変化しません。コメントの削除でも Tokens は変化し" -"ません。_トークンそのもの_ を変える編集 — `if` の追加、単一文ブロックへの省略" -"可能な波括弧の追加、セミコロンが省略可能な言語でのセミコロンの挿入・削除 — は" -"カウントを変化させます。" +"す句読記号を含む _すべての_ リーフを数えるため、値は Halstead の `N1 + N2` " +"とは一致しません。また、行ではなくトークンを数えるため、どの LOC バリアント" +"とも等価では*「ありません」*。空白のみの再フォーマットでは Tokens は変化しま" +"せん。変数のリネームでもカウントは変化しません。コメントの削除でも Tokens は" +"変化しません。_トークンそのもの_ を変える編集 — `if` の追加、単一文ブロック" +"への省略可能な波括弧の追加、セミコロンが省略可能な言語でのセミコロンの挿入・" +"削除 — はカウントを変化させます。" #: src/metrics.md:890 msgid "" "Tokens is the most **formatting-resilient size proxy** in the suite. It is " -"the right size measure to use when you are normalising another metric across " -"languages or across teams with different style conventions — `bugs per " -"KSLOC` is sensitive to formatting, while `bugs per 1000 tokens` is much less " -"so." +"the right size measure to use when you are normalising another metric " +"across languages or across teams with different style conventions — `bugs " +"per KSLOC` is sensitive to formatting, while `bugs per 1000 tokens` is much " +"less so." msgstr "" -"Tokens はこのスイートで最も**フォーマットの影響を受けにくいサイズ代理指標**で" -"す。言語をまたいで、あるいはスタイル規約の異なるチームをまたいで別のメトリク" -"スを正規化する際に使うべきサイズ指標です。`bugs per KSLOC` はフォーマットの影" -"響を受けますが、`bugs per 1000 tokens` ははるかに受けにくいのです。" +"Tokens はこのスイートで最も**フォーマットの影響を受けにくいサイズ代理指標**" +"です。言語をまたいで、あるいはスタイル規約の異なるチームをまたいで別のメトリ" +"クスを正規化する際に使うべきサイズ指標です。`bugs per KSLOC` はフォーマット" +"の影響を受けますが、`bugs per 1000 tokens` ははるかに受けにくいのです。" #: src/metrics.md:896 msgid "" -"The emergent use is as the **defect-density denominator of choice** in cross-" -"language research: a 1000-line Java file and a 1000-line Lisp file contain " -"very different amounts of code, but a 1000-_token_ slice of each contains " -"roughly the same amount of information. This makes Tokens particularly " -"useful for machine-learning code-quality models that train across many " -"languages." +"The emergent use is as the **defect-density denominator of choice** in " +"cross-language research: a 1000-line Java file and a 1000-line Lisp file " +"contain very different amounts of code, but a 1000-_token_ slice of each " +"contains roughly the same amount of information. This makes Tokens " +"particularly useful for machine-learning code-quality models that train " +"across many languages." msgstr "" "発展的な用途は、言語横断的な研究における**欠陥密度の分母の定番**としてです。" -"1000 行の Java ファイルと 1000 行の Lisp ファイルに含まれるコード量は大きく異" -"なりますが、それぞれの 1000 _トークン_ のスライスにはおおよそ同量の情報が含ま" -"れます。このため Tokens は、多くの言語にまたがって学習する機械学習ベースの" -"コード品質モデルに特に有用です。" +"1000 行の Java ファイルと 1000 行の Lisp ファイルに含まれるコード量は大きく" +"異なりますが、それぞれの 1000 _トークン_ のスライスにはおおよそ同量の情報が" +"含まれます。このため Tokens は、多くの言語にまたがって学習する機械学習ベース" +"のコード品質モデルに特に有用です。" #: src/metrics.md:904 msgid "WMC" @@ -2814,70 +2842,70 @@ msgid "" "TechMeetings/Articles/OOMetrics.pdf), introduced in their 1994 IEEE " "Transactions on Software Engineering paper _A Metrics Suite for Object " "Oriented Design_ (volume 20, issue 6, pages 476-493). The CK suite — WMC, " -"DIT, NOC, CBO, RFC, LCOM — is the single most-cited collection of OO metrics " -"in the academic literature; big-code-analysis currently implements WMC and " -"the simpler size metrics (NOM, NPA, NPM), with the inheritance- and coupling-" -"based ones tracked for future work." +"DIT, NOC, CBO, RFC, LCOM — is the single most-cited collection of OO " +"metrics in the academic literature; big-code-analysis currently implements " +"WMC and the simpler size metrics (NOM, NPA, NPM), with the inheritance- and " +"coupling-based ones tracked for future work." msgstr "" "**WMC** — _Weighted Methods per Class_(クラスあたりの重み付きメソッド数)— " -"は、[Chidamber と Kemerer のスイート](https://www.eso.org/~tcsmgr/oowg-forum/" -"TechMeetings/Articles/OOMetrics.pdf) の最初のメトリクスで、1994 年の IEEE " -"Transactions on Software Engineering 論文 _A Metrics Suite for Object " +"は、[Chidamber と Kemerer のスイート](https://www.eso.org/~tcsmgr/oowg-" +"forum/TechMeetings/Articles/OOMetrics.pdf) の最初のメトリクスで、1994 年の " +"IEEE Transactions on Software Engineering 論文 _A Metrics Suite for Object " "Oriented Design_(20 巻 6 号、476-493 ページ)で導入されました。CK スイート " "— WMC、DIT、NOC、CBO、RFC、LCOM — は、学術文献で最も引用されている OO メトリ" "クス集です。big-code-analysis は現在 WMC と、より単純なサイズメトリクス" -"(NOM、NPA、NPM)を実装しており、継承ベース・結合ベースのものは今後の課題とし" -"て追跡されています。" +"(NOM、NPA、NPM)を実装しており、継承ベース・結合ベースのものは今後の課題と" +"して追跡されています。" #: src/metrics.md:916 msgid "" "WMC is the **sum of the cyclomatic complexity of every method defined in a " "class**. The original paper deliberately left the \"weighting\" abstract — " -"Chidamber and Kemerer wrote that \"if all method complexities are considered " -"to be unity, then WMC = n, the number of methods\" — but the empirical " -"follow-up literature has almost universally settled on cyclomatic complexity " -"as the weight, and that is what big-code-analysis uses." +"Chidamber and Kemerer wrote that \"if all method complexities are " +"considered to be unity, then WMC = n, the number of methods\" — but the " +"empirical follow-up literature has almost universally settled on cyclomatic " +"complexity as the weight, and that is what big-code-analysis uses." msgstr "" "WMC は**クラス内で定義されたすべてのメソッドの循環的複雑度の合計**です。原論" -"文は「重み付け」を意図的に抽象的なままにしました。Chidamber と Kemerer は「す" -"べてのメソッドの複雑度を 1 と見なすなら、WMC = n、すなわちメソッド数になる」" -"と書いています。しかし、その後の経験的な追試文献はほぼ例外なく循環的複雑度を" -"重みとして採用しており、big-code-analysis もそれを使用します。" +"文は「重み付け」を意図的に抽象的なままにしました。Chidamber と Kemerer は" +"「すべてのメソッドの複雑度を 1 と見なすなら、WMC = n、すなわちメソッド数にな" +"る」と書いています。しかし、その後の経験的な追試文献はほぼ例外なく循環的複雑" +"度を重みとして採用しており、big-code-analysis もそれを使用します。" #: src/metrics.md:926 msgid "" "For each class or interface found by the per-language parser, big-code-" -"analysis sums the standard cyclomatic complexity of every method body inside " -"it (`src/metrics/wmc.rs`). The file-level serialised output is three fields: " -"`class_wmc_sum` (sum of WMC across all classes in the file), " -"`interface_wmc_sum` (sum across interfaces), and `total` (the two combined). " -"No min/max/average aggregation is emitted at the file scope — to rank " -"individual classes by WMC, use the report subcommand, which surfaces a _Type " -"hotspots (top N by WMC)_ section (see [Commands → Report](./commands/report." -"md))." -msgstr "" -"言語ごとのパーサーが見つけた各クラスまたはインターフェイスについて、big-code-" -"analysis はその内部のすべてのメソッド本体の標準的な循環的複雑度を合計します" -"(`src/metrics/wmc.rs`)。ファイルレベルのシリアライズされた出力は 3 つの" -"フィールドです。`class_wmc_sum`(ファイル内の全クラスにわたる WMC の合計)、" -"`interface_wmc_sum`(インターフェイスにわたる合計)、`total`(両者の合計)で" -"す。ファイルスコープでは min/max/average の集計は出力されません。個々のクラス" -"を WMC でランク付けするには、_Type hotspots (top N by WMC)_ セクションを表示" -"する report サブコマンドを使ってください([Commands → Report](./commands/" -"report.md) を参照)。" +"analysis sums the standard cyclomatic complexity of every method body " +"inside it (`src/metrics/wmc.rs`). The file-level serialised output is three " +"fields: `class_wmc_sum` (sum of WMC across all classes in the file), " +"`interface_wmc_sum` (sum across interfaces), and `total` (the two " +"combined). No min/max/average aggregation is emitted at the file scope — to " +"rank individual classes by WMC, use the report subcommand, which surfaces a " +"_Type hotspots (top N by WMC)_ section (see [Commands → Report](./commands/" +"report.md))." +msgstr "" +"言語ごとのパーサーが見つけた各クラスまたはインターフェイスについて、big-" +"code-analysis はその内部のすべてのメソッド本体の標準的な循環的複雑度を合計し" +"ます(`src/metrics/wmc.rs`)。ファイルレベルのシリアライズされた出力は 3 つ" +"のフィールドです。`class_wmc_sum`(ファイル内の全クラスにわたる WMC の合" +"計)、`interface_wmc_sum`(インターフェイスにわたる合計)、`total`(両者の合" +"計)です。ファイルスコープでは min/max/average の集計は出力されません。個々" +"のクラスを WMC でランク付けするには、_Type hotspots (top N by WMC)_ セクショ" +"ンを表示する report サブコマンドを使ってください([Commands → Report](./" +"commands/report.md) を参照)。" #: src/metrics.md:938 msgid "" "Chidamber and Kemerer offered three hypotheses about WMC, all of which have " "been validated repeatedly since:" msgstr "" -"Chidamber と Kemerer は WMC について 3 つの仮説を提示し、そのすべてがその後繰" -"り返し検証されてきました。" +"Chidamber と Kemerer は WMC について 3 つの仮説を提示し、そのすべてがその後" +"繰り返し検証されてきました。" #: src/metrics.md:941 msgid "" -"**Higher WMC predicts higher maintenance effort.** A class whose methods are " -"individually complex will resist comprehension." +"**Higher WMC predicts higher maintenance effort.** A class whose methods " +"are individually complex will resist comprehension." msgstr "" "**WMC が高いほど保守工数の増加を予測します。** 個々のメソッドが複雑なクラス" "は、理解しにくくなります。" @@ -2887,18 +2915,18 @@ msgid "" "**Higher WMC reduces reuse.** Classes that do many complicated things are " "hard to drop into a new context." msgstr "" -"**WMC が高いほど再利用が減ります。** 多くの複雑なことを行うクラスは、新しいコ" -"ンテキストに投入しにくいのです。" +"**WMC が高いほど再利用が減ります。** 多くの複雑なことを行うクラスは、新しい" +"コンテキストに投入しにくいのです。" #: src/metrics.md:945 msgid "" -"**Higher WMC suggests broader application-specific behaviour.** Such classes " -"tend to be \"main loop\"-style coordinators rather than reusable building " -"blocks." +"**Higher WMC suggests broader application-specific behaviour.** Such " +"classes tend to be \"main loop\"-style coordinators rather than reusable " +"building blocks." msgstr "" -"**WMC が高いほどアプリケーション固有の振る舞いが広いことを示唆します。** その" -"ようなクラスは、再利用可能な部品ではなく「メインループ」型のコーディネーター" -"になりがちです。" +"**WMC が高いほどアプリケーション固有の振る舞いが広いことを示唆します。** そ" +"のようなクラスは、再利用可能な部品ではなく「メインループ」型のコーディネー" +"ターになりがちです。" #: src/metrics.md:949 msgid "" @@ -2908,12 +2936,12 @@ msgid "" "NOM and high WMC has a few gargantuan methods (split the methods, not the " "class). A class with _both_ high NOM and high WMC is the classic God class." msgstr "" -"発展的な用途は **God クラス検出**です。NOM と組み合わせると、WMC はクラスを分" -"割すべきだという最も明確なシグナルの 1 つになります。NOM が高く WMC が低いク" -"ラスは受動的なデータホルダーです(おそらく問題ありません)。NOM が低く WMC が" -"高いクラスは、少数の巨大なメソッドを持っています(クラスではなくメソッドを分" -"割してください)。NOM と WMC の _両方_ が高いクラスが、古典的な God クラスで" -"す。" +"発展的な用途は **God クラス検出**です。NOM と組み合わせると、WMC はクラスを" +"分割すべきだという最も明確なシグナルの 1 つになります。NOM が高く WMC が低い" +"クラスは受動的なデータホルダーです(おそらく問題ありません)。NOM が低く " +"WMC が高いクラスは、少数の巨大なメソッドを持っています(クラスではなくメソッ" +"ドを分割してください)。NOM と WMC の _両方_ が高いクラスが、古典的な God ク" +"ラスです。" #: src/metrics.md:958 src/metrics-vcs.md:549 src/python/quick-start.md:93 #: src/python/traversal.md:128 @@ -2923,12 +2951,13 @@ msgstr "次のステップ" #: src/metrics.md:960 msgid "" "The [Supported Languages](./languages.md) chapter lists every supported " -"language and grammar. Metric coverage varies by language because some metric " -"definitions (`NPA`, `NPM`, `WMC`) only make sense in languages with classes." +"language and grammar. Metric coverage varies by language because some " +"metric definitions (`NPA`, `NPM`, `WMC`) only make sense in languages with " +"classes." msgstr "" -"[対応言語](./languages.md) の章では、対応しているすべての言語と文法を一覧して" -"います。一部のメトリクス定義(`NPA`、`NPM`、`WMC`)はクラスを持つ言語でしか意" -"味をなさないため、メトリクスの対応範囲は言語によって異なります。" +"[対応言語](./languages.md) の章では、対応しているすべての言語と文法を一覧し" +"ています。一部のメトリクス定義(`NPA`、`NPM`、`WMC`)はクラスを持つ言語でし" +"か意味をなさないため、メトリクスの対応範囲は言語によって異なります。" #: src/metrics.md:964 msgid "" @@ -2937,19 +2966,20 @@ msgid "" "commit frequency, churn, ownership, and the composite risk and hotspot " "scores — rather than from the source AST." msgstr "" -"[対応する変更履歴(VCS)メトリクス](./metrics-vcs.md) の章では、ソースの AST " -"ではなくバージョン管理履歴から導出される補完的なファミリー — コミット頻度、" -"チャーン、所有権、複合的なリスクスコアとホットスポットスコア — を扱います。" +"[対応する変更履歴(VCS)メトリクス](./metrics-vcs.md) の章では、ソースの " +"AST ではなくバージョン管理履歴から導出される補完的なファミリー — コミット頻" +"度、チャーン、所有権、複合的なリスクスコアとホットスポットスコア — を扱いま" +"す。" #: src/metrics.md:968 msgid "" -"The [Commands → Metrics](./commands/metrics.md) page documents how to invoke " -"`bca metrics` to produce the JSON / YAML / TOML / CBOR output for any of " -"these numbers." +"The [Commands → Metrics](./commands/metrics.md) page documents how to " +"invoke `bca metrics` to produce the JSON / YAML / TOML / CBOR output for " +"any of these numbers." msgstr "" "[Commands → Metrics](./commands/metrics.md) のページでは、これらの数値の " -"JSON / YAML / TOML / CBOR 出力を生成するための `bca metrics` の呼び出し方を説" -"明しています。" +"JSON / YAML / TOML / CBOR 出力を生成するための `bca metrics` の呼び出し方を" +"説明しています。" #: src/metrics.md:971 msgid "" @@ -2957,9 +2987,9 @@ msgid "" "examples of producing quality reports from these metrics, including " "pipelining them into dashboards." msgstr "" -"[レシピ](./recipes/quality-reports.md) の章では、これらのメトリクスから品質レ" -"ポートを生成するエンドツーエンドの例を示します。ダッシュボードへのパイプライ" -"ン連携も含みます。" +"[レシピ](./recipes/quality-reports.md) の章では、これらのメトリクスから品質" +"レポートを生成するエンドツーエンドの例を示します。ダッシュボードへのパイプラ" +"イン連携も含みます。" #: src/metrics-vcs.md:1 msgid "Supported Change-history (VCS) Metrics" @@ -2993,28 +3023,29 @@ msgid "" "commands/vcs.md) page documents the flags, windows, output formats, and " "caching. This chapter is the _why_; that page is the _how_." msgstr "" -"このファミリー全体は `bca vcs` コマンドで計算され、`bca metrics --vcs` の出力" -"に付加されます。[Commands → Change-history (VCS) metrics](./commands/vcs.md) " -"のページが、フラグ、ウィンドウ、出力形式、キャッシュを説明しています。この章" -"が 「なぜ」 を、あちらのページが _どうやって_ を担います。" +"このファミリー全体は `bca vcs` コマンドで計算され、`bca metrics --vcs` の出" +"力に付加されます。[Commands → Change-history (VCS) metrics](./commands/vcs." +"md) のページが、フラグ、ウィンドウ、出力形式、キャッシュを説明しています。こ" +"の章が 「なぜ」 を、あちらのページが _どうやって_ を担います。" #: src/metrics-vcs.md:22 msgid "" "**These metrics predict where defects cluster, not whether code is correct." "** The defect- and vulnerability-prediction literature consistently finds " "that _process_ signals — how a file has been edited over time — out-predict " -"_product_ signals like size or complexity. Graves _et al._ put it bluntly in " -"2000: the number of times a module has been changed is a better predictor of " -"its fault count than its length. None of these numbers measures correctness; " -"they rank files by the probability that a bug is hiding in one." +"_product_ signals like size or complexity. Graves _et al._ put it bluntly " +"in 2000: the number of times a module has been changed is a better " +"predictor of its fault count than its length. None of these numbers " +"measures correctness; they rank files by the probability that a bug is " +"hiding in one." msgstr "" "**これらのメトリクスは欠陥が集まりやすい場所を予測するものであり、コードが正" "しいかどうかを予測するものではありません。** 欠陥・脆弱性予測の文献は一貫し" -"て、_プロセス_ シグナル — ファイルが時間とともにどう編集されてきたか — が、サ" -"イズや複雑度のような _プロダクト_ シグナルを予測精度で上回ることを見いだして" -"います。Graves らは 2000 年に率直にこう述べました。モジュールの変更回数は、そ" -"の長さよりも優れた欠陥数の予測因子である、と。これらの数値はどれも正しさを測" -"定しません。バグが潜んでいる確率でファイルをランク付けするのです。" +"て、_プロセス_ シグナル — ファイルが時間とともにどう編集されてきたか — が、" +"サイズや複雑度のような _プロダクト_ シグナルを予測精度で上回ることを見いだし" +"ています。Graves らは 2000 年に率直にこう述べました。モジュールの変更回数" +"は、その長さよりも優れた欠陥数の予測因子である、と。これらの数値はどれも正し" +"さを測定しません。バグが潜んでいる確率でファイルをランク付けするのです。" #: src/metrics-vcs.md:30 msgid "" @@ -3050,13 +3081,13 @@ msgstr "" msgid "" "**An absent record is not a zero.** An untracked file has no record at all, " "which is distinct from a tracked file with zero in-window activity. A " -"computed `0.0` (for example, a file that only ever changed alone has zero co-" -"change entropy) is a real measurement." +"computed `0.0` (for example, a file that only ever changed alone has zero " +"co-change entropy) is a real measurement." msgstr "" -"**レコードが存在しないことはゼロではありません。** 追跡されていないファイルに" -"はレコードがまったく存在せず、これはウィンドウ内の活動がゼロの追跡対象ファイ" -"ルとは区別されます。計算結果としての `0.0`(たとえば、常に単独でしか変更され" -"なかったファイルの共変更エントロピーはゼロです)は実際の測定値です。" +"**レコードが存在しないことはゼロではありません。** 追跡されていないファイル" +"にはレコードがまったく存在せず、これはウィンドウ内の活動がゼロの追跡対象ファ" +"イルとは区別されます。計算結果としての `0.0`(たとえば、常に単独でしか変更さ" +"れなかったファイルの共変更エントロピーはゼロです)は実際の測定値です。" #: src/metrics-vcs.md:50 msgid "First connected to defects by" @@ -3213,9 +3244,9 @@ msgstr "コミット頻度" #: src/metrics-vcs.md:67 msgid "" -"The simplest change-history signal is how many distinct commits have touched " -"a file. big-code-analysis records it per window as `commits_long` and " -"`commits_recent`." +"The simplest change-history signal is how many distinct commits have " +"touched a file. big-code-analysis records it per window as `commits_long` " +"and `commits_recent`." msgstr "" "最も単純な変更履歴シグナルは、ファイルにいくつの個別コミットが触れたかです。" "big-code-analysis はこれをウィンドウごとに `commits_long` と " @@ -3252,22 +3283,22 @@ msgid "" "commit that touches it in three hunks both count as one." msgstr "" "1 回の履歴ウォークで、解析対象の ref から到達可能な各コミット(デフォルトで" -"は first-parent のみ、`--full-history` で完全な DAG)を訪問し、そのコミットが" -"変更する各ファイルに帰属させます。マージコミットは `--include-merges` を渡さ" -"ない限り除外され、リネームはデフォルトで追跡されるため、ファイルの履歴は移動" -"後も維持されます。ウォークが数えるのはファイルごと・ウィンドウごとの _個別コ" -"ミット数_ であり、diff やハンクの数ではありません。そのため、ファイルに 1 か" -"所だけ触れるコミットも 3 つのハンクで触れるコミットも、どちらも 1 とカウント" -"されます。" +"は first-parent のみ、`--full-history` で完全な DAG)を訪問し、そのコミット" +"が変更する各ファイルに帰属させます。マージコミットは `--include-merges` を渡" +"さない限り除外され、リネームはデフォルトで追跡されるため、ファイルの履歴は移" +"動後も維持されます。ウォークが数えるのはファイルごと・ウィンドウごとの _個別" +"コミット数_ であり、diff やハンクの数ではありません。そのため、ファイルに 1 " +"か所だけ触れるコミットも 3 つのハンクで触れるコミットも、どちらも 1 とカウン" +"トされます。" #: src/metrics-vcs.md:94 msgid "" -"Commit frequency is a rate, so it is only meaningful relative to a baseline: " -"this file versus its siblings, or this file this quarter versus last. A " -"consistently high count flags a file that is either under active feature " -"development or structurally unstable; pairing it with [code churn](#code-" -"churn) tells the two apart, since heavy churn on few commits is a different " -"story from light churn on many." +"Commit frequency is a rate, so it is only meaningful relative to a " +"baseline: this file versus its siblings, or this file this quarter versus " +"last. A consistently high count flags a file that is either under active " +"feature development or structurally unstable; pairing it with [code churn]" +"(#code-churn) tells the two apart, since heavy churn on few commits is a " +"different story from light churn on many." msgstr "" "コミット頻度はレートであるため、ベースラインとの比較においてのみ意味を持ちま" "す。すなわち、このファイルと兄弟ファイルの比較、あるいはこのファイルの今四半" @@ -3292,10 +3323,10 @@ msgstr "" msgid "" "Churn's defect-prediction pedigree is Nachiappan Nagappan and Thomas Ball's " "2005 ICSE paper [_Use of Relative Code Churn Measures to Predict System " -"Defect Density_](https://www.microsoft.com/en-us/research/publication/use-of-" -"relative-code-churn-measures-to-predict-system-defect-density/). Their key " -"finding, validated on Windows Server 2003, is that _absolute_ churn is a " -"poor predictor on its own, but churn _relative_ to file size and to the " +"Defect Density_](https://www.microsoft.com/en-us/research/publication/use-" +"of-relative-code-churn-measures-to-predict-system-defect-density/). Their " +"key finding, validated on Windows Server 2003, is that _absolute_ churn is " +"a poor predictor on its own, but churn _relative_ to file size and to the " "temporal spread of the changes is highly predictive of defect density. big-" "code-analysis keeps the raw windowed churn as a signal and lets the " "composite score combine it with size and recency, rather than reporting a " @@ -3303,14 +3334,14 @@ msgid "" msgstr "" "チャーンの欠陥予測としての系譜は、Nachiappan Nagappan と Thomas Ball による " "2005 年の ICSE 論文 [_Use of Relative Code Churn Measures to Predict System " -"Defect Density_](https://www.microsoft.com/en-us/research/publication/use-of-" -"relative-code-churn-measures-to-predict-system-defect-density/) にあります。" -"Windows Server 2003 で検証された彼らの主要な発見は、_絶対_ チャーン単独では予" -"測力が乏しい一方、ファイルサイズや変更の時間的な広がりに対する _相対_ チャー" -"ンは欠陥密度を高い精度で予測する、というものです。big-code-analysis はウィン" -"ドウごとの生のチャーンをシグナルとして保持し、単一の絶対値を判定として報告す" -"るのではなく、複合スコアがそれをサイズや新しさと組み合わせられるようにしてい" -"ます。" +"Defect Density_](https://www.microsoft.com/en-us/research/publication/use-" +"of-relative-code-churn-measures-to-predict-system-defect-density/) にありま" +"す。Windows Server 2003 で検証された彼らの主要な発見は、_絶対_ チャーン単独" +"では予測力が乏しい一方、ファイルサイズや変更の時間的な広がりに対する _相対_ " +"チャーンは欠陥密度を高い精度で予測する、というものです。big-code-analysis は" +"ウィンドウごとの生のチャーンをシグナルとして保持し、単一の絶対値を判定として" +"報告するのではなく、複合スコアがそれをサイズや新しさと組み合わせられるように" +"しています。" #: src/metrics-vcs.md:121 msgid "" @@ -3357,19 +3388,19 @@ msgstr "" #: src/metrics-vcs.md:144 msgid "" -"The signal follows directly from the recency principle that runs through the " -"change-history literature — Graves _et al._ found that recent changes weigh " -"more heavily on fault incidence than old ones, and the just-in-time defect-" -"prediction line (see the [JIT score](#just-in-time-commit-score)) is built " -"on the same observation. A file whose change history is _front-loaded into " -"the present_ is in active flux, and active flux is when defects enter." +"The signal follows directly from the recency principle that runs through " +"the change-history literature — Graves _et al._ found that recent changes " +"weigh more heavily on fault incidence than old ones, and the just-in-time " +"defect-prediction line (see the [JIT score](#just-in-time-commit-score)) is " +"built on the same observation. A file whose change history is _front-loaded " +"into the present_ is in active flux, and active flux is when defects enter." msgstr "" -"このシグナルは、変更履歴の研究文献を貫く新近性(recency)の原則から直接導かれ" -"ます。Graves _et al._ は、古い変更よりも最近の変更の方が欠陥発生に強く影響す" -"ることを見出しており、ジャストインタイム欠陥予測の系譜([JIT スコア](#just-" -"in-time-commit-score)を参照)も同じ観察の上に築かれています。変更履歴が _現在" -"に前倒しで集中している_ ファイルは活発な変動のさなかにあり、活発な変動こそ欠" -"陥が入り込む局面です。" +"このシグナルは、変更履歴の研究文献を貫く新近性(recency)の原則から直接導か" +"れます。Graves _et al._ は、古い変更よりも最近の変更の方が欠陥発生に強く影響" +"することを見出しており、ジャストインタイム欠陥予測の系譜([JIT スコア]" +"(#just-in-time-commit-score)を参照)も同じ観察の上に築かれています。変更履歴" +"が _現在に前倒しで集中している_ ファイルは活発な変動のさなかにあり、活発な変" +"動こそ欠陥が入り込む局面です。" #: src/metrics-vcs.md:154 msgid "" @@ -3397,11 +3428,11 @@ msgid "" "is the fraction of edits attributable to the single most active author; a " "low share means diffuse ownership, a high share means one person dominates." msgstr "" -"関連する 2 つのシグナルが、ファイルを _誰が_ 変更しているかを表します。**作者" -"数**(`authors_long`、`authors_recent`)は、各ウィンドウでそのファイルに触れ" -"た個別の人数を数えます。**所有権**(`ownership_top_share`、`[0, 1]` の比率)" -"は、最も活発な単一の作者に帰属する編集の割合です。低いシェアは所有権が分散し" -"ていることを、高いシェアは一人が支配的であることを意味します。" +"関連する 2 つのシグナルが、ファイルを _誰が_ 変更しているかを表します。**作" +"者数**(`authors_long`、`authors_recent`)は、各ウィンドウでそのファイルに触" +"れた個別の人数を数えます。**所有権**(`ownership_top_share`、`[0, 1]` の比" +"率)は、最も活発な単一の作者に帰属する編集の割合です。低いシェアは所有権が分" +"散していることを、高いシェアは一人が支配的であることを意味します。" #: src/metrics-vcs.md:169 msgid "" @@ -3415,11 +3446,11 @@ msgid "" "Meneely and Laurie Williams' 2009 CCS paper [_Secure Open Source " "Collaboration: An Empirical Study of Linus' Law_](https://dl.acm.org/" "doi/10.1145/1653662.1653717) reported that Red Hat Enterprise Linux 4 files " -"touched by nine or more developers were roughly sixteen times more likely to " -"harbour a vulnerability." +"touched by nine or more developers were roughly sixteen times more likely " +"to harbour a vulnerability." msgstr "" -"どちらも所有権とセキュリティに関する実証研究に遡ります。Christian Bird らによ" -"る 2011 年の FSE 論文 [_Don't Touch My Code! Examining the Effects of " +"どちらも所有権とセキュリティに関する実証研究に遡ります。Christian Bird らに" +"よる 2011 年の FSE 論文 [_Don't Touch My Code! Examining the Effects of " "Ownership on Software Quality_](https://www.microsoft.com/en-us/research/" "publication/dont-touch-my-code-examining-the-effects-of-ownership-on-" "software-quality/) は、Windows Vista と 7 を対象に、分散した所有権(専門性の" @@ -3427,9 +3458,9 @@ msgstr "" "障害の両方を予測することを見出しました。セキュリティ面では、Andrew Meneely " "と Laurie Williams による 2009 年の CCS 論文 [_Secure Open Source " "Collaboration: An Empirical Study of Linus' Law_](https://dl.acm.org/" -"doi/10.1145/1653662.1653717) が、Red Hat Enterprise Linux 4 において 9 人以上" -"の開発者が触れたファイルは脆弱性を抱える可能性がおよそ 16 倍高いと報告してい" -"ます。" +"doi/10.1145/1653662.1653717) が、Red Hat Enterprise Linux 4 において 9 人以" +"上の開発者が触れたファイルは脆弱性を抱える可能性がおよそ 16 倍高いと報告して" +"います。" #: src/metrics-vcs.md:184 msgid "" @@ -3442,10 +3473,10 @@ msgid "" "total edits in the window." msgstr "" "作者の同一性はリポジトリの `.mailmap` を通じて正規化され、小文字化したメール" -"アドレスでカウントされるため、2 つのアドレスでコミットする貢献者は 1 人として" -"数えられます。`Co-authored-by:` トレーラーは参加者を追加します。ボットの ID" -"(`dependabot[bot]`、`renovate[bot]`、`github-actions[bot]` など)はデフォル" -"トで除外され、自動化によるチャーンがカウントを膨らませないようになっていま" +"アドレスでカウントされるため、2 つのアドレスでコミットする貢献者は 1 人とし" +"て数えられます。`Co-authored-by:` トレーラーは参加者を追加します。ボットの " +"ID(`dependabot[bot]`、`renovate[bot]`、`github-actions[bot]` など)はデフォ" +"ルトで除外され、自動化によるチャーンがカウントを膨らませないようになっていま" "す。`ownership_top_share` は、ウィンドウ内でのそのファイルの総編集数に対する" "トップ作者の編集数の割合です。" @@ -3453,21 +3484,22 @@ msgstr "" msgid "" "A rising author count on a long-lived file is a knowledge-diffusion signal: " "more people are now obliged to understand it. The [composite risk score]" -"(#composite-risk-score) folds this in two ways — it scales the author factor " -"by an ownership-_dilution_ term `(1 - ownership_top_share)`, so the same " -"head-count counts for more when ownership is spread thin, and it adds " +"(#composite-risk-score) folds this in two ways — it scales the author " +"factor by an ownership-_dilution_ term `(1 - ownership_top_share)`, so the " +"same head-count counts for more when ownership is spread thin, and it adds " "categorical bumps at the six- and nine-developer marks that encode Meneely " "and Williams' RHEL4 thresholds. For knowledge concentration across a _set_ " "of files rather than within one, see the [bus factor](#bus-factor)." msgstr "" "長寿命のファイルで作者数が増えていくのは知識拡散のシグナルです。より多くの人" -"がそのファイルを理解する義務を負うようになったことを意味します。[複合リスクス" -"コア](#composite-risk-score)はこれを 2 つの形で織り込みます。作者ファクターを" -"所有権の _希薄化_ 項 `(1 - ownership_top_share)` でスケーリングするため、所有" -"権が薄く広がっているときほど同じ人数がより大きく効きます。さらに、Meneely と " -"Williams の RHEL4 しきい値を符号化した、開発者 6 人・9 人の節目でのカテゴリカ" -"ルな加点を行います。1 つのファイル内ではなくファイルの _集合_ をまたぐ知識の" -"集中については、[バスファクター](#bus-factor)を参照してください。" +"がそのファイルを理解する義務を負うようになったことを意味します。[複合リスク" +"スコア](#composite-risk-score)はこれを 2 つの形で織り込みます。作者ファク" +"ターを所有権の _希薄化_ 項 `(1 - ownership_top_share)` でスケーリングするた" +"め、所有権が薄く広がっているときほど同じ人数がより大きく効きます。さらに、" +"Meneely と Williams の RHEL4 しきい値を符号化した、開発者 6 人・9 人の節目で" +"のカテゴリカルな加点を行います。1 つのファイル内ではなくファイルの _集合_ を" +"またぐ知識の集中については、[バスファクター](#bus-factor)を参照してくださ" +"い。" #: src/metrics-vcs.md:204 msgid "Fix, security, and revert commits" @@ -3482,8 +3514,8 @@ msgid "" "`revert_commits` (subjects that are a revert or rollback)." msgstr "" "big-code-analysis は、ファイルに触れる長期ウィンドウ内の各コミットをメッセー" -"ジの意図で分類し、3 つのカウントを保持します。`bug_fix_commits`(バグ修正キー" -"ワードに一致するメッセージ)、`security_fix_commits`(`CVE-####`、" +"ジの意図で分類し、3 つのカウントを保持します。`bug_fix_commits`(バグ修正" +"キーワードに一致するメッセージ)、`security_fix_commits`(`CVE-####`、" "`security`、`vuln`、`exploit`、`sanitize` などに一致するメッセージ)、" "`revert_commits`(リバートまたはロールバックである件名)です。" @@ -3494,28 +3526,29 @@ msgid "" "[_When Do Changes Induce Fixes?_](https://dl.acm.org/" "doi/10.1145/1083142.1083147), the work now universally abbreviated _SZZ_. " "The premise is that a file's history of _corrective_ change is itself " -"predictive: a file that has needed many fixes is a file likely to need more. " -"A security fix is a sharper signal than an ordinary bug fix, and a revert " -"marks a change that had to be undone — a localized admission that something " -"went wrong there." +"predictive: a file that has needed many fixes is a file likely to need " +"more. A security fix is a sharper signal than an ordinary bug fix, and a " +"revert marks a change that had to be undone — a localized admission that " +"something went wrong there." msgstr "" "コミットの目的をメッセージから読み取る手法は、Jacek Śliwerski、Thomas " "Zimmermann、Andreas Zeller による 2005 年の MSR 論文 [_When Do Changes " "Induce Fixes?_](https://dl.acm.org/doi/10.1145/1083142.1083147) で導入された" -"もので、現在では _SZZ_ という略称で広く知られています。前提となるのは、ファイ" -"ルの _是正的_ 変更の履歴それ自体が予測力を持つということです。多くの修正を必" -"要としてきたファイルは、さらに修正を必要とする可能性が高いファイルです。セ" +"もので、現在では _SZZ_ という略称で広く知られています。前提となるのは、ファ" +"イルの _是正的_ 変更の履歴それ自体が予測力を持つということです。多くの修正を" +"必要としてきたファイルは、さらに修正を必要とする可能性が高いファイルです。セ" "キュリティ修正は通常のバグ修正より鋭いシグナルであり、リバートは取り消さざる" "を得なかった変更、つまりそこで何かがうまくいかなかったという局所的な自認を刻" "印します。" #: src/metrics-vcs.md:225 msgid "" -"Classification is keyword-based on the commit subject and body (see `src/vcs/" -"classify.rs`). It is deliberately simple and language- and tracker-agnostic: " -"there is no issue-tracker linkage and no blame back-tracing to the fix-" -"inducing commit, so this is the lightweight message-classification half of " -"SZZ, not the full algorithm. The counts are kept over the long window only." +"Classification is keyword-based on the commit subject and body (see `src/" +"vcs/classify.rs`). It is deliberately simple and language- and tracker-" +"agnostic: there is no issue-tracker linkage and no blame back-tracing to " +"the fix-inducing commit, so this is the lightweight message-classification " +"half of SZZ, not the full algorithm. The counts are kept over the long " +"window only." msgstr "" "分類はコミットの件名と本文に対するキーワードベースです(`src/vcs/classify." "rs` を参照)。意図的に単純で、言語にもトラッカーにも依存しません。課題トラッ" @@ -3549,8 +3582,8 @@ msgstr "経過日数と最終更新" msgid "" "Two timing signals bound a file's history. `age_days` is the number of days " "since the file's _first_ in-window commit (capped at the long window); " -"`last_modified_days` is the number of days since its _most recent_ in-window " -"commit." +"`last_modified_days` is the number of days since its _most recent_ in-" +"window commit." msgstr "" "2 つのタイミングシグナルがファイルの履歴を区切ります。`age_days` はファイル" "の _最初の_ ウィンドウ内コミットからの経過日数(長期ウィンドウを上限とす" @@ -3586,9 +3619,9 @@ msgstr "" "`age_days` の最大の用途は、[リスクスコア](#composite-risk-score)に供給される" "新規ファイルトリガーです。直近ウィンドウ内で初めて観測されたファイルは小さな" "加点を得ます。これは、できたばかりのコードが実行やレビューを経る機会を最も" -"持っていないことを反映しています。`last_modified_days` は逆方向の陳腐化の読み" -"取りです。何か月も触れられていない高リスクファイルと、今日編集されているファ" -"イルとでは、保守上の位置付けが異なります。" +"持っていないことを反映しています。`last_modified_days` は逆方向の陳腐化の読" +"み取りです。何か月も触れられていない高リスクファイルと、今日編集されている" +"ファイルとでは、保守上の位置付けが異なります。" #: src/metrics-vcs.md:266 msgid "Change entropy" @@ -3596,12 +3629,12 @@ msgstr "変更エントロピー" #: src/metrics-vcs.md:268 msgid "" -"**Change entropy** measures how _scattered_ the commits touching a file are. " -"It is reported per window as `change_entropy_long` and " +"**Change entropy** measures how _scattered_ the commits touching a file " +"are. It is reported per window as `change_entropy_long` and " "`change_entropy_recent`, in bits." msgstr "" -"**変更エントロピー**は、ファイルに触れるコミットがどれだけ 「分散」 しているか" -"を測ります。ウィンドウごとに `change_entropy_long` と " +"**変更エントロピー**は、ファイルに触れるコミットがどれだけ 「分散」 している" +"かを測ります。ウィンドウごとに `change_entropy_long` と " "`change_entropy_recent` として、ビット単位で報告されます。" #: src/metrics-vcs.md:272 @@ -3625,43 +3658,43 @@ msgstr "" "Shannon エントロピーをコミットに適用したものです。各コミットについて、チャー" "ンが触れたファイル間にどう分布するかを取り、その分布のエントロピーをビット単" "位で計算します。1 ファイルにしか触れないコミットは `0` となり、チャーンを " -"_n_ ファイルに均等に分散させるコミットは log₂(_n_) に近づきます。分散した横断" -"的コミットは、焦点の定まったコミットより理解が困難です。Hassan は、この変更プ" -"ロセスの複雑さが従来のコードベースのモデルや変更回数モデルよりも欠陥をよく予" -"測すると報告しました。後続の研究では、8 つの Apache プロジェクトにおいて、" -"ファイルレベルの変更エントロピーが欠陥数と最大 0.54 の Pearson 相関を示すこと" -"が測定されています([共変更エントロピー](#co-change-entropy)を参照)。" +"_n_ ファイルに均等に分散させるコミットは log₂(_n_) に近づきます。分散した横" +"断的コミットは、焦点の定まったコミットより理解が困難です。Hassan は、この変" +"更プロセスの複雑さが従来のコードベースのモデルや変更回数モデルよりも欠陥をよ" +"く予測すると報告しました。後続の研究では、8 つの Apache プロジェクトにおい" +"て、ファイルレベルの変更エントロピーが欠陥数と最大 0.54 の Pearson 相関を示" +"すことが測定されています([共変更エントロピー](#co-change-entropy)を参照)。" #: src/metrics-vcs.md:288 msgid "" "For each commit, big-code-analysis computes the Shannon entropy `H` of its " -"churn distribution across the touched files (see `src/vcs/entropy.rs`). Each " -"participating file is then credited its churn share `pᵢ·H` of that commit — " -"Hassan's History Complexity Metric — and these shares are summed per file " -"per window. A file repeatedly caught up in diffuse, multi-file changes " -"accumulates high change entropy; a file that only ever changes in tightly " -"focused commits stays low." +"churn distribution across the touched files (see `src/vcs/entropy.rs`). " +"Each participating file is then credited its churn share `pᵢ·H` of that " +"commit — Hassan's History Complexity Metric — and these shares are summed " +"per file per window. A file repeatedly caught up in diffuse, multi-file " +"changes accumulates high change entropy; a file that only ever changes in " +"tightly focused commits stays low." msgstr "" "big-code-analysis は各コミットについて、触れたファイル間のチャーン分布の " "Shannon エントロピー `H` を計算します(`src/vcs/entropy.rs` を参照)。次に、" "参加している各ファイルにそのコミットのチャーンシェア `pᵢ·H`(Hassan の " -"History Complexity Metric)を付与し、これらのシェアをファイルごと・ウィンドウ" -"ごとに合計します。拡散した複数ファイルの変更に繰り返し巻き込まれるファイルは" -"高い変更エントロピーを蓄積し、常に焦点の定まったコミットでのみ変更されるファ" -"イルは低いままです。" +"History Complexity Metric)を付与し、これらのシェアをファイルごと・ウィンド" +"ウごとに合計します。拡散した複数ファイルの変更に繰り返し巻き込まれるファイル" +"は高い変更エントロピーを蓄積し、常に焦点の定まったコミットでのみ変更される" +"ファイルは低いままです。" #: src/metrics-vcs.md:299 msgid "" "Change entropy distinguishes a file that changes _as part of large, " "sprawling edits_ from one that changes in self-contained commits, even when " "their raw churn is identical. High change entropy is a smell of _cross-" -"cutting concern_: edits to this file keep dragging in many others. It enters " -"the recent-window risk term additively, complementing rather than restating " -"the churn and commit counts." +"cutting concern_: edits to this file keep dragging in many others. It " +"enters the recent-window risk term additively, complementing rather than " +"restating the churn and commit counts." msgstr "" -"変更エントロピーは、生のチャーンが同一であっても、_大きく散漫な編集の一部とし" -"て_ 変更されるファイルと、自己完結したコミットで変更されるファイルを区別しま" -"す。高い変更エントロピーは _横断的関心事_ の兆候です。このファイルへの編集" +"変更エントロピーは、生のチャーンが同一であっても、_大きく散漫な編集の一部と" +"して_ 変更されるファイルと、自己完結したコミットで変更されるファイルを区別し" +"ます。高い変更エントロピーは _横断的関心事_ の兆候です。このファイルへの編集" "が、いつも多くの他ファイルを巻き込んでいるということです。これは直近ウィンド" "ウのリスク項に加算的に入り、チャーンやコミット数の言い換えではなく補完として" "働きます。" @@ -3693,15 +3726,15 @@ msgid "" "study found that adding co-change entropy to change entropy improved AUROC " "in 82.5% of cases over the prior signal set across eight Apache projects." msgstr "" -"このシグナルは 2025 年の研究 [_Co-Change Graph Entropy: A New Process Metric " -"for Defect Prediction_](https://arxiv.org/abs/2504.18511)(arXiv 2504.18511)" -"に由来します。2 つのファイルが同じコミットで変更されるたびに両者をエッジで結" -"び、共有コミット数を重みとする重み付きグラフを構築します。ファイルの共変更エ" -"ントロピーは、そのエッジ重み分布の Shannon エントロピーです。常に同じ 1 つの" -"相手とだけ共変更されるなら低く、変更が多くの異なるファイルへ波及するなら高く" -"なります。この研究では、8 つの Apache プロジェクトにおいて、変更エントロピー" -"に共変更エントロピーを加えることで、従来のシグナル集合に対して 82.5% のケース" -"で AUROC が改善したと報告されています。" +"このシグナルは 2025 年の研究 [_Co-Change Graph Entropy: A New Process " +"Metric for Defect Prediction_](https://arxiv.org/abs/2504.18511)(arXiv " +"2504.18511)に由来します。2 つのファイルが同じコミットで変更されるたびに両者" +"をエッジで結び、共有コミット数を重みとする重み付きグラフを構築します。ファイ" +"ルの共変更エントロピーは、そのエッジ重み分布の Shannon エントロピーです。常" +"に同じ 1 つの相手とだけ共変更されるなら低く、変更が多くの異なるファイルへ波" +"及するなら高くなります。この研究では、8 つの Apache プロジェクトにおいて、変" +"更エントロピーに共変更エントロピーを加えることで、従来のシグナル集合に対し" +"て 82.5% のケースで AUROC が改善したと報告されています。" #: src/metrics-vcs.md:327 msgid "" @@ -3717,22 +3750,22 @@ msgstr "" "て共変更グラフのエッジ重みを蓄積し、その後ウィンドウごとに各ファイルのエッジ" "重みエントロピーを計算します。1000 ファイル超に触れる一括インポートコミット" "は、エッジ数がコミット幅の 2 乗で増えるため共変更グラフから除外されますが、" -"(線形コストの)変更エントロピーには引き続き寄与します。計算結果の `0.0` は、" -"そのウィンドウにファイルの共変更相手が存在しないことを意味し、これは欠測では" -"なく実際の測定値です。" +"(線形コストの)変更エントロピーには引き続き寄与します。計算結果の `0.0` " +"は、そのウィンドウにファイルの共変更相手が存在しないことを意味し、これは欠測" +"ではなく実際の測定値です。" #: src/metrics-vcs.md:338 msgid "" "Where change entropy asks \"how scattered are the commits that touch this " "file?\", co-change entropy asks \"how many _other_ files does touching this " -"one drag along?\". A high value flags a file whose edits have unpredictable, " -"far-reaching consequences — a coupling hotspot. The two entropy signals are " -"designed to complement each other, and the [risk score](#composite-risk-" -"score) `v2` adds both recent-window terms together." +"one drag along?\". A high value flags a file whose edits have " +"unpredictable, far-reaching consequences — a coupling hotspot. The two " +"entropy signals are designed to complement each other, and the [risk score]" +"(#composite-risk-score) `v2` adds both recent-window terms together." msgstr "" "変更エントロピーが「このファイルに触れるコミットはどれだけ分散しているか」を" -"問うのに対し、共変更エントロピーは「このファイルに触れると 「他の」 ファイルを" -"いくつ巻き込むか」を問います。高い値は、編集の帰結が予測不能で広範囲に及ぶ" +"問うのに対し、共変更エントロピーは「このファイルに触れると 「他の」 ファイル" +"をいくつ巻き込むか」を問います。高い値は、編集の帰結が予測不能で広範囲に及ぶ" "ファイル、すなわち結合のホットスポットを示します。2 つのエントロピーシグナル" "は互いを補完するよう設計されており、[リスクスコア](#composite-risk-score) " "`v2` は両方の直近ウィンドウ項を加算します。" @@ -3752,8 +3785,8 @@ msgstr "" "**リスクスコア**は、上記のすべてのシグナルをファイルごとの単一の数値 " "`risk_score` に集約します。これは `bca vcs` の主要な出力であり、ランキング" "テーブルのソートキーとなるフィールドです。2 つの式が用意されており、どちらも" -"単一の `risk_score_version`(現在は `2`)で一緒にバージョン付けされるため、下" -"流の消費者は変更を検出できます。" +"単一の `risk_score_version`(現在は `2`)で一緒にバージョン付けされるため、" +"下流の消費者は変更を検出できます。" #: src/metrics-vcs.md:354 msgid "The weighted formula (default)" @@ -3768,8 +3801,8 @@ msgid "" msgstr "" "デフォルトの式は、カテゴリカルな乗算的加点を伴う対数スケールの重み付き和で" "す。カウントは `ln(1 + x)` に通されるため、10 コミットと 20 コミットの差は " -"110 と 120 の差よりも大きく効きます。これは変更活動が実際に飽和していく様子に" -"合致します。" +"110 と 120 の差よりも大きく効きます。これは変更活動が実際に飽和していく様子" +"に合致します。" #: src/metrics-vcs.md:375 msgid "" @@ -3780,34 +3813,34 @@ msgid "" "this chapter: recent churn and commit frequency carry the most weight " "(Nagappan & Ball; the JIT line), the author factor is scaled by ownership " "dilution (Bird _et al._) and bumped at the RHEL4 developer-count thresholds " -"(Meneely & Williams), security fixes are double-weighted, and the two recent-" -"window entropy terms enter additively (Hassan; arXiv 2504.18511). The full " -"derivation lives in `src/vcs/score.rs`." +"(Meneely & Williams), security fixes are double-weighted, and the two " +"recent-window entropy terms enter additively (Hassan; arXiv 2504.18511). " +"The full derivation lives in `src/vcs/score.rs`." msgstr "" "ここで `dilution = 1 - ownership_top_share` であり、`dev_bonus` は長期ウィン" "ドウの作者が 9 人以上で `0.35`、6 人以上で `0.15`、`new_file_bonus` は直近" "ウィンドウ内で初めて観測されたファイルに対して `0.15` です。重みは、本章で引" "用した文献に項ごとに根拠づけられています。直近のチャーンとコミット頻度が最大" "の重みを持ち(Nagappan & Ball、JIT 系)、作者ファクターは所有権の希薄化でス" -"ケーリングされ(Bird _et al._)、RHEL4 の開発者数しきい値で加点され(Meneely " -"& Williams)、セキュリティ修正は 2 倍に重み付けされ、2 つの直近ウィンドウのエ" -"ントロピー項は加算的に入ります(Hassan、arXiv 2504.18511)。完全な導出は " -"`src/vcs/score.rs` にあります。" +"ケーリングされ(Bird _et al._)、RHEL4 の開発者数しきい値で加点され" +"(Meneely & Williams)、セキュリティ修正は 2 倍に重み付けされ、2 つの直近" +"ウィンドウのエントロピー項は加算的に入ります(Hassan、arXiv 2504.18511)。完" +"全な導出は `src/vcs/score.rs` にあります。" #: src/metrics-vcs.md:387 msgid "" "The size term `ln(1 + sloc)² / 100` is a genuine contributor, not the tiny " "tie-breaker its position at the end of the sum might suggest: it reaches " -"about `0.85` at 10k SLOC and exceeds `1.0` past roughly 50k SLOC, comparable " -"in magnitude to the churn terms. Large files are only weakly correlated with " -"defects, but the squared-log scaling keeps size a first-class additive " -"signal rather than letting it dominate." +"about `0.85` at 10k SLOC and exceeds `1.0` past roughly 50k SLOC, " +"comparable in magnitude to the churn terms. Large files are only weakly " +"correlated with defects, but the squared-log scaling keeps size a first-" +"class additive signal rather than letting it dominate." msgstr "" -"サイズ項 `ln(1 + sloc)² / 100` は本物の寄与項であり、和の末尾という位置から想" -"像されるような小さなタイブレーカーではありません。10k SLOC で約 `0.85` に達" -"し、およそ 50k SLOC を超えると `1.0` を上回り、チャーン項に匹敵する大きさにな" -"ります。大きなファイルと欠陥の相関は弱いに過ぎませんが、2 乗対数スケーリング" -"により、サイズは支配的になることなく第一級の加算シグナルであり続けます。" +"サイズ項 `ln(1 + sloc)² / 100` は本物の寄与項であり、和の末尾という位置から" +"想像されるような小さなタイブレーカーではありません。10k SLOC で約 `0.85` に" +"達し、およそ 50k SLOC を超えると `1.0` を上回り、チャーン項に匹敵する大きさ" +"になります。大きなファイルと欠陥の相関は弱いに過ぎませんが、2 乗対数スケーリ" +"ングにより、サイズは支配的になることなく第一級の加算シグナルであり続けます。" #: src/metrics-vcs.md:394 msgid "The percentile formula" @@ -3825,9 +3858,9 @@ msgstr "" "`--risk-formula percentile` が代替の式です。各シグナルは解析対象の集合内での" "パーセンタイルに再ランク付けされ、ファイルごとのパーセンタイルの平均がスコア" "になります。これは、文献でチューニングされた重みをプロジェクト横断の頑健性と" -"引き換えにするものです。予測研究の文献は一般に、絶対的なハードしきい値よりも " -"_相対的_ トリガーを推奨しています。代償として、スコアは単一の実行のファイル集" -"合内でしか意味を持ちません。" +"引き換えにするものです。予測研究の文献は一般に、絶対的なハードしきい値より" +"も _相対的_ トリガーを推奨しています。代償として、スコアは単一の実行のファイ" +"ル集合内でしか意味を持ちません。" #: src/metrics-vcs.md:406 msgid "" @@ -3836,8 +3869,8 @@ msgid "" "compare a raw `risk_score` between two repositories, and do not read its " "magnitude as a defect probability. To watch a single file move over time, " "use [`bca vcs trend`](./commands/vcs.md#historical-trend-over-time), which " -"re-anchors the walk at each historical point so the series reflects what the " -"file actually looked like then." +"re-anchors the walk at each historical point so the series reflects what " +"the file actually looked like then." msgstr "" "このスコアは**順序尺度**です。リポジトリのファイルをこれでソートしてリストの" "上位を見る、というランキングを生み出すことがこのスコアの存在目的です。生の " @@ -3855,54 +3888,56 @@ msgstr "ホットスポットスコア" msgid "" "The **hotspot score** is the product of a file's complexity and its recent " "churn: `hotspot_score = cyclomatic_sum × churn_recent`. It is an `Option`, " -"present only when an AST complexity figure is computed alongside the history " -"(for example `bca metrics --metrics cyclomatic --vcs`), because it needs " -"both halves." +"present only when an AST complexity figure is computed alongside the " +"history (for example `bca metrics --metrics cyclomatic --vcs`), because it " +"needs both halves." msgstr "" "**ホットスポットスコア**は、ファイルの複雑度と直近チャーンの積です" -"(`hotspot_score = cyclomatic_sum × churn_recent`)。これは `Option` であり、" -"両方の半分を必要とするため、履歴と併せて AST 複雑度の数値が計算されている場合" -"(たとえば `bca metrics --metrics cyclomatic --vcs`)にのみ存在します。" +"(`hotspot_score = cyclomatic_sum × churn_recent`)。これは `Option` であ" +"り、両方の半分を必要とするため、履歴と併せて AST 複雑度の数値が計算されてい" +"る場合(たとえば `bca metrics --metrics cyclomatic --vcs`)にのみ存在しま" +"す。" #: src/metrics-vcs.md:422 msgid "" -"The metric is the central idea of Adam Tornhill's 2015 book [_Your Code as a " -"Crime Scene_](https://pragprog.com/titles/atcrime/your-code-as-a-crime-" +"The metric is the central idea of Adam Tornhill's 2015 book [_Your Code as " +"a Crime Scene_](https://pragprog.com/titles/atcrime/your-code-as-a-crime-" "scene/) and the CodeScene tooling built on it. The argument is that " "complexity _on its own_ is cheap to ignore — a complex file nobody touches " "costs nothing — and churn on its own is cheap too. The danger is their " "intersection: code that is both complicated _and_ changing often is where " -"defects concentrate and where developer effort is repeatedly spent. Tornhill " -"observes that a small fraction of a codebase typically accounts for a large " -"majority of its change activity, and the hotspot score is built to find that " -"fraction." +"defects concentrate and where developer effort is repeatedly spent. " +"Tornhill observes that a small fraction of a codebase typically accounts " +"for a large majority of its change activity, and the hotspot score is built " +"to find that fraction." msgstr "" "このメトリクスは、Adam Tornhill の 2015 年の著書 [_Your Code as a Crime " -"Scene_](https://pragprog.com/titles/atcrime/your-code-as-a-crime-scene/) と、" -"その上に築かれた CodeScene ツール群の中心的なアイデアです。論旨はこうです。複" -"雑さ _それ自体_ は無視しても安上がりで(誰も触れない複雑なファイルには何のコ" -"ストもかかりません)、チャーン単独もまた安上がりです。危険なのは両者の交差、" -"すなわち複雑で _かつ_ 頻繁に変更されているコードであり、そこに欠陥が集中し、" -"開発者の労力が繰り返し費やされます。Tornhill は、コードベースのごく一部が変更" -"活動の大半を占めるのが典型だと観察しており、ホットスポットスコアはその一部を" -"見つけるために作られています。" +"Scene_](https://pragprog.com/titles/atcrime/your-code-as-a-crime-scene/) " +"と、その上に築かれた CodeScene ツール群の中心的なアイデアです。論旨はこうで" +"す。複雑さ _それ自体_ は無視しても安上がりで(誰も触れない複雑なファイルには" +"何のコストもかかりません)、チャーン単独もまた安上がりです。危険なのは両者の" +"交差、すなわち複雑で _かつ_ 頻繁に変更されているコードであり、そこに欠陥が集" +"中し、開発者の労力が繰り返し費やされます。Tornhill は、コードベースのごく一" +"部が変更活動の大半を占めるのが典型だと観察しており、ホットスポットスコアはそ" +"の一部を見つけるために作られています。" #: src/metrics-vcs.md:436 msgid "" "Like the risk score, the hotspot product is ordinal: rank files by it, do " "not read the magnitude. The CLI uses the file-level cyclomatic sum as the " "complexity axis by convention, but any AST complexity figure serves. The " -"score's value is its _prioritisation_: of all the complex files, it surfaces " -"the ones actively being edited, which are both the likeliest to break and " -"the cheapest to refactor while they are already open on someone's screen." +"score's value is its _prioritisation_: of all the complex files, it " +"surfaces the ones actively being edited, which are both the likeliest to " +"break and the cheapest to refactor while they are already open on someone's " +"screen." msgstr "" "リスクスコアと同様、ホットスポットの積は順序尺度です。ファイルをこれでランク" "付けし、大きさそのものは読まないでください。CLI は慣例として複雑度の軸にファ" -"イルレベルの cyclomatic 合計を使いますが、どの AST 複雑度の数値でも役割を果た" -"します。このスコアの価値は _優先順位付け_ にあります。複雑なファイルすべての" -"中から、現に編集されているものを浮かび上がらせます。それらは最も壊れやすく、" -"かつ誰かの画面ですでに開かれている今こそ最も安上がりにリファクタリングできる" -"ファイルです。" +"イルレベルの cyclomatic 合計を使いますが、どの AST 複雑度の数値でも役割を果" +"たします。このスコアの価値は _優先順位付け_ にあります。複雑なファイルすべて" +"の中から、現に編集されているものを浮かび上がらせます。それらは最も壊れやす" +"く、かつ誰かの画面ですでに開かれている今こそ最も安上がりにリファクタリングで" +"きるファイルです。" #: src/metrics-vcs.md:444 msgid "Bus factor" @@ -3911,26 +3946,26 @@ msgstr "バスファクター" #: src/metrics-vcs.md:446 msgid "" "Where `ownership_top_share` measures knowledge concentration _within_ a " -"single file, the **bus factor** (also called the _truck factor_) measures it " -"_across a set of files_: the minimum number of developers whose departure " -"would leave more than half of a directory's files without a knowledgeable " -"maintainer. The broader concept has a [Wikipedia summary](https://en." -"wikipedia.org/wiki/Bus_factor); big-code-analysis emits it as a " +"single file, the **bus factor** (also called the _truck factor_) measures " +"it _across a set of files_: the minimum number of developers whose " +"departure would leave more than half of a directory's files without a " +"knowledgeable maintainer. The broader concept has a [Wikipedia summary]" +"(https://en.wikipedia.org/wiki/Bus_factor); big-code-analysis emits it as a " "`vcs_aggregate` object covering the whole repository, each top-level " "directory, and each of its immediate subdirectories." msgstr "" "`ownership_top_share` が単一ファイル 「内」 の知識集中を測るのに対し、**バス" -"ファクター**(_トラックファクター_ とも呼ばれます)はそれを _ファイル集合をま" -"たいで_ 測ります。その離脱によってディレクトリのファイルの半分超が知識ある保" -"守者を失うことになる、最小の開発者数です。この概念全般には [Wikipedia の概説]" -"(https://en.wikipedia.org/wiki/Bus_factor)があります。big-code-analysis はこ" -"れを、リポジトリ全体、各トップレベルディレクトリ、およびその直下のサブディレ" -"クトリを対象とする `vcs_aggregate` オブジェクトとして出力します。" +"ファクター**(_トラックファクター_ とも呼ばれます)はそれを _ファイル集合を" +"またいで_ 測ります。その離脱によってディレクトリのファイルの半分超が知識ある" +"保守者を失うことになる、最小の開発者数です。この概念全般には [Wikipedia の概" +"説](https://en.wikipedia.org/wiki/Bus_factor)があります。big-code-analysis " +"はこれを、リポジトリ全体、各トップレベルディレクトリ、およびその直下のサブ" +"ディレクトリを対象とする `vcs_aggregate` オブジェクトとして出力します。" #: src/metrics-vcs.md:456 msgid "" -"The estimation method is Guilherme Avelino, Leonardo Passos, Andre Hora, and " -"Marco Tulio Valente's 2016 ICPC paper [_A Novel Approach for Estimating " +"The estimation method is Guilherme Avelino, Leonardo Passos, Andre Hora, " +"and Marco Tulio Valente's 2016 ICPC paper [_A Novel Approach for Estimating " "Truck Factors_](https://arxiv.org/abs/1604.06766). Each developer's " "authorship of each file is scored with their _Degree-of-Authorship_ " "heuristic:" @@ -3943,15 +3978,16 @@ msgstr "" #: src/metrics-vcs.md:466 msgid "" -"where `FA` is first authorship (`1` if developer `d` created file `f`), `DL` " -"is `d`'s number of deliveries (changes) to `f`, and `AC` is the changes made " -"by _other_ developers. A developer is an **author** of a file when their " -"DoA, normalised by the file's maximum, clears `0.75` (the paper's threshold)." +"where `FA` is first authorship (`1` if developer `d` created file `f`), " +"`DL` is `d`'s number of deliveries (changes) to `f`, and `AC` is the " +"changes made by _other_ developers. A developer is an **author** of a file " +"when their DoA, normalised by the file's maximum, clears `0.75` (the " +"paper's threshold)." msgstr "" "ここで `FA` は最初の作者性(開発者 `d` がファイル `f` を作成していれば " -"`1`)、`DL` は `d` の `f` への提供(変更)回数、`AC` は 「他の」 開発者による変" -"更数です。開発者は、ファイルの最大値で正規化した DoA が `0.75`(論文のしきい" -"値)を超えるとき、そのファイルの**作者**とみなされます。" +"`1`)、`DL` は `d` の `f` への提供(変更)回数、`AC` は 「他の」 開発者によ" +"る変更数です。開発者は、ファイルの最大値で正規化した DoA が `0.75`(論文のし" +"きい値)を超えるとき、そのファイルの**作者**とみなされます。" #: src/metrics-vcs.md:474 msgid "" @@ -3973,20 +4009,20 @@ msgstr "" #: src/metrics-vcs.md:484 msgid "" "A bus factor of `1` means losing one person orphans the set — common, and " -"correct, for a repository of mostly single-author files. Treat the number as " -"a planning signal, not a guarantee: it is a heuristic over _observed_ " +"correct, for a repository of mostly single-author files. Treat the number " +"as a planning signal, not a guarantee: it is a heuristic over _observed_ " "authorship within the long window, so \"first authorship\" means the " -"earliest commit seen in that window, not necessarily a file's true creation. " -"Use it to find the directories where knowledge is dangerously concentrated " -"and spread review accordingly." -msgstr "" -"バスファクター `1` は、1 人を失うとその集合が孤児化することを意味します。これ" -"は、ほぼ単一作者のファイルからなるリポジトリではよくあることで、正しい結果で" -"す。この数値は保証ではなく計画のためのシグナルとして扱ってください。長期ウィ" -"ンドウ内で _観測された_ 作者性に対するヒューリスティックであり、「最初の作者" -"性」はそのウィンドウで観測された最初のコミットを意味し、必ずしもファイルの真" -"の作成を意味しません。知識が危険なほど集中しているディレクトリを見つけ、それ" -"に応じてレビューを分散させるために使ってください。" +"earliest commit seen in that window, not necessarily a file's true " +"creation. Use it to find the directories where knowledge is dangerously " +"concentrated and spread review accordingly." +msgstr "" +"バスファクター `1` は、1 人を失うとその集合が孤児化することを意味します。こ" +"れは、ほぼ単一作者のファイルからなるリポジトリではよくあることで、正しい結果" +"です。この数値は保証ではなく計画のためのシグナルとして扱ってください。長期" +"ウィンドウ内で _観測された_ 作者性に対するヒューリスティックであり、「最初の" +"作者性」はそのウィンドウで観測された最初のコミットを意味し、必ずしもファイル" +"の真の作成を意味しません。知識が危険なほど集中しているディレクトリを見つけ、" +"それに応じてレビューを分散させるために使ってください。" #: src/metrics-vcs.md:492 msgid "Just-in-time commit score" @@ -3995,29 +4031,29 @@ msgstr "ジャストインタイムコミットスコア" #: src/metrics-vcs.md:494 msgid "" "Everything above ranks _files_ at a point in time. The **just-in-time (JIT) " -"score** instead scores a single _commit_ for its defect-induction risk — the " -"unit a continuous-integration gate actually reviews at check-in. It is " +"score** instead scores a single _commit_ for its defect-induction risk — " +"the unit a continuous-integration gate actually reviews at check-in. It is " "produced by `bca vcs commit ` and reported as an ordinal " "`risk_score` with a per-group `contributions` breakdown." msgstr "" "ここまでのすべては、ある時点での 「ファイル」 をランク付けするものでした。**" -"ジャストインタイム(JIT)スコア**は代わりに、単一の 「コミット」 をその欠陥誘発" -"リスクについてスコア付けします。これは継続的インテグレーションのゲートが" +"ジャストインタイム(JIT)スコア**は代わりに、単一の 「コミット」 をその欠陥" +"誘発リスクについてスコア付けします。これは継続的インテグレーションのゲートが" "チェックイン時に実際にレビューする単位です。`bca vcs commit ` が生成" -"し、グループごとの `contributions` 内訳を伴う順序尺度の `risk_score` として報" -"告されます。" +"し、グループごとの `contributions` 内訳を伴う順序尺度の `risk_score` として" +"報告されます。" #: src/metrics-vcs.md:501 msgid "" "The feature groups and their signs are taken from the just-in-time defect-" "prediction literature, beginning with Yasutaka Kamei and colleagues' 2013 " "IEEE TSE paper [_A Large-Scale Empirical Study of Just-in-Time Quality " -"Assurance_](https://doi.org/10.1109/TSE.2013.2386) and confirmed by the open " -"replications [Commit Guru](https://doi.org/10.1145/2786805.2803183) (FSE " -"2015) and Shane McIntosh and Yasutaka Kamei's [_Are Fix-Inducing Changes a " -"Moving Target?_](https://doi.org/10.1109/TSE.2017.2693980) (IEEE TSE 2018). " -"big-code-analysis implements a static, rule-based scorer rather than a " -"trained model, so nothing drifts as the project ages." +"Assurance_](https://doi.org/10.1109/TSE.2013.2386) and confirmed by the " +"open replications [Commit Guru](https://doi.org/10.1145/2786805.2803183) " +"(FSE 2015) and Shane McIntosh and Yasutaka Kamei's [_Are Fix-Inducing " +"Changes a Moving Target?_](https://doi.org/10.1109/TSE.2017.2693980) (IEEE " +"TSE 2018). big-code-analysis implements a static, rule-based scorer rather " +"than a trained model, so nothing drifts as the project ages." msgstr "" "特徴量グループとその符号は、Yasutaka Kamei らによる 2013 年の IEEE TSE 論文 " "[_A Large-Scale Empirical Study of Just-in-Time Quality Assurance_](https://" @@ -4079,8 +4115,8 @@ msgstr "**履歴**" #: src/metrics-vcs.md:522 msgid "" -"the touched files' priors — prior changes, distinct authors, fix counts, and " -"their composite risk — measured _before_ the commit" +"the touched files' priors — prior changes, distinct authors, fix counts, " +"and their composite risk — measured _before_ the commit" msgstr "" "触れたファイルの事前値(過去の変更回数、個別作者数、修正回数、およびそれらの" "複合リスク)をコミット _前_ に測定したもの" @@ -4117,40 +4153,40 @@ msgstr "修正は加算、リバートは減衰" msgid "" "The `contributions` block reports each group's signed contribution, so a " "consumer can see _why_ a commit ranked where it did. A merge commit is " -"flagged and scored against its first parent; a root commit and any new files " -"carry zero priors by construction, so the score then leans on size and " -"author experience, exactly as the literature prescribes for changes with no " -"file history. A bare `git diff` can also be scored (`bca vcs commit --" -"diff`), but only the size and diffusion groups are computable from a diff, " -"so that path emits a deliberately partial `partial_risk_score`." +"flagged and scored against its first parent; a root commit and any new " +"files carry zero priors by construction, so the score then leans on size " +"and author experience, exactly as the literature prescribes for changes " +"with no file history. A bare `git diff` can also be scored (`bca vcs commit " +"--diff`), but only the size and diffusion groups are computable from a " +"diff, so that path emits a deliberately partial `partial_risk_score`." msgstr "" "`contributions` ブロックは各グループの符号付き寄与を報告するため、消費者はコ" -"ミットが 「なぜ」 その位置にランクされたかを確認できます。マージコミットはフラ" -"グ付けされ、第一親に対してスコア付けされます。ルートコミットと新規ファイルは" -"構造上、事前値がゼロになるため、スコアはサイズと作者の経験に依拠します。これ" -"はファイル履歴のない変更に対して文献が定める通りの挙動です。素の `git diff` " -"もスコア付けできます(`bca vcs commit --diff`)が、diff から計算できるのはサ" -"イズと拡散度のグループだけなので、その経路は意図的に部分的な " +"ミットが 「なぜ」 その位置にランクされたかを確認できます。マージコミットはフ" +"ラグ付けされ、第一親に対してスコア付けされます。ルートコミットと新規ファイル" +"は構造上、事前値がゼロになるため、スコアはサイズと作者の経験に依拠します。こ" +"れはファイル履歴のない変更に対して文献が定める通りの挙動です。素の `git " +"diff` もスコア付けできます(`bca vcs commit --diff`)が、diff から計算できる" +"のはサイズと拡散度のグループだけなので、その経路は意図的に部分的な " "`partial_risk_score` を出力します。" #: src/metrics-vcs.md:538 msgid "" -"Like the file-level score, the JIT score is **ordinal**: rank commits by it, " -"or compare a commit against the repository's own commit-score distribution, " -"but do not read the magnitude as a probability. Its intended use is a check-" -"in gate — `bca vcs commit HEAD --fail-above ` exits non-zero when a " -"commit scores at or above a threshold — with the threshold calibrated " -"against your own history rather than treated as an absolute. Any change to " -"the formula bumps a `jit_score_version` that is independent of the file-" -"level `risk_score_version`." +"Like the file-level score, the JIT score is **ordinal**: rank commits by " +"it, or compare a commit against the repository's own commit-score " +"distribution, but do not read the magnitude as a probability. Its intended " +"use is a check-in gate — `bca vcs commit HEAD --fail-above ` exits non-" +"zero when a commit scores at or above a threshold — with the threshold " +"calibrated against your own history rather than treated as an absolute. Any " +"change to the formula bumps a `jit_score_version` that is independent of " +"the file-level `risk_score_version`." msgstr "" "ファイルレベルのスコアと同様、JIT スコアは**順序尺度**です。コミットをこれで" "ランク付けするか、リポジトリ自身のコミットスコア分布と比較してください。ただ" "し、その大きさを確率として読んではいけません。想定される用途はチェックイン" -"ゲートです。`bca vcs commit HEAD --fail-above ` は、コミットのスコアがしき" -"い値以上のとき非ゼロで終了します。しきい値は絶対値として扱うのではなく、自分" -"たちの履歴に照らして調整してください。式に対するいかなる変更も、ファイルレベ" -"ルの `risk_score_version` とは独立した `jit_score_version` を上げます。" +"ゲートです。`bca vcs commit HEAD --fail-above ` は、コミットのスコアがし" +"きい値以上のとき非ゼロで終了します。しきい値は絶対値として扱うのではなく、自" +"分たちの履歴に照らして調整してください。式に対するいかなる変更も、ファイルレ" +"ベルの `risk_score_version` とは独立した `jit_score_version` を上げます。" #: src/metrics-vcs.md:551 msgid "" @@ -4159,8 +4195,8 @@ msgid "" "format, and use the persistent history cache." msgstr "" "[コマンド → 変更履歴(VCS)メトリクス](./commands/vcs.md)のページでは、`bca " -"vcs` の呼び出し方、ウィンドウの設定、出力形式の選択、永続的な履歴キャッシュの" -"使い方を説明しています。" +"vcs` の呼び出し方、ウィンドウの設定、出力形式の選択、永続的な履歴キャッシュ" +"の使い方を説明しています。" #: src/metrics-vcs.md:554 msgid "" @@ -4178,8 +4214,8 @@ msgid "" "shows the same family through the `big_code_analysis.vcs` module." msgstr "" "[Python バインディング → 変更履歴(VCS)メトリクス](./python/vcs.md)のページ" -"では、同じファミリーを `big_code_analysis.vcs` モジュールから利用する方法を示" -"します。" +"では、同じファミリーを `big_code_analysis.vcs` モジュールから利用する方法を" +"示します。" #: src/migration.md:1 msgid "Migration: Flag CLI to Subcommand CLI" @@ -4187,9 +4223,9 @@ msgstr "移行: フラグ CLI からサブコマンド CLI へ" #: src/migration.md:3 msgid "" -"The CLI was restructured from a flat flag-style interface (one process, many " -"mutually-exclusive `--action` flags) into a subcommand-style interface (`bca " -"`). This page maps every old invocation to its replacement." +"The CLI was restructured from a flat flag-style interface (one process, " +"many mutually-exclusive `--action` flags) into a subcommand-style interface " +"(`bca `). This page maps every old invocation to its replacement." msgstr "" "CLI は、フラットなフラグスタイルのインターフェイス(1 つのプロセスに相互排他" "的な多数の `--action` フラグ)からサブコマンドスタイルのインターフェイス" @@ -4209,18 +4245,18 @@ msgid "" "global flags that only applied to one format. Future aggregated formats (e." "g. HTML) would compound the fragility." msgstr "" -"フラグ CLI は `--output-format` に 2 つの無関係な意味を重ねていました。ファイ" -"ルごとのシリアライズ(`-O json/yaml/toml/cbor`)と、ウォーク後の集約レポート" -"(`-O markdown`)です。不正な組み合わせを取り締まるために 2 つの clap " -"`ArgGroup` に加えてランタイムチェックが必要で、`--top` / `--strip-prefix` は " -"1 つの形式にしか適用されないのにグローバルフラグとして存在していました。将来" -"の集約形式(たとえば HTML)はこの脆さをさらに悪化させたでしょう。" +"フラグ CLI は `--output-format` に 2 つの無関係な意味を重ねていました。ファ" +"イルごとのシリアライズ(`-O json/yaml/toml/cbor`)と、ウォーク後の集約レポー" +"ト(`-O markdown`)です。不正な組み合わせを取り締まるために 2 つの clap " +"`ArgGroup` に加えてランタイムチェックが必要で、`--top` / `--strip-prefix` " +"は 1 つの形式にしか適用されないのにグローバルフラグとして存在していました。" +"将来の集約形式(たとえば HTML)はこの脆さをさらに悪化させたでしょう。" #: src/migration.md:17 msgid "" -"The subcommand CLI fixes the structure: `bca metrics` and `bca ops` emit per-" -"file output; `bca report ` emits an aggregated report; each verb has " -"its own scoped flag set." +"The subcommand CLI fixes the structure: `bca metrics` and `bca ops` emit " +"per-file output; `bca report ` emits an aggregated report; each " +"verb has its own scoped flag set." msgstr "" "サブコマンド CLI はこの構造を修正します。`bca metrics` と `bca ops` はファイ" "ルごとの出力を、`bca report ` は集約レポートを出力し、各動詞は自分専" @@ -4255,7 +4291,8 @@ msgid "`metrics -O json/yaml/toml/cbor`" msgstr "`metrics -O json/yaml/toml/cbor`" #: src/migration.md:27 -msgid "`--metrics -O checkstyle/sarif/code-climate/clang-warning/msvc-warning`" +msgid "" +"`--metrics -O checkstyle/sarif/code-climate/clang-warning/msvc-warning`" msgstr "" "`--metrics -O checkstyle/sarif/code-climate/clang-warning/msvc-warning`" @@ -4352,8 +4389,8 @@ msgid "" "`--line-start`, `--line-end` on `dump`/`find` (`--ls`/`--le` kept as " "deprecated aliases)" msgstr "" -"`dump`/`find` の `--line-start`、`--line-end`(`--ls`/`--le` は非推奨のエイリ" -"アスとして残存)" +"`dump`/`find` の `--line-start`、`--line-end`(`--ls`/`--le` は非推奨のエイ" +"リアスとして残存)" #: src/migration.md:39 msgid "`-p`, `-I`, `-X`, `-j`, `-l`" @@ -4363,8 +4400,8 @@ msgstr "`-p`, `-I`, `-X`, `-j`, `-l`" msgid "" "scoped to the subcommand; pass them _after_ the verb (`-w` stays universal)" msgstr "" -"サブコマンドにスコープされます。動詞の _後に_ 渡してください(`-w` は引き続き" -"全体共通)" +"サブコマンドにスコープされます。動詞の _後に_ 渡してください(`-w` は引き続" +"き全体共通)" #: src/migration.md:41 msgid "Side-by-side examples" @@ -4455,8 +4492,8 @@ msgid "" "Note: `count` now takes one node type per positional argument (space " "separated) rather than one comma-separated string." msgstr "" -"注意: `count` は、カンマ区切りの 1 つの文字列ではなく、引数 1 つにつき 1 つの" -"ノード型(スペース区切り)を受け取るようになりました。" +"注意: `count` は、カンマ区切りの 1 つの文字列ではなく、引数 1 つにつき 1 つ" +"のノード型(スペース区切り)を受け取るようになりました。" #: src/migration.md:101 msgid "Function spans" @@ -4519,18 +4556,26 @@ msgstr "" msgid "" "**bca** offers a range of **commands** to analyze and extract information " "from source code. Each command **may** include parameters specific to the " -"task it performs. Below, we describe the core types of commands available in " -"**bca**." -msgstr "**bca**は、ソースコードを解析して情報を抽出するためのさまざまな**コマンド**を提供します。各コマンドは、実行するタスクに固有のパラメーターを持つ**場合があります**。以下では、**bca** で利用できる主要なコマンドの種類を説明します。" +"task it performs. Below, we describe the core types of commands available " +"in **bca**." +msgstr "" +"**bca**は、ソースコードを解析して情報を抽出するためのさまざまな**コマンド**" +"を提供します。各コマンドは、実行するタスクに固有のパラメーターを持つ**場合が" +"あります**。以下では、**bca** で利用できる主要なコマンドの種類を説明します。" #: src/commands/index.md:10 msgid "" "The `bca` command-line tool is available as a pip-installable wheel. The " -"**distribution name is `big-code-analysis-cli`** and the installed **command " -"is `bca`** — the two differ deliberately (the `bca` name on PyPI belongs to " -"an unrelated project, and `big-code-analysis` is this project's importable " -"_library_ bindings):" -msgstr "`bca` コマンドラインツールは、pip でインストールできる wheel として提供されています。**配布名は `big-code-analysis-cli`**で、インストールされる**コマンドは `bca`** です — この 2 つは意図的に異なります(PyPI 上の `bca` という名前は無関係なプロジェクトのものであり、`big-code-analysis` は本プロジェクトのインポート可能な _ライブラリ_ バインディングです):" +"**distribution name is `big-code-analysis-cli`** and the installed " +"**command is `bca`** — the two differ deliberately (the `bca` name on PyPI " +"belongs to an unrelated project, and `big-code-analysis` is this project's " +"importable _library_ bindings):" +msgstr "" +"`bca` コマンドラインツールは、pip でインストールできる wheel として提供され" +"ています。**配布名は `big-code-analysis-cli`**で、インストールされる**コマン" +"ドは `bca`** です — この 2 つは意図的に異なります(PyPI 上の `bca` という名" +"前は無関係なプロジェクトのものであり、`big-code-analysis` は本プロジェクトの" +"インポート可能な _ライブラリ_ バインディングです):" #: src/commands/index.md:17 msgid "# installs the `bca` command on PATH\n" @@ -4541,21 +4586,21 @@ msgid "" "This drops the compiled `bca` binary onto your `PATH` the way `pip install " "ruff` gives you the `ruff` command — no Rust toolchain required. The wheel " "carries the full `all-languages` grammar set, so every [supported language]" -"(../languages.md) works out of the box. A single `py3-none-` wheel " -"covers every CPython 3.x (and PyPy) on that platform; prebuilt wheels ship " -"for Linux (`manylinux_2_28` `x86_64` / `aarch64`), macOS (`x86_64` / " +"(../languages.md) works out of the box. A single `py3-none-` " +"wheel covers every CPython 3.x (and PyPy) on that platform; prebuilt wheels " +"ship for Linux (`manylinux_2_28` `x86_64` / `aarch64`), macOS (`x86_64` / " "`arm64`), and Windows (`x86_64`). On any other platform `pip` falls back to " "a source build, which needs a Rust toolchain." msgstr "" -"これにより、`pip install ruff` が `ruff` コマンドを提供するのと同じように、コ" -"ンパイル済みの `bca` バイナリが `PATH` に配置されます — Rust ツールチェインは" -"不要です。wheel には完全な `all-languages` 文法セットが含まれているため、すべ" -"ての [対応言語](../languages.md) が追加設定なしで動作します。単一の `py3-" -"none-` wheel が、そのプラットフォーム上のすべての CPython 3.x(およ" -"び PyPy)をカバーします。ビルド済み wheel は Linux(`manylinux_2_28` " +"これにより、`pip install ruff` が `ruff` コマンドを提供するのと同じように、" +"コンパイル済みの `bca` バイナリが `PATH` に配置されます — Rust ツールチェイ" +"ンは不要です。wheel には完全な `all-languages` 文法セットが含まれているた" +"め、すべての [対応言語](../languages.md) が追加設定なしで動作します。単一の " +"`py3-none-` wheel が、そのプラットフォーム上のすべての CPython 3.x" +"(および PyPy)をカバーします。ビルド済み wheel は Linux(`manylinux_2_28` " "`x86_64` / `aarch64`)、macOS(`x86_64` / `arm64`)、Windows(`x86_64`)向け" -"に提供されます。それ以外のプラットフォームでは `pip` はソースビルドにフォール" -"バックし、その場合は Rust ツールチェインが必要です。" +"に提供されます。それ以外のプラットフォームでは `pip` はソースビルドにフォー" +"ルバックし、その場合は Rust ツールチェインが必要です。" #: src/commands/index.md:31 msgid "" @@ -4591,14 +4636,14 @@ msgid "" "`bca` follows one exit-code convention across every subcommand, so CI " "scripts can branch on the process status without inspecting output:" msgstr "" -"`bca` はすべてのサブコマンドで単一の終了コード規約に従うため、CI スクリプトは" -"出力を検査せずにプロセスのステータスで分岐できます:" +"`bca` はすべてのサブコマンドで単一の終了コード規約に従うため、CI スクリプト" +"は出力を検査せずにプロセスのステータスで分岐できます:" -#: src/commands/index.md:46 src/commands/check.md:17 src/commands/check.md:32 +#: src/commands/index.md:46 src/commands/check.md:17 src/commands/check.md:42 msgid "Code" msgstr "コード" -#: src/commands/index.md:48 src/commands/check.md:19 src/commands/check.md:34 +#: src/commands/index.md:48 src/commands/check.md:19 src/commands/check.md:44 msgid "`0`" msgstr "`0`" @@ -4606,22 +4651,23 @@ msgstr "`0`" msgid "Success." msgstr "成功。" -#: src/commands/index.md:49 src/commands/check.md:21 src/commands/check.md:35 +#: src/commands/index.md:49 src/commands/check.md:21 src/commands/check.md:45 msgid "`1`" msgstr "`1`" #: src/commands/index.md:49 msgid "" "Tool error — a bad flag / threshold / glob spec, unreadable input, or a " -"parse failure. This includes **usage errors** (unknown flag, bad subcommand, " -"a malformed `--threshold` value rejected by clap). **Never** a metric signal." +"parse failure. This includes **usage errors** (unknown flag, bad " +"subcommand, a malformed `--threshold` value rejected by clap). **Never** a " +"metric signal." msgstr "" "ツールエラー — 不正なフラグ / しきい値 / glob 指定、読み取れない入力、または" -"パース失敗。**使用方法エラー**(未知のフラグ、不正なサブコマンド、clap に拒否" -"された不正な `--threshold` 値)も含まれます。**決して** メトリクスのシグナル" -"ではありません。" +"パース失敗。**使用方法エラー**(未知のフラグ、不正なサブコマンド、clap に拒" +"否された不正な `--threshold` 値)も含まれます。**決して** メトリクスのシグナ" +"ルではありません。" -#: src/commands/index.md:50 src/commands/check.md:20 src/commands/check.md:36 +#: src/commands/index.md:50 src/commands/check.md:20 src/commands/check.md:46 msgid "`2`" msgstr "`2`" @@ -4629,8 +4675,8 @@ msgstr "`2`" msgid "" "Metric gate: [`check`](check.md) thresholds were exceeded, [`vcs commit --" "fail-above`](vcs.md) was breached, or [`diff`](../recipes/exporting-data." -"md) / [`diff-baseline`](../recipes/baselines.md) under `--exit-code` found a " -"non-empty filtered diff." +"md) / [`diff-baseline`](../recipes/baselines.md) under `--exit-code` found " +"a non-empty filtered diff." msgstr "" "メトリクスゲート: [`check`](check.md) のしきい値を超過した、[`vcs commit --" "fail-above`](vcs.md) に違反した、または `--exit-code` 指定時の [`diff`](../" @@ -4643,84 +4689,177 @@ msgstr "`3`–`5`" #: src/commands/index.md:51 msgid "" -"[`check --exit-codes=tiered`](check.md#tiered-exit-codes---exit-codestiered) " -"only: tiered violation severity (regression-only / mixed / hard-breach; in " -"tiered mode code `2` means new-only)." +"[`check --exit-codes=tiered`](check.md#tiered-exit-codes---exit-" +"codestiered) only: tiered violation severity (regression-only / mixed / " +"hard-breach; in tiered mode code `2` means new-only)." msgstr "" -"[`check --exit-codes=tiered`](check.md#tiered-exit-codes---exit-codestiered) " -"のみ: 段階化された違反の重大度(回帰のみ / 混在 / ハード違反。tiered モードで" -"はコード `2` は新規のみを意味します)。" +"[`check --exit-codes=tiered`](check.md#tiered-exit-codes---exit-" +"codestiered) のみ: 段階化された違反の重大度(回帰のみ / 混在 / ハード違反。" +"tiered モードではコード `2` は新規のみを意味します)。" #: src/commands/index.md:53 msgid "" "Codes `2`–`5` are gate signals, emitted only by [`check`](check.md), [`vcs " -"commit --fail-above`](vcs.md), and `diff` / `diff-baseline` under the opt-in " -"`--exit-code` flag; they report a metric result, not a failure of the tool. " -"Every other subcommand — `metrics`, `ops`, `report`, `diff`, `diff-" -"baseline`, `exemptions`, `init`, and the rest — exits `0` on success and `1` " -"on error. Because `1` is reserved for tool errors — usage errors included, " -"so a typo'd flag never lands in the gate band — CI can always distinguish " -"\"the gate found a regression\" (`2`–`5`) from \"the tool itself " -"crashed\" (`1`)." +"commit --fail-above`](vcs.md), and `diff` / `diff-baseline` under the opt-" +"in `--exit-code` flag; they report a metric result, not a failure of the " +"tool. Every other subcommand — `metrics`, `ops`, `report`, `diff`, `diff-" +"baseline`, `exemptions`, `init`, and the rest — exits `0` on success and " +"`1` on error. Because `1` is reserved for tool errors — usage errors " +"included, so a typo'd flag never lands in the gate band — CI can always " +"distinguish \"the gate found a regression\" (`2`–`5`) from \"the tool " +"itself crashed\" (`1`)." msgstr "" "コード `2`–`5` はゲートシグナルであり、[`check`](check.md)、[`vcs commit --" "fail-above`](vcs.md)、およびオプトインの `--exit-code` フラグ指定時の " -"`diff` / `diff-baseline` だけが発行します。これらはメトリクスの結果を報告する" -"ものであって、ツール自体の失敗ではありません。それ以外のすべてのサブコマンド " -"— `metrics`、`ops`、`report`、`diff`、`diff-baseline`、`exemptions`、`init` " -"など — は、成功時に `0`、エラー時に `1` で終了します。`1` はツールエラー専用" -"であり — 使用方法エラーも含むため、フラグの打ち間違いがゲート帯域に入ることは" -"ありません — CI は常に「ゲートが回帰を検出した」(`2`–`5`)と「ツール自体がク" -"ラッシュした」(`1`)を区別できます。" +"`diff` / `diff-baseline` だけが発行します。これらはメトリクスの結果を報告す" +"るものであって、ツール自体の失敗ではありません。それ以外のすべてのサブコマン" +"ド — `metrics`、`ops`、`report`、`diff`、`diff-baseline`、`exemptions`、" +"`init` など — は、成功時に `0`、エラー時に `1` で終了します。`1` はツールエ" +"ラー専用であり — 使用方法エラーも含むため、フラグの打ち間違いがゲート帯域に" +"入ることはありません — CI は常に「ゲートが回帰を検出した」(`2`–`5`)と" +"「ツール自体がクラッシュした」(`1`)を区別できます。" #: src/commands/index.md:63 +msgid "Unreadable input" +msgstr "読み取れない入力" + +#: src/commands/index.md:65 +msgid "" +"Every subcommand that walks source files — `metrics`, `ops`, `report`, " +"`functions`, `find`, `count`, `dump`, `exemptions`, `preproc`, `strip-" +"comments`, `check`, `init` (which scaffolds its baseline through `check`), " +"and `diff --since` — exits `1` when **any** input file could not be read: " +"permission denied, or a path that vanished between the walk and the read. " +"Each failure is named on stderr as `error processing : …`, followed " +"by one summary line." +msgstr "" +"ソースファイルを走査するすべてのサブコマンド — `metrics`、`ops`、`report`、" +"`functions`、`find`、`count`、`dump`、`exemptions`、`preproc`、`strip-" +"comments`、`check`、`init`(ベースラインを `check` 経由で生成します)、およ" +"び `diff --since` — は、入力ファイルの**いずれか**が読み取れなかった場合に " +"`1` で終了します。権限がない場合や、走査から読み取りまでの間にパスが消えた場" +"合です。個々の失敗は `error processing : …` として stderr に列挙され、" +"続いて 1 行のサマリーが出力されます。" + +#: src/commands/index.md:73 +msgid "" +"The rule is \"any read failure\", not \"no output at all\", because a " +"missing file is invisible in the result. A partial `metrics --output` " +"document, a `report`, or a `count` looks complete; a `diff --since` side " +"that lost a file reports it as _added_ or _removed_ rather than as the I/O " +"error it was. Since the failure is only observable in the exit code, that " +"code has to carry it." +msgstr "" +"この規則が「出力がまったくない場合」ではなく「読み取り失敗が 1 つでもあった" +"場合」なのは、欠落したファイルが結果からは見えないからです。部分的な " +"`metrics --output` ドキュメントや `report`、`count` は完全なものに見えてしま" +"います。ファイルを失った `diff --since` の片側は、それを本来の I/O エラーで" +"はなく_追加_または_削除_として報告します。この失敗は終了コードでしか観測でき" +"ないため、終了コードがそれを担う必要があります。" + +#: src/commands/index.md:80 +msgid "" +"Output _streamed during_ the walk is still emitted — the check runs after " +"it — so a mixed run still shows the files that were read: the stdout trees " +"of `metrics` / `ops` / `dump` / `find` / `functions`, and the per-file " +"documents of `--output-dir`." +msgstr "" +"走査_中にストリーミングされた_出力は、チェックがその後に走るため、そのまま出" +"力されます。したがって混在した実行でも、読み取れたファイルは表示されます — " +"`metrics` / `ops` / `dump` / `find` / `functions` の stdout ツリーと、`--" +"output-dir` のファイル単位のドキュメントです。" + +#: src/commands/index.md:85 +msgid "" +"Output _assembled after_ the walk is suppressed entirely, because a partial " +"one is indistinguishable from a complete one. That covers the `metrics --" +"output` / `ops --output` aggregate document, the `report` document, " +"`count`'s tally, `preproc`'s JSON, and the `exemptions` report — none of " +"them is printed or written." +msgstr "" +"走査_後に組み立てられる_出力は完全に抑制されます。部分的なものと完全なものを" +"区別できないからです。これは `metrics --output` / `ops --output` の集約ド" +"キュメント、`report` ドキュメント、`count` の集計、`preproc` の JSON、およ" +"び `exemptions` レポートに適用されます — いずれも出力も書き込みもされませ" +"ん。" + +#: src/commands/index.md:91 +msgid "" +"If a tree legitimately contains files you cannot open, prune them with `--" +"exclude` (or `--include` a narrower set). A file removed by those filters " +"is never opened, so it is never a read failure." +msgstr "" +"開けないファイルがツリーに正当に含まれている場合は、`--exclude` で除外してく" +"ださい(あるいは `--include` でより狭い集合を指定します)。これらのフィルタ" +"で除去されたファイルは開かれないため、読み取り失敗にはなりません。" + +#: src/commands/index.md:95 +msgid "" +"The rule covers files the walk selected and then failed to open. Paths the " +"walk never selects are outside it: a _directory_ it cannot list, and a " +"broken symlink found by walking (neither is a regular file). Both warn — " +"`bca: warning: skipping walk entry in …` — and the run continues. An " +"explicitly named path that does not exist is a separate, pre-existing error " +"(also exit `1`)." +msgstr "" +"この規則の対象は、走査が選択したうえで開けなかったファイルです。走査がそもそ" +"も選択しないパスは対象外です。一覧できない_ディレクトリ_と、走査中に見つかっ" +"た壊れたシンボリックリンクがこれにあたります(どちらも通常ファイルではありま" +"せん)。いずれも `bca: warning: skipping walk entry in …` と警告したうえで実" +"行は継続します。明示的に指定されたパスが存在しない場合は、それとは別の既存の" +"エラーです(同じく終了コード `1`)。" + +#: src/commands/index.md:102 msgid "Flag placement and input paths" msgstr "フラグの位置と入力パス" -#: src/commands/index.md:65 +#: src/commands/index.md:104 msgid "" "Most subcommands read the input they analyze as a trailing positional path, " -"so the common case reads like every other code tool (`tokei`, `cloc`, `scc`, " -"`rg`). The exceptions: `report` and `vcs` select input with `--paths`, " -"`diff` compares two result sets, and `init` targets a directory via `--dir`." +"so the common case reads like every other code tool (`tokei`, `cloc`, " +"`scc`, `rg`). The exceptions: `report` and `vcs` select input with `--" +"paths`, `diff` compares two result sets, and `init` targets a directory via " +"`--dir`." msgstr "" "ほとんどのサブコマンドは、解析対象の入力を末尾の位置引数パスとして読み取るた" "め、一般的なケースは他のコードツール(`tokei`、`cloc`、`scc`、`rg`)と同じ書" -"き方になります。例外は次のとおりです: `report` と `vcs` は `--paths` で入力を" -"選択し、`diff` は 2 つの結果セットを比較し、`init` は `--dir` でディレクトリ" -"を対象にします。" +"き方になります。例外は次のとおりです: `report` と `vcs` は `--paths` で入力" +"を選択し、`diff` は 2 つの結果セットを比較し、`init` は `--dir` でディレクト" +"リを対象にします。" -#: src/commands/index.md:72 +#: src/commands/index.md:111 msgid "# analyze the src/ tree\n" msgstr "# src/ ツリーを解析する\n" -#: src/commands/index.md:73 +#: src/commands/index.md:112 msgid "# gate two subtrees\n" msgstr "# 2 つのサブツリーをゲートする\n" -#: src/commands/index.md:74 +#: src/commands/index.md:113 msgid "# find every function in the current tree\n" msgstr "# 現在のツリー内のすべての関数を検索する\n" -#: src/commands/index.md:77 +#: src/commands/index.md:116 msgid "" "Flags are **scoped to the subcommand that consumes them** and must be " "written **after** the subcommand token:" -msgstr "フラグは **それを消費するサブコマンドにスコープ**され、サブコマンドのトークンの**後に** 書く必要があります:" +msgstr "" +"フラグは **それを消費するサブコマンドにスコープ**され、サブコマンドのトーク" +"ンの**後に** 書く必要があります:" -#: src/commands/index.md:81 src/commands/index.md:82 +#: src/commands/index.md:120 src/commands/index.md:121 msgid "'*.generated.rs'" msgstr "'*.generated.rs'" -#: src/commands/index.md:81 +#: src/commands/index.md:120 msgid "# correct\n" msgstr "# 正しい\n" -#: src/commands/index.md:82 +#: src/commands/index.md:121 msgid "# ERROR (exit 1)\n" msgstr "# エラー(終了コード 1)\n" -#: src/commands/index.md:85 +#: src/commands/index.md:124 msgid "" "Only `-w` / `--warnings` and `--report-skipped` are universal and accepted " "in any position. Every input-selection flag (`-p` / `--paths`, `-I` / `--" @@ -4729,10 +4868,10 @@ msgid "" "tuning flag (`-j` / `--jobs`, `--exclude-tests`, `--cyclomatic-count-try`), " "the preprocessor flag (`--preproc-data`), and the output flag (`--color`) " "lives in a help-grouped section (_Input selection_ / _Walker tuning_ / " -"_Preprocessor_ / _Output_) on the subcommands that read it. A flag passed to " -"a subcommand that never consumed it is a hard usage error (exit 1) rather " -"than a silent no-op — so `bca vcs commit --exclude-tests` and `bca list-" -"metrics --paths` both error, and `bca list-metrics --help` does not " +"_Preprocessor_ / _Output_) on the subcommands that read it. A flag passed " +"to a subcommand that never consumed it is a hard usage error (exit 1) " +"rather than a silent no-op — so `bca vcs commit --exclude-tests` and `bca " +"list-metrics --paths` both error, and `bca list-metrics --help` does not " "advertise walker flags." msgstr "" "どの位置でも受け付けられる汎用フラグは `-w` / `--warnings` と `--report-" @@ -4748,43 +4887,43 @@ msgstr "" "`bca vcs commit --exclude-tests` と `bca list-metrics --paths` はどちらもエ" "ラーになり、`bca list-metrics --help` はウォーカーフラグを表示しません。" -#: src/commands/index.md:98 +#: src/commands/index.md:137 msgid "" -"The `-p` / `--paths` flag still works and is **unioned** with the positional " -"paths, so `bca metrics a.rs --paths b.rs` walks both. The [`find`](nodes.md) " -"and [`count`](nodes.md) subcommands take their node kinds via a repeatable `-" -"t` / `--type` flag (so the positional slot is free for paths): `bca find -t " -"function_item -t struct_item src/`." +"The `-p` / `--paths` flag still works and is **unioned** with the " +"positional paths, so `bca metrics a.rs --paths b.rs` walks both. The " +"[`find`](nodes.md) and [`count`](nodes.md) subcommands take their node " +"kinds via a repeatable `-t` / `--type` flag (so the positional slot is free " +"for paths): `bca find -t function_item -t struct_item src/`." msgstr "" -"`-p` / `--paths` フラグは引き続き機能し、位置引数のパスと **和集合** になりま" -"す。つまり `bca metrics a.rs --paths b.rs` は両方を走査します。[`find`]" +"`-p` / `--paths` フラグは引き続き機能し、位置引数のパスと **和集合** になり" +"ます。つまり `bca metrics a.rs --paths b.rs` は両方を走査します。[`find`]" "(nodes.md) と [`count`](nodes.md) サブコマンドは、繰り返し指定できる `-t` / " -"`--type` フラグでノード種別を受け取ります(そのため位置引数のスロットはパス用" -"に空いています): `bca find -t function_item -t struct_item src/`。" +"`--type` フラグでノード種別を受け取ります(そのため位置引数のスロットはパス" +"用に空いています): `bca find -t function_item -t struct_item src/`。" -#: src/commands/index.md:106 +#: src/commands/index.md:145 msgid "" "Metrics provide quantitative measures about source code, which can help in:" msgstr "" "メトリクスはソースコードに関する定量的な指標を提供し、次のことに役立ちます:" -#: src/commands/index.md:108 +#: src/commands/index.md:147 msgid "Compare different programming languages" msgstr "異なるプログラミング言語を比較する" -#: src/commands/index.md:109 +#: src/commands/index.md:148 msgid "Provide information on the quality of a code" msgstr "コードの品質に関する情報を提供する" -#: src/commands/index.md:110 +#: src/commands/index.md:149 msgid "Tell developers where their code is more tough to handle" msgstr "コードのどこが扱いにくいかを開発者に伝える" -#: src/commands/index.md:111 +#: src/commands/index.md:150 msgid "Discovering potential issues early in the development process" msgstr "開発プロセスの早い段階で潜在的な問題を発見する" -#: src/commands/index.md:113 +#: src/commands/index.md:152 msgid "" "**big-code-analysis** calculates the metrics starting from the source code " "of a program. These kind of metrics are called _static metrics_." @@ -4792,7 +4931,7 @@ msgstr "" "**big-code-analysis** は、プログラムのソースコードを起点にメトリクスを計算し" "ます。この種のメトリクスは _静的メトリクス_ と呼ばれます。" -#: src/commands/index.md:118 +#: src/commands/index.md:157 msgid "" "To represent the structure of program code, **bca** builds an 抽象構文木(AST)" -" を構築します。**ノード** はこの木の要素であり、言語に存在する任意の構文" -"構造を表します。" +"wikipedia.org/wiki/Abstract_syntax_tree\" target=\"_blank\">抽象構文木" +"(AST) を構築します。**ノード** はこの木の要素であり、言語に存在する任" +"意の構文構造を表します。" -#: src/commands/index.md:124 +#: src/commands/index.md:163 msgid "Nodes can be used to:" msgstr "ノードは次の用途に使えます:" -#: src/commands/index.md:126 +#: src/commands/index.md:165 msgid "Create the syntactic structure of a source file" msgstr "ソースファイルの構文構造を作成する" -#: src/commands/index.md:127 +#: src/commands/index.md:166 msgid "Discover if a construct of a language is present in the analyzed code" msgstr "解析対象のコードに、ある言語構造が存在するかどうかを調べる" -#: src/commands/index.md:129 +#: src/commands/index.md:168 msgid "Count the number of constructs of a certain kind" msgstr "特定の種類の構造の数を数える" -#: src/commands/index.md:130 +#: src/commands/index.md:169 msgid "Detect errors in the source code" msgstr "ソースコード内のエラーを検出する" -#: src/commands/index.md:132 +#: src/commands/index.md:171 msgid "REST API" msgstr "REST API" -#: src/commands/index.md:134 +#: src/commands/index.md:173 msgid "" "**bca-web** runs a server offering a REST API. This allows users to send " "source code via HTTP and receive corresponding metrics in `JSON` format." @@ -4837,11 +4976,11 @@ msgstr "" "は HTTP 経由でソースコードを送信し、対応するメトリクスを `JSON` 形式で受け取" "れます。" -#: src/commands/index.md:138 +#: src/commands/index.md:177 msgid "Skipping generated code" msgstr "生成コードのスキップ" -#: src/commands/index.md:140 +#: src/commands/index.md:179 msgid "" "Generated bindings (protobuf stubs, OpenAPI clients, lex/yacc output, build-" "system plumbing) inflate metrics for code no human will refactor. By " @@ -4852,15 +4991,15 @@ msgstr "" "生成されたバインディング(protobuf スタブ、OpenAPI クライアント、lex/yacc の" "出力、ビルドシステムの補助コード)は、誰もリファクタリングしないコードでメト" "リクスを水増しします。デフォルトでは、`bca` は各ファイルの先頭約 50 行 / 5 " -"KiB を走査して生成コードマーカーを探し、一致したファイルをパース *「前に」* ス" -"キップします。そのため、スキップされたファイルに tree-sitter のパースコストは" -"かかりません。" +"KiB を走査して生成コードマーカーを探し、一致したファイルをパース *「前に」* " +"スキップします。そのため、スキップされたファイルに tree-sitter のパースコス" +"トはかかりません。" -#: src/commands/index.md:146 +#: src/commands/index.md:185 msgid "Recognized markers (case-insensitive):" msgstr "認識されるマーカー(大文字小文字を区別しません):" -#: src/commands/index.md:148 +#: src/commands/index.md:187 msgid "" "`@generated` — Facebook / Meta convention; also emitted by buck2, rustfmt, " "prettier, and many code generators." @@ -4868,40 +5007,42 @@ msgstr "" "`@generated` — Facebook / Meta の慣習。buck2、rustfmt、prettier をはじめ、多" "くのコードジェネレーターも出力します。" -#: src/commands/index.md:150 +#: src/commands/index.md:189 msgid "" "`DO NOT EDIT` — Go's `// Code generated by … DO NOT EDIT.` is the canonical " -"form; the bare phrase is also widely copied (Bazel, protoc, OpenAPI clients)." +"form; the bare phrase is also widely copied (Bazel, protoc, OpenAPI " +"clients)." msgstr "" "`DO NOT EDIT` — Go の `// Code generated by … DO NOT EDIT.` が標準形です。こ" -"の語句単体でも広くコピーされています(Bazel、protoc、OpenAPI クライアント)。" +"の語句単体でも広くコピーされています(Bazel、protoc、OpenAPI クライアン" +"ト)。" -#: src/commands/index.md:153 +#: src/commands/index.md:192 msgid "`GENERATED CODE` — Lizard's marker, recognized for compatibility." msgstr "`GENERATED CODE` — Lizard のマーカーで、互換性のために認識されます。" -#: src/commands/index.md:155 +#: src/commands/index.md:194 msgid "" "A marker phrase that appears only deep in the file body (past the scan " -"window) does **not** trigger the skip — the detector deliberately looks only " -"at the file header." +"window) does **not** trigger the skip — the detector deliberately looks " +"only at the file header." msgstr "" "マーカー語句がファイル本体の深い位置(走査ウィンドウの外)にのみ現れる場合、" "スキップは **発動しません** — 検出器は意図的にファイルヘッダーだけを見ます。" -#: src/commands/index.md:159 +#: src/commands/index.md:198 msgid "" -"The skip applies uniformly to `bca metrics`, `bca report`, and the threshold " -"engine." +"The skip applies uniformly to `bca metrics`, `bca report`, and the " +"threshold engine." msgstr "" "このスキップは `bca metrics`、`bca report`、およびしきい値エンジンに一律に適" "用されます。" -#: src/commands/index.md:162 src/commands/vcs.md:195 src/commands/report.md:39 +#: src/commands/index.md:201 src/commands/vcs.md:195 src/commands/report.md:39 msgid "Flags" msgstr "フラグ" -#: src/commands/index.md:164 +#: src/commands/index.md:203 msgid "" "`--no-skip-generated` — disable the auto-skip and restore the previous " "behavior (every file is parsed)." @@ -4909,7 +5050,7 @@ msgstr "" "`--no-skip-generated` — 自動スキップを無効にし、以前の動作(すべてのファイル" "をパースする)に戻します。" -#: src/commands/index.md:166 +#: src/commands/index.md:205 msgid "" "`--report-skipped` — log `skipped (generated): ` to stderr for each " "file the detector excludes, so you can audit the exclusions and add an " @@ -4920,11 +5061,11 @@ msgstr "" "ファイルが誤って生成コード扱いされていた場合は明示的な include を追加できま" "す。" -#: src/commands/index.md:170 +#: src/commands/index.md:209 msgid "Respecting `.gitignore`" msgstr "`.gitignore` の尊重" -#: src/commands/index.md:172 +#: src/commands/index.md:211 msgid "" "When a directory is passed to `--paths`, `bca` walks it with `.gitignore` " "awareness by default. Files matched by any of the following are skipped " @@ -4934,27 +5075,27 @@ msgstr "" "慮して走査します。次のいずれかに一致するファイルは、パース前にスキップされま" "す:" -#: src/commands/index.md:176 +#: src/commands/index.md:215 msgid "`.gitignore` files inside the walked tree." msgstr "走査対象ツリー内の `.gitignore` ファイル。" -#: src/commands/index.md:177 +#: src/commands/index.md:216 msgid "`.ignore` files (the ripgrep / `fd` convention)." msgstr "`.ignore` ファイル(ripgrep / `fd` の慣習)。" -#: src/commands/index.md:178 +#: src/commands/index.md:217 msgid "`.git/info/exclude`." msgstr "`.git/info/exclude`。" -#: src/commands/index.md:179 +#: src/commands/index.md:218 msgid "" "The global gitignore (`~/.config/git/ignore`, or whatever `core." "excludesFile` points at)." msgstr "" -"グローバル gitignore(`~/.config/git/ignore`、または `core.excludesFile` が指" -"す先)。" +"グローバル gitignore(`~/.config/git/ignore`、または `core.excludesFile` が" +"指す先)。" -#: src/commands/index.md:181 +#: src/commands/index.md:220 msgid "" "`.gitignore` files in ancestor directories of the seed (so `bca metrics src/" "` from a project root picks up the project's top-level `.gitignore`)." @@ -4963,29 +5104,29 @@ msgstr "" "ルートから `bca metrics src/` を実行すると、プロジェクト最上位の `." "gitignore` が反映されます)。" -#: src/commands/index.md:185 +#: src/commands/index.md:224 msgid "" "The walker honors `.gitignore` even outside a checked-in git repository, so " -"an extracted source tarball with a `.gitignore` file gets the same treatment " -"as a fresh `git clone`." +"an extracted source tarball with a `.gitignore` file gets the same " +"treatment as a fresh `git clone`." msgstr "" -"ウォーカーは、チェックインされた git リポジトリの外でも `.gitignore` を尊重し" -"ます。そのため、`.gitignore` ファイルを含む展開済みのソース tarball も、`git " -"clone` した直後と同じ扱いになります。" +"ウォーカーは、チェックインされた git リポジトリの外でも `.gitignore` を尊重" +"します。そのため、`.gitignore` ファイルを含む展開済みのソース tarball も、" +"`git clone` した直後と同じ扱いになります。" -#: src/commands/index.md:189 +#: src/commands/index.md:228 msgid "" "Hidden files (those whose basename starts with `.`) are filtered during the " "walk, matching the previous behavior." msgstr "" -"隠しファイル(ベース名が `.` で始まるもの)は走査中に除外され、以前の動作と一" -"致します。" +"隠しファイル(ベース名が `.` で始まるもの)は走査中に除外され、以前の動作と" +"一致します。" -#: src/commands/index.md:192 +#: src/commands/index.md:231 msgid "Explicit paths bypass the filter" msgstr "明示的なパスはフィルターを迂回する" -#: src/commands/index.md:194 +#: src/commands/index.md:233 msgid "" "Files passed by name — via `--paths` or `--paths-from` — are always " "analyzed, even when they would be excluded by `.gitignore`. This makes it " @@ -4995,15 +5136,15 @@ msgid "" msgstr "" "名前で渡されたファイル — `--paths` または `--paths-from` 経由 — は、`." "gitignore` で除外される場合でも常に解析されます。これにより、`git diff --" -"name-only` 形式のパイプラインから `bca metrics --paths-from -` を安全に実行で" -"き、ワイルドカードの ignore ルールにたまたま該当するファイルを失うことがあり" -"ません。" +"name-only` 形式のパイプラインから `bca metrics --paths-from -` を安全に実行" +"でき、ワイルドカードの ignore ルールにたまたま該当するファイルを失うことがあ" +"りません。" -#: src/commands/index.md:200 +#: src/commands/index.md:239 msgid "Path discovery flags" msgstr "パス探索フラグ" -#: src/commands/index.md:202 +#: src/commands/index.md:241 msgid "" "`--no-ignore` — disable `.gitignore` / `.ignore` / global-gitignore " "awareness when expanding directory seeds." @@ -5011,38 +5152,38 @@ msgstr "" "`--no-ignore` — ディレクトリの起点を展開する際の `.gitignore` / `.ignore` / " "グローバル gitignore の考慮を無効にします。" -#: src/commands/index.md:204 +#: src/commands/index.md:243 msgid "" -"`--paths-from ` — read newline-separated input paths from ``, or " -"from stdin when `` is `-`. Combined as a union with any `--paths` " +"`--paths-from ` — read newline-separated input paths from ``, " +"or from stdin when `` is `-`. Combined as a union with any `--paths` " "values; `-I` / `-X` globs still apply. Blank lines are skipped; `#` is " "treated as a path character (not a comment). To pass a file literally named " "`-`, write `./-`." msgstr "" "`--paths-from ` — 改行区切りの入力パスを `` から読み取ります。" -"`` が `-` の場合は stdin から読み取ります。`--paths` の値があれば和集合" -"として結合され、`-I` / `-X` の glob も引き続き適用されます。空行はスキップさ" -"れ、`#` は(コメントではなく)パスの文字として扱われます。文字どおり `-` とい" -"う名前のファイルを渡すには `./-` と書きます。" +"`` が `-` の場合は stdin から読み取ります。`--paths` の値があれば和集" +"合として結合され、`-I` / `-X` の glob も引き続き適用されます。空行はスキップ" +"され、`#` は(コメントではなく)パスの文字として扱われます。文字どおり `-` " +"という名前のファイルを渡すには `./-` と書きます。" -#: src/commands/index.md:209 +#: src/commands/index.md:248 msgid "" "`--exclude-from ` — read newline-separated `--exclude` glob patterns " -"from ``, or from stdin when `` is `-`. Patterns are unioned with " -"any inline `--exclude` / `-X` values into a single deny-set; order does not " -"matter. `.gitignore`\\-style: blank lines and lines whose first non-" -"whitespace character is `#` are skipped, and a leading UTF-8 BOM is " +"from ``, or from stdin when `` is `-`. Patterns are unioned " +"with any inline `--exclude` / `-X` values into a single deny-set; order " +"does not matter. `.gitignore`\\-style: blank lines and lines whose first " +"non-whitespace character is `#` are skipped, and a leading UTF-8 BOM is " "stripped. Convention is a `.bcaignore` at the repo root, mirroring `." "gitignore` / `.dockerignore`. To pass a file literally named `-`, write `./-" "`." msgstr "" "`--exclude-from ` — 改行区切りの `--exclude` glob パターンを `` " -"から読み取ります。`` が `-` の場合は stdin から読み取ります。パターンは" -"インラインの `--exclude` / `-X` の値と和集合として 1 つの拒否セットにまとめら" -"れ、順序は関係ありません。`.gitignore` 形式です: 空行と、最初の非空白文字が " -"`#` の行はスキップされ、先頭の UTF-8 BOM は取り除かれます。慣習としては、`." -"gitignore` / `.dockerignore` に倣ってリポジトリルートに `.bcaignore` を置きま" -"す。文字どおり `-` という名前のファイルを渡すには `./-` と書きます。" +"から読み取ります。`` が `-` の場合は stdin から読み取ります。パターン" +"はインラインの `--exclude` / `-X` の値と和集合として 1 つの拒否セットにまと" +"められ、順序は関係ありません。`.gitignore` 形式です: 空行と、最初の非空白文" +"字が `#` の行はスキップされ、先頭の UTF-8 BOM は取り除かれます。慣習として" +"は、`.gitignore` / `.dockerignore` に倣ってリポジトリルートに `.bcaignore` " +"を置きます。文字どおり `-` という名前のファイルを渡すには `./-` と書きます。" #: src/commands/metrics.md:3 msgid "" @@ -5057,17 +5198,18 @@ msgstr "" #: src/commands/metrics.md:7 msgid "" "**Migrating?** This command replaces the pre-restructure `--metrics` flag. " -"The aggregated report previously selected with `-O markdown` now lives under " -"[`bca report`](report.md), and the CI/IDE offender formats (Checkstyle, " -"SARIF, code-climate, clang-warning, msvc-warning) moved to [`bca check --" -"report-format `](check.md). See the [migration guide](../migration.md)." +"The aggregated report previously selected with `-O markdown` now lives " +"under [`bca report`](report.md), and the CI/IDE offender formats " +"(Checkstyle, SARIF, code-climate, clang-warning, msvc-warning) moved to " +"[`bca check --report-format `](check.md). See the [migration guide](../" +"migration.md)." msgstr "" "**移行中ですか?** このコマンドは、再構成前の `--metrics` フラグを置き換える" "ものです。以前 `-O markdown` で選択していた集約レポートは [`bca report`]" "(report.md) に移り、CI/IDE 向けの違反レポートフォーマット(Checkstyle、" "SARIF、code-climate、clang-warning、msvc-warning)は [`bca check --report-" -"format `](check.md) に移動しました。[移行ガイド](../migration.md) を参照" -"してください。" +"format `](check.md) に移動しました。[移行ガイド](../migration.md) を参" +"照してください。" #: src/commands/metrics.md:15 msgid "Display metrics" @@ -5093,58 +5235,71 @@ msgstr "" msgid "" "**Explicitly-named files must be parseable.** When you name a file directly " "(positionally or via `--paths`/`--paths-from`) whose language the tool " -"cannot recognize, `bca` prints a warning on stderr and — if the run produced " -"no output at all — exits 1, mirroring the way a nonexistent explicit path " -"fails. A mixed run that analyzed at least one file still exits 0 with the " -"warning. Pass `--language ` to force a parser when a file's extension " -"lies about its contents. Files reached only by walking a _directory_ are " -"skipped silently (a tree full of READMEs and configs must not be noisy); " -"pass `-w` to surface those skips too." +"cannot recognize, `bca` prints a warning on stderr and — if the run " +"produced no output at all — exits 1, mirroring the way a nonexistent " +"explicit path fails. A mixed run that analyzed at least one file still " +"exits 0 with the warning. Pass `--language ` to force a parser when a " +"file's extension lies about its contents. Files reached only by walking a " +"_directory_ are skipped silently (a tree full of READMEs and configs must " +"not be noisy); pass `-w` to surface those skips too." msgstr "" "**明示的に名前を指定したファイルはパース可能でなければなりません。** 言語を" "ツールが認識できないファイルを直接(位置引数または `--paths`/`--paths-from` " "経由で)指定すると、`bca` は stderr に警告を出力し、実行が出力をまったく生成" -"しなかった場合は 1 で終了します。これは、存在しない明示パスが失敗するのと同じ" -"挙動です。少なくとも 1 ファイルを解析した混在実行は、警告を出しつつ 0 で終了" -"します。ファイルの拡張子が内容と食い違う場合は、`--language ` を渡して" -"パーサーを強制してください。「ディレクトリ」 の走査によってのみ到達したファイル" -"は黙ってスキップされます(README や設定ファイルだらけのツリーで騒がしくなって" -"はいけません)。そうしたスキップも表示したい場合は `-w` を渡してください。" +"しなかった場合は 1 で終了します。これは、存在しない明示パスが失敗するのと同" +"じ挙動です。少なくとも 1 ファイルを解析した混在実行は、警告を出しつつ 0 で終" +"了します。ファイルの拡張子が内容と食い違う場合は、`--language ` を渡し" +"てパーサーを強制してください。「ディレクトリ」 の走査によってのみ到達した" +"ファイルは黙ってスキップされます(README や設定ファイルだらけのツリーで騒が" +"しくなってはいけません)。そうしたスキップも表示したい場合は `-w` を渡してく" +"ださい。" #: src/commands/metrics.md:38 +msgid "" +"A file that _is_ recognized but cannot be **read** is a stricter case and " +"follows the [unreadable-input rule](README.md#unreadable-input): the run " +"exits 1 even when other files analyzed fine, because a silently-shorter " +"metrics document reads as a complete one." +msgstr "" +"認識は_される_ものの**読み取れない**ファイルはより厳格な扱いになり、[読み取" +"れない入力の規則](README.md#unreadable-input)に従います。他のファイルの解析" +"が成功していても実行は 1 で終了します。黙って短くなったメトリクスドキュメン" +"トは、完全なものとして読まれてしまうからです。" + +#: src/commands/metrics.md:43 msgid "Exporting metrics" msgstr "メトリクスのエクスポート" -#: src/commands/metrics.md:40 +#: src/commands/metrics.md:45 msgid "`bca metrics` supports five per-file output formats:" msgstr "`bca metrics` は 5 つのファイル単位出力フォーマットに対応しています:" -#: src/commands/metrics.md:42 +#: src/commands/metrics.md:47 msgid "CBOR" msgstr "CBOR" -#: src/commands/metrics.md:43 +#: src/commands/metrics.md:48 msgid "CSV" msgstr "CSV" -#: src/commands/metrics.md:44 +#: src/commands/metrics.md:49 msgid "JSON" msgstr "JSON" -#: src/commands/metrics.md:45 +#: src/commands/metrics.md:50 msgid "TOML" msgstr "TOML" -#: src/commands/metrics.md:46 +#: src/commands/metrics.md:51 msgid "YAML" msgstr "YAML" -#: src/commands/metrics.md:48 +#: src/commands/metrics.md:53 msgid "Both JSON and TOML can be exported as pretty-printed." msgstr "" "JSON と TOML は、いずれも整形(pretty-print)してエクスポートできます。" -#: src/commands/metrics.md:50 +#: src/commands/metrics.md:55 msgid "" "The three top-level output kinds map to three separate commands so each one " "stays consistent with its data model:" @@ -5152,95 +5307,95 @@ msgstr "" "トップレベルの 3 種類の出力は 3 つの別々のコマンドに対応しており、それぞれが" "自身のデータモデルとの一貫性を保ちます:" -#: src/commands/metrics.md:53 +#: src/commands/metrics.md:58 msgid "Command" msgstr "コマンド" -#: src/commands/metrics.md:53 +#: src/commands/metrics.md:58 msgid "Output" msgstr "出力" -#: src/commands/metrics.md:53 src/commands/check.md:483 +#: src/commands/metrics.md:58 src/commands/check.md:493 msgid "Audience" msgstr "対象" -#: src/commands/metrics.md:55 +#: src/commands/metrics.md:60 msgid "`bca metrics`" msgstr "`bca metrics`" -#: src/commands/metrics.md:55 +#: src/commands/metrics.md:60 msgid "Per-file metric trees" msgstr "ファイル単位のメトリクスツリー" -#: src/commands/metrics.md:55 +#: src/commands/metrics.md:60 msgid "Downstream tooling" msgstr "下流のツール" -#: src/commands/metrics.md:56 +#: src/commands/metrics.md:61 msgid "[`bca report`](report.md)" msgstr "[`bca report`](report.md)" -#: src/commands/metrics.md:56 +#: src/commands/metrics.md:61 msgid "Aggregated quality dashboards" msgstr "集約された品質ダッシュボード" -#: src/commands/metrics.md:56 +#: src/commands/metrics.md:61 msgid "Humans / PRs" msgstr "人間 / プルリクエスト" -#: src/commands/metrics.md:57 +#: src/commands/metrics.md:62 msgid "[`bca check`](check.md)" msgstr "[`bca check`](check.md)" -#: src/commands/metrics.md:57 +#: src/commands/metrics.md:62 msgid "Threshold-violation reports" msgstr "しきい値違反レポート" -#: src/commands/metrics.md:57 +#: src/commands/metrics.md:62 msgid "CI / IDE" msgstr "CI / IDE" -#: src/commands/metrics.md:59 +#: src/commands/metrics.md:64 msgid "" -"The CI/IDE offender formats (Checkstyle, SARIF, code-climate, clang-warning, " -"msvc-warning) used to live on `bca metrics -O `. They moved to `bca " -"check --report-format ` because their input is a list of threshold " -"violations, not the per-file metric tree that the other formats above carry. " -"See the [`bca check` chapter](check.md#exporting-offender-records) for the " -"new invocation." +"The CI/IDE offender formats (Checkstyle, SARIF, code-climate, clang-" +"warning, msvc-warning) used to live on `bca metrics -O `. They moved " +"to `bca check --report-format ` because their input is a list of " +"threshold violations, not the per-file metric tree that the other formats " +"above carry. See the [`bca check` chapter](check.md#exporting-offender-" +"records) for the new invocation." msgstr "" "CI/IDE 向けの違反レポートフォーマット(Checkstyle、SARIF、code-climate、" -"clang-warning、msvc-warning)は、かつて `bca metrics -O ` にありました。" -"これらの入力はしきい値違反のリストであって、上記の他フォーマットが扱うファイ" -"ル単位のメトリクスツリーではないため、`bca check --report-format ` に移" -"動しました。新しい呼び出し方は [`bca check` の章](check.md#exporting-" -"offender-records) を参照してください。" +"clang-warning、msvc-warning)は、かつて `bca metrics -O ` にありまし" +"た。これらの入力はしきい値違反のリストであって、上記の他フォーマットが扱う" +"ファイル単位のメトリクスツリーではないため、`bca check --report-format " +"` に移動しました。新しい呼び出し方は [`bca check` の章](check." +"md#exporting-offender-records) を参照してください。" -#: src/commands/metrics.md:68 +#: src/commands/metrics.md:73 msgid "Export command" msgstr "エクスポートコマンド" -#: src/commands/metrics.md:70 +#: src/commands/metrics.md:75 msgid "To export metrics as JSON files:" msgstr "メトリクスを JSON ファイルとしてエクスポートするには:" -#: src/commands/metrics.md:77 +#: src/commands/metrics.md:82 msgid "" -"`-O, --format`: output format. Defaults to `text` — a human-readable colored " -"metric tree printed to stdout; pass `--format text` to request that default " -"explicitly (for example to override a `bca.toml` that set a structured " -"format). The structured per-file serializers are `cbor`, `csv`, `json`, " -"`toml`, and `yaml`. `--output-format` is accepted as a deprecated alias and " -"is slated for removal in the next major." +"`-O, --format`: output format. Defaults to `text` — a human-readable " +"colored metric tree printed to stdout; pass `--format text` to request that " +"default explicitly (for example to override a `bca.toml` that set a " +"structured format). The structured per-file serializers are `cbor`, `csv`, " +"`json`, `toml`, and `yaml`. `--output-format` is accepted as a deprecated " +"alias and is slated for removal in the next major." msgstr "" -"`-O, --format`: 出力フォーマット。デフォルトは `text` で、stdout に表示される" -"人間可読のカラー付きメトリクスツリーです。このデフォルトを明示的に要求するに" -"は `--format text` を渡します(たとえば、構造化フォーマットを設定した `bca." -"toml` を上書きする場合)。構造化されたファイル単位のシリアライザーは `cbor`、" -"`csv`、`json`、`toml`、`yaml` です。`--output-format` は非推奨のエイリアスと" -"して受け付けられますが、次のメジャーリリースで削除予定です。" +"`-O, --format`: 出力フォーマット。デフォルトは `text` で、stdout に表示され" +"る人間可読のカラー付きメトリクスツリーです。このデフォルトを明示的に要求する" +"には `--format text` を渡します(たとえば、構造化フォーマットを設定した " +"`bca.toml` を上書きする場合)。構造化されたファイル単位のシリアライザーは " +"`cbor`、`csv`、`json`、`toml`、`yaml` です。`--output-format` は非推奨のエイ" +"リアスとして受け付けられますが、次のメジャーリリースで削除予定です。" -#: src/commands/metrics.md:83 +#: src/commands/metrics.md:88 msgid "" "`-o, --output`: a single file holding one aggregate document for the whole " "run — a top-level array of the per-file results (TOML wraps the array under " @@ -5252,29 +5407,29 @@ msgstr "" "ラップし、CSV は各ファイルの行を連結します)。省略した場合、結果は stdout に" "出力されます。" -#: src/commands/metrics.md:87 +#: src/commands/metrics.md:92 msgid "" "`--output-dir`: a directory holding one document per input file, named by " "the input path plus the format extension. Mutually exclusive with `--" "output`; passing both is an error." msgstr "" "`--output-dir`: 入力ファイルごとに 1 つのドキュメントを保持するディレクトリ" -"で、各ドキュメントは入力パスにフォーマットの拡張子を付けた名前になります。`--" -"output` とは相互排他で、両方を渡すとエラーです。" +"で、各ドキュメントは入力パスにフォーマットの拡張子を付けた名前になります。" +"`--output` とは相互排他で、両方を渡すとエラーです。" -#: src/commands/metrics.md:90 +#: src/commands/metrics.md:95 msgid "" -"CBOR is binary and so requires a destination (`--output` or `--output-dir`). " -"Passing either destination without a structured `--format` is an error (the " -"default `text` format streams to stdout and writes no files), so a " -"destination never silently no-ops (#661)." +"CBOR is binary and so requires a destination (`--output` or `--output-" +"dir`). Passing either destination without a structured `--format` is an " +"error (the default `text` format streams to stdout and writes no files), so " +"a destination never silently no-ops (#661)." msgstr "" -"CBOR はバイナリのため、出力先(`--output` または `--output-dir`)が必須です。" -"構造化された `--format` なしでいずれかの出力先を渡すとエラーになります(デ" -"フォルトの `text` フォーマットは stdout にストリームし、ファイルを書きませ" -"ん)。これにより、出力先の指定が黙って無視されることはありません(#661)。" +"CBOR はバイナリのため、出力先(`--output` または `--output-dir`)が必須で" +"す。構造化された `--format` なしでいずれかの出力先を渡すとエラーになります" +"(デフォルトの `text` フォーマットは stdout にストリームし、ファイルを書きま" +"せん)。これにより、出力先の指定が黙って無視されることはありません(#661)。" -#: src/commands/metrics.md:94 +#: src/commands/metrics.md:99 msgid "" "`--metrics `: restrict computation to a subset of metrics (comma-" "separated and/or repeated, e.g. `--metrics cyclomatic,cognitive --metrics " @@ -5293,60 +5448,60 @@ msgstr "" "依存するメトリクスを自動的に取り込みます。未知の名前は「did you mean」ヒント" "付きのエラーになります。省略すると、すべてのメトリクスを計算します(#691)。" -#: src/commands/metrics.md:103 +#: src/commands/metrics.md:108 msgid "CSV (spreadsheets and Pandas)" msgstr "CSV(スプレッドシートと Pandas)" -#: src/commands/metrics.md:110 +#: src/commands/metrics.md:115 msgid "" -"The CSV writer emits one row per `FuncSpace` (function, class, struct, unit, " -"etc.) with the entire metric matrix as columns. Header order is fixed — see " -"`CSV_HEADER` in [`src/output/csv.rs`](https://github.com/dekobon/big-code-" -"analysis/blob/main/src/output/csv.rs) for the canonical list. Identity " +"The CSV writer emits one row per `FuncSpace` (function, class, struct, " +"unit, etc.) with the entire metric matrix as columns. Header order is fixed " +"— see `CSV_HEADER` in [`src/output/csv.rs`](https://github.com/dekobon/big-" +"code-analysis/blob/main/src/output/csv.rs) for the canonical list. Identity " "columns come first (`path`, `space_name`, `space_kind`, `start_line`, " "`end_line`) followed by every leaf metric using the same dotted JSON-style " "names (`loc.lloc`, `halstead.volume`, `cyclomatic.modified.average`, etc.) " "so a single column name addresses the metric in both CSV and JSON." msgstr "" -"CSV ライターは `FuncSpace`(関数、クラス、構造体、ユニットなど)ごとに 1 行を" -"出力し、メトリクス行列全体を列として並べます。ヘッダーの順序は固定です — 正規" -"のリストは [`src/output/csv.rs`](https://github.com/dekobon/big-code-" +"CSV ライターは `FuncSpace`(関数、クラス、構造体、ユニットなど)ごとに 1 行" +"を出力し、メトリクス行列全体を列として並べます。ヘッダーの順序は固定です — " +"正規のリストは [`src/output/csv.rs`](https://github.com/dekobon/big-code-" "analysis/blob/main/src/output/csv.rs) の `CSV_HEADER` を参照してください。識" "別列(`path`、`space_name`、`space_kind`、`start_line`、`end_line`)が先頭に" "来て、その後にすべての葉メトリクスが JSON と同じドット付き名(`loc.lloc`、" -"`halstead.volume`、`cyclomatic.modified.average` など)で続くため、1 つの列名" -"で CSV と JSON の両方のメトリクスを指せます。" +"`halstead.volume`、`cyclomatic.modified.average` など)で続くため、1 つの列" +"名で CSV と JSON の両方のメトリクスを指せます。" -#: src/commands/metrics.md:120 +#: src/commands/metrics.md:125 msgid "" "Empty cells (no value, not `0`) signal \"not applicable for this space\" — " "for example, the OOP-only metrics (`wmc.*`, `npm.*`, `npa.*`) appear empty " "for procedural code. [RFC 4180](https://www.rfc-editor.org/rfc/rfc4180) " -"quoting is delegated to the \\[`csv`\\] crate, so paths and names containing " -"commas, quotes, or newlines round-trip cleanly." +"quoting is delegated to the \\[`csv`\\] crate, so paths and names " +"containing commas, quotes, or newlines round-trip cleanly." msgstr "" -"空セル(`0` ではなく値なし)は「このスペースには該当しない」ことを示します — " -"たとえば、OOP 専用メトリクス(`wmc.*`、`npm.*`、`npa.*`)は手続き型コードでは" -"空になります。[RFC 4180](https://www.rfc-editor.org/rfc/rfc4180) の引用符処理" -"は \\[`csv`\\] クレートに委譲されているため、カンマ、引用符、改行を含むパスや" -"名前も正しく往復します。" +"空セル(`0` ではなく値なし)は「このスペースには該当しない」ことを示します " +"— たとえば、OOP 専用メトリクス(`wmc.*`、`npm.*`、`npa.*`)は手続き型コード" +"では空になります。[RFC 4180](https://www.rfc-editor.org/rfc/rfc4180) の引用" +"符処理は \\[`csv`\\] クレートに委譲されているため、カンマ、引用符、改行を含" +"むパスや名前も正しく往復します。" -#: src/commands/metrics.md:127 +#: src/commands/metrics.md:132 msgid "Stream the result to a single file with `-`:" msgstr "`-` を使って、結果を単一の出力にストリームします:" -#: src/commands/metrics.md:134 +#: src/commands/metrics.md:139 msgid "" -"CSV is a per-file format; with `--output-dir ` each input file produces " -"a `.csv` mirror under the output directory. With `--output ` " -"every file's rows are concatenated into one aggregate CSV." +"CSV is a per-file format; with `--output-dir ` each input file " +"produces a `.csv` mirror under the output directory. With `--output " +"` every file's rows are concatenated into one aggregate CSV." msgstr "" -"CSV はファイル単位のフォーマットです。`--output-dir ` を指定すると、各入" -"力ファイルは出力ディレクトリ配下に `.csv` のミラーを生成します。`--" -"output ` を指定すると、すべてのファイルの行が 1 つの集約 CSV に連結され" -"ます。" +"CSV はファイル単位のフォーマットです。`--output-dir ` を指定すると、各" +"入力ファイルは出力ディレクトリ配下に `.csv` のミラーを生成します。`--" +"output ` を指定すると、すべてのファイルの行が 1 つの集約 CSV に連結さ" +"れます。" -#: src/commands/metrics.md:139 +#: src/commands/metrics.md:144 msgid "" "An aggregated HTML _report_ covering the whole walk is available via [`bca " "report html`](report.md#html-format). The previous per-file `bca metrics -O " @@ -5355,113 +5510,115 @@ msgid "" "rows." msgstr "" "走査全体をカバーする集約 HTML _レポート_ は [`bca report html`](report." -"md#html-format) で利用できます。以前のファイル単位の `bca metrics -O html` ラ" -"イターは、実際のリポジトリでは開けないほど巨大な単一ファイルのテーブルに劣化" -"してしまうため削除されました — フラットな `FuncSpace` 単位の行には CSV が適切" -"な形です。" +"md#html-format) で利用できます。以前のファイル単位の `bca metrics -O html` " +"ライターは、実際のリポジトリでは開けないほど巨大な単一ファイルのテーブルに劣" +"化してしまうため削除されました — フラットな `FuncSpace` 単位の行には CSV が" +"適切な形です。" -#: src/commands/metrics.md:145 +#: src/commands/metrics.md:150 msgid "Pretty print" msgstr "整形出力" -#: src/commands/metrics.md:152 +#: src/commands/metrics.md:157 msgid "Excluding inline test code" msgstr "インラインテストコードの除外" -#: src/commands/metrics.md:158 +#: src/commands/metrics.md:163 msgid "" "By default, every node in the AST is counted, including inline test items. " "Rust files following the idiomatic `#[cfg(test)] mod tests { ... }` layout " "therefore have headline metrics that mix production and test code together." msgstr "" -"デフォルトでは、インラインのテスト項目を含む AST 内のすべてのノードがカウント" -"されます。そのため、慣用的な `#[cfg(test)] mod tests { ... }` レイアウトに従" -"う Rust ファイルでは、主要メトリクスに本番コードとテストコードが混在します。" +"デフォルトでは、インラインのテスト項目を含む AST 内のすべてのノードがカウン" +"トされます。そのため、慣用的な `#[cfg(test)] mod tests { ... }` レイアウトに" +"従う Rust ファイルでは、主要メトリクスに本番コードとテストコードが混在しま" +"す。" -#: src/commands/metrics.md:163 +#: src/commands/metrics.md:168 msgid "" "Pass `--exclude-tests` to elide test-only subtrees before any metric is " "computed. The flag is recognised by every subcommand that walks the AST " -"(`metrics`, `report`, `check`), and currently understands the following Rust " -"attribute shapes:" +"(`metrics`, `report`, `check`), and currently understands the following " +"Rust attribute shapes:" msgstr "" "メトリクスが計算される前にテスト専用のサブツリーを取り除くには、`--exclude-" "tests` を渡します。このフラグは AST を走査するすべてのサブコマンド" "(`metrics`、`report`、`check`)で認識され、現在は次の Rust 属性の形を理解し" "ます:" -#: src/commands/metrics.md:168 +#: src/commands/metrics.md:173 msgid "`#[test]` and `#[rstest]` / `#[test_case]` / `#[wasm_bindgen_test]`" -msgstr "`#[test]` および `#[rstest]` / `#[test_case]` / `#[wasm_bindgen_test]`" +msgstr "" +"`#[test]` および `#[rstest]` / `#[test_case]` / `#[wasm_bindgen_test]`" -#: src/commands/metrics.md:169 +#: src/commands/metrics.md:174 msgid "`#[cfg(test)]`, `#[cfg(all(test, ...))]`, `#[cfg(any(test, ...))]`" msgstr "`#[cfg(test)]`、`#[cfg(all(test, ...))]`、`#[cfg(any(test, ...))]`" -#: src/commands/metrics.md:170 +#: src/commands/metrics.md:175 msgid "" "`#[tokio::test]`, `#[async_std::test]`, `#[test_log::test]`, … (any path " "ending in `::test`)" msgstr "" -"`#[tokio::test]`、`#[async_std::test]`、`#[test_log::test]` など(`::test` で" -"終わる任意のパス)" +"`#[tokio::test]`、`#[async_std::test]`、`#[test_log::test]` など(`::test` " +"で終わる任意のパス)" -#: src/commands/metrics.md:172 +#: src/commands/metrics.md:177 msgid "`#![cfg(test)]` on `mod` items (inner attribute form)" msgstr "`mod` アイテムに付く `#![cfg(test)]`(内部属性形式)" -#: src/commands/metrics.md:174 +#: src/commands/metrics.md:179 msgid "" "Languages without a `Checker::should_skip_subtree` override simply ignore " "the flag — only Rust applies the pruning today. The default remains off so " "existing metric numbers stay byte-identical for users who do not opt in." msgstr "" -"`Checker::should_skip_subtree` のオーバーライドを持たない言語では、このフラグ" -"は単に無視されます — 現在プルーニングを適用するのは Rust のみです。デフォルト" -"はオフのままなので、オプトインしないユーザーの既存のメトリクス値はバイト単位" -"で同一に保たれます。" +"`Checker::should_skip_subtree` のオーバーライドを持たない言語では、このフラ" +"グは単に無視されます — 現在プルーニングを適用するのは Rust のみです。デフォ" +"ルトはオフのままなので、オプトインしないユーザーの既存のメトリクス値はバイト" +"単位で同一に保たれます。" -#: src/commands/metrics.md:179 +#: src/commands/metrics.md:184 msgid "" "To opt a whole project in without repeating the flag, set `exclude_tests = " "true` in the repo's [`bca.toml` manifest](../recipes/local-gates.md#zero-" -"config-the-bcatoml-manifest). Because `--exclude-tests` is presence-only (no " -"`=false` form), the manifest key can only turn pruning **on**; a CLI `--" +"config-the-bcatoml-manifest). Because `--exclude-tests` is presence-only " +"(no `=false` form), the manifest key can only turn pruning **on**; a CLI `--" "exclude-tests` still wins, but the manifest cannot turn it back off. Note " "that pruning lowers the node-counted metrics (cyclomatic, cognitive, " "Halstead, `nom`, `nargs`, …) but leaves unit-level `loc.sloc` at the full " "file extent, since unit SLOC is the file root span rather than a traversal " "accumulation." msgstr "" -"フラグを繰り返さずにプロジェクト全体をオプトインするには、リポジトリの [`bca." -"toml` マニフェスト](../recipes/local-gates.md#zero-config-the-bcatoml-" -"manifest)で `exclude_tests = true` を設定します。`--exclude-tests` は存在のみ" -"のフラグ(`=false` 形式なし)のため、マニフェストキーはプルーニングを**オン**" -"にすることしかできません。CLI の `--exclude-tests` は引き続き優先されますが、" -"マニフェスト側からオフに戻すことはできません。プルーニングはノード数ベースの" -"メトリクス(cyclomatic、cognitive、Halstead、`nom`、`nargs` など)を下げます" -"が、ユニットレベルの `loc.sloc` はファイル全体の範囲のまま残ります。ユニット " -"SLOC はトラバーサルの累積ではなくファイルルートのスパンだからです。" - -#: src/commands/metrics.md:190 +"フラグを繰り返さずにプロジェクト全体をオプトインするには、リポジトリの " +"[`bca.toml` マニフェスト](../recipes/local-gates.md#zero-config-the-bcatoml-" +"manifest)で `exclude_tests = true` を設定します。`--exclude-tests` は存在の" +"みのフラグ(`=false` 形式なし)のため、マニフェストキーはプルーニングを**オ" +"ン**にすることしかできません。CLI の `--exclude-tests` は引き続き優先されま" +"すが、マニフェスト側からオフに戻すことはできません。プルーニングはノード数" +"ベースのメトリクス(cyclomatic、cognitive、Halstead、`nom`、`nargs` など)を" +"下げますが、ユニットレベルの `loc.sloc` はファイル全体の範囲のまま残ります。" +"ユニット SLOC はトラバーサルの累積ではなくファイルルートのスパンだからです。" + +#: src/commands/metrics.md:195 msgid "Aggregated report" msgstr "集約レポート" -#: src/commands/metrics.md:192 +#: src/commands/metrics.md:197 msgid "" "For a comprehensive, human-readable quality report, use [`bca report " "markdown`](report.md). That command aggregates metrics across all analyzed " "files and produces per-language hotspot tables." msgstr "" -"包括的で人間が読みやすい品質レポートには、[`bca report markdown`](report.md) " -"を使用してください。このコマンドは解析したすべてのファイルにわたってメトリク" -"スを集約し、言語ごとのホットスポットテーブルを生成します。" +"包括的で人間が読みやすい品質レポートには、[`bca report markdown`](report." +"md) を使用してください。このコマンドは解析したすべてのファイルにわたってメト" +"リクスを集約し、言語ごとのホットスポットテーブルを生成します。" -#: src/commands/metrics.md:196 +#: src/commands/metrics.md:201 msgid "Listing available metrics" msgstr "利用可能なメトリクスの一覧" -#: src/commands/metrics.md:198 +#: src/commands/metrics.md:203 msgid "" "Tooling that drives the CLI can discover the metric catalog at runtime " "instead of hard-coding it:" @@ -5469,10 +5626,10 @@ msgstr "" "CLI を駆動するツールは、メトリクスのカタログをハードコードする代わりに実行時" "に検出できます。" -#: src/commands/metrics.md:205 +#: src/commands/metrics.md:210 msgid "" -"prints metric names one per line. Pass `descriptions` for a one-line summary " -"of each metric:" +"prints metric names one per line. Pass `descriptions` for a one-line " +"summary of each metric:" msgstr "" "はメトリクス名を 1 行に 1 つずつ出力します。各メトリクスの 1 行要約を得るに" "は `descriptions` を渡します。" @@ -5488,32 +5645,41 @@ msgid "" msgstr "" "`bca vcs` は、ソースの AST(抽象構文木)ではなくバージョン管理履歴から導かれ" "るシグナルである**変更履歴リスク**でファイルをランク付けします。これはプロ" -"ジェクト初の、言語非依存かつ非 AST のメトリクスファミリーです。目的は、欠陥予" -"測・脆弱性予測の実証研究文献が最も一貫して裏付けているシグナルを用いて、バグ" -"や脆弱性を抱えている可能性が最も高いファイルを浮かび上がらせることです。" +"ジェクト初の、言語非依存かつ非 AST のメトリクスファミリーです。目的は、欠陥" +"予測・脆弱性予測の実証研究文献が最も一貫して裏付けているシグナルを用いて、バ" +"グや脆弱性を抱えている可能性が最も高いファイルを浮かび上がらせることです。" #: src/commands/vcs.md:10 msgid "" -"A single history walk runs once per invocation (never per file) and produces " -"per-file signals over two configurable windows — a **long** window (default " -"`12mo` ≈ 365 days) and a **recent** window (default `90d`)." +"A single history walk runs once per invocation (never per file) and " +"produces per-file signals over two configurable windows — a **long** window " +"(default `12mo` ≈ 365 days) and a **recent** window (default `90d`)." msgstr "" -"履歴の走査は呼び出しごとに 1 回だけ実行され(ファイルごとには決して実行されま" -"せん)、設定可能な 2 つのウィンドウ — **長期**ウィンドウ(デフォルト `12mo` " -"≈ 365 日)と**直近**ウィンドウ(デフォルト `90d`)— にわたるファイルごとのシ" -"グナルを生成します。" +"履歴の走査は呼び出しごとに 1 回だけ実行され(ファイルごとには決して実行され" +"ません)、設定可能な 2 つのウィンドウ — **長期**ウィンドウ(デフォルト " +"`12mo` ≈ 365 日)と**直近**ウィンドウ(デフォルト `90d`)— にわたるファイル" +"ごとのシグナルを生成します。" #: src/commands/vcs.md:26 msgid "" -"With no `--format`, a human-readable ranked table is printed. Pass `--format " -"markdown|html` for a rendered report page, or `--format json|yaml|toml|cbor|" -"csv` for structured output. Unlike `bca metrics` / `bca ops` (whose `--" -"output-dir` is a _directory_ of per-file emissions), a change-history report " -"is a single whole-repo document, so `bca vcs --output ` writes **one " -"file** (CBOR, being binary, requires `--output`). The global `--paths` / `--" -"include` / `--exclude` / `--no-ignore` filters are reused to pick which " -"tracked files to report." -msgstr "`--format` を指定しない場合、人間が読めるランク付きテーブルが出力されます。レンダリングされたレポートページには `--format markdown|html` を、構造化出力には `--format json|yaml|toml|cbor|csv` を渡します。`bca metrics` / `bca ops`(これらの `--output-dir` はファイルごとの出力を格納する「ディレクトリ」です)と異なり、変更履歴レポートはリポジトリ全体で 1 つの文書なので、`bca vcs --output ` は**1 つのファイル**を書き出します(バイナリ形式である CBOR には `--output` が必須です)。グローバルな `--paths` / `--include` / `--exclude` / `--no-ignore` フィルタは、どの追跡ファイルをレポートするかの選択に再利用されます。" +"With no `--format`, a human-readable ranked table is printed. Pass `--" +"format markdown|html` for a rendered report page, or `--format json|yaml|" +"toml|cbor|csv` for structured output. Unlike `bca metrics` / `bca ops` " +"(whose `--output-dir` is a _directory_ of per-file emissions), a change-" +"history report is a single whole-repo document, so `bca vcs --output " +"` writes **one file** (CBOR, being binary, requires `--output`). The " +"global `--paths` / `--include` / `--exclude` / `--no-ignore` filters are " +"reused to pick which tracked files to report." +msgstr "" +"`--format` を指定しない場合、人間が読めるランク付きテーブルが出力されます。" +"レンダリングされたレポートページには `--format markdown|html` を、構造化出力" +"には `--format json|yaml|toml|cbor|csv` を渡します。`bca metrics` / `bca " +"ops`(これらの `--output-dir` はファイルごとの出力を格納する「ディレクトリ」" +"です)と異なり、変更履歴レポートはリポジトリ全体で 1 つの文書なので、`bca " +"vcs --output ` は**1 つのファイル**を書き出します(バイナリ形式である " +"CBOR には `--output` が必須です)。グローバルな `--paths` / `--include` / " +"`--exclude` / `--no-ignore` フィルタは、どの追跡ファイルをレポートするかの選" +"択に再利用されます。" #: src/commands/vcs.md:36 msgid "`bca vcs` errors clearly when run outside a git working tree." @@ -5525,8 +5691,8 @@ msgstr "ファイルタイプのスコープ" #: src/commands/vcs.md:40 msgid "" -"By default `bca vcs` ranks **only the files bca computes metrics for** — the " -"same set `bca metrics` would analyse. High-churn non-source files " +"By default `bca vcs` ranks **only the files bca computes metrics for** — " +"the same set `bca metrics` would analyse. High-churn non-source files " "(`CHANGELOG.md`, `Cargo.lock`, generated config) carry no maintainability " "meaning yet maximise the churn / commit / author signals, so ranking them " "beside source code is noise; scoping to files-with-metrics also keeps the " @@ -5602,12 +5768,12 @@ msgid "" msgstr "" "この判定は**拡張子のみ**で行われ(ファイル内容は読み取りません)、`--" "paths` / `--include` / `--exclude` / `--no-ignore` フィルタと AND 条件になり" -"ます — ランク付けされるには、ファイルが両方を通過する必要があります。拡張子の" -"ないファイル(`Makefile`、`Dockerfile`、`LICENSE`)や未知の拡張子は " +"ます — ランク付けされるには、ファイルが両方を通過する必要があります。拡張子" +"のないファイル(`Makefile`、`Dockerfile`、`LICENSE`)や未知の拡張子は " "`metrics` スコープの対象外です。カスタムリストはリテラルな拡張子フィルタなの" -"で、`toml` のようなメトリクス対象外のタイプも含められます。空または空白のみの" -"カスタムリストは、何もランク付けせず沈黙するスコープになるのではなく、明確な" -"エラーになります。" +"で、`toml` のようなメトリクス対象外のタイプも含められます。空または空白のみ" +"のカスタムリストは、何もランク付けせず沈黙するスコープになるのではなく、明確" +"なエラーになります。" #: src/commands/vcs.md:70 msgid "Rendered report page" @@ -5615,20 +5781,20 @@ msgstr "レンダリングされたレポートページ" #: src/commands/vcs.md:77 msgid "" -"`--format html` produces a self-contained, sortable page styled exactly like " -"`bca report html` (click any column header to re-sort); `--format markdown` " -"produces the same ranked table as GitHub-Flavored Markdown. Both render " -"every signal column (the complete, sortable view of the same data the " -"structured formats carry). The column set is defined once and shared by both " -"renderers, so they cannot drift." +"`--format html` produces a self-contained, sortable page styled exactly " +"like `bca report html` (click any column header to re-sort); `--format " +"markdown` produces the same ranked table as GitHub-Flavored Markdown. Both " +"render every signal column (the complete, sortable view of the same data " +"the structured formats carry). The column set is defined once and shared by " +"both renderers, so they cannot drift." msgstr "" "`--format html` は、`bca report html` とまったく同じスタイルの、自己完結型で" "ソート可能なページを生成します(任意の列ヘッダーをクリックすると並べ替えられ" "ます)。`--format markdown` は同じランク付きテーブルを GitHub-Flavored " -"Markdown として生成します。どちらもすべてのシグナル列をレンダリングします(構" -"造化フォーマットが持つのと同じデータの、完全でソート可能なビューです)。列" -"セットは一度だけ定義され両方のレンダラーで共有されるため、両者が乖離すること" -"はありません。" +"Markdown として生成します。どちらもすべてのシグナル列をレンダリングします" +"(構造化フォーマットが持つのと同じデータの、完全でソート可能なビューです)。" +"列セットは一度だけ定義され両方のレンダラーで共有されるため、両者が乖離するこ" +"とはありません。" #: src/commands/vcs.md:84 msgid "" @@ -5799,8 +5965,8 @@ msgid "" "`complexity × churn_recent`; present only when AST metrics are computed " "alongside" msgstr "" -"`complexity × churn_recent`。AST メトリクスが同時に計算される場合のみ存在しま" -"す" +"`complexity × churn_recent`。AST メトリクスが同時に計算される場合のみ存在し" +"ます" #: src/commands/vcs.md:106 msgid "`risk_score_version` / `vcs_schema_version`" @@ -5826,11 +5992,11 @@ msgid "" "in-window activity)." msgstr "" "作者 ID はリポジトリの `.mailmap` を通じて正規化され、小文字化したメールアド" -"レスで数えられます。`Co-authored-by:` トレーラーは参加者を追加します。ボット " -"ID(`dependabot[bot]`、`renovate[bot]`、`github-actions[bot]` など)はデフォ" -"ルトで除外されます。バイナリファイルとシンボリックリンクはスキップされます。" -"未追跡ファイルにはレコードがまったく存在しません(ウィンドウ内の活動がゼロの" -"追跡ファイルとは区別されます)。" +"レスで数えられます。`Co-authored-by:` トレーラーは参加者を追加します。ボッ" +"ト ID(`dependabot[bot]`、`renovate[bot]`、`github-actions[bot]` など)はデ" +"フォルトで除外されます。バイナリファイルとシンボリックリンクはスキップされま" +"す。未追跡ファイルにはレコードがまったく存在しません(ウィンドウ内の活動がゼ" +"ロの追跡ファイルとは区別されます)。" #: src/commands/vcs.md:115 msgid "Change & co-change entropy" @@ -5840,20 +6006,33 @@ msgstr "変更エントロピーと共変更エントロピー" msgid "" "Two process-entropy signals (added in `risk_score_version` 2) capture _how_ " "a file changes, not just how much:" -msgstr "2 つのプロセスエントロピーシグナル(`risk_score_version` 2 で追加)は、ファイルの変更量だけでなく、「どのように」変更されるかを捉えます。" +msgstr "" +"2 つのプロセスエントロピーシグナル(`risk_score_version` 2 で追加)は、ファ" +"イルの変更量だけでなく、「どのように」変更されるかを捉えます。" #: src/commands/vcs.md:120 msgid "" "**Change entropy** (Hassan, 2009 — _Predicting Faults Using the Complexity " "of Code Changes_). For each commit, the Shannon entropy (in bits) of its " -"churn distribution across the files it touched measures how _scattered_ that " -"change was: a one-file commit is 0; a commit spreading churn evenly across " -"_n_ files approaches log₂(_n_). Each file is then credited its churn share " -"`pᵢ·H` of every commit it took part in (Hassan's History Complexity Metric). " -"Higher = the file is repeatedly caught up in diffuse, cross-cutting changes. " -"Later work (arXiv 2504.18511, below) measured file-level change entropy at a " -"Pearson correlation up to 0.54 with defect counts on eight Apache projects." -msgstr "**変更エントロピー**(Hassan, 2009 — _Predicting Faults Using the Complexity of Code Changes_)。各コミットについて、そのコミットが触れたファイル群にわたるチャーン分布の Shannon エントロピー(ビット単位)が、その変更がどれだけ「分散」していたかを測ります。1 ファイルのみのコミットは 0 で、_n_ 個のファイルへ均等にチャーンを広げるコミットは log₂(_n_) に近づきます。次に、各ファイルには参加した各コミットのチャーンシェア `pᵢ·H` がクレジットされます(Hassan の History Complexity Metric)。値が高いほど、そのファイルは拡散的で横断的な変更に繰り返し巻き込まれていることを意味します。後続研究(下記の arXiv 2504.18511)では、8 つの Apache プロジェクトにおいてファイルレベルの変更エントロピーと欠陥数との Pearson 相関が最大 0.54 と測定されました。" +"churn distribution across the files it touched measures how _scattered_ " +"that change was: a one-file commit is 0; a commit spreading churn evenly " +"across _n_ files approaches log₂(_n_). Each file is then credited its churn " +"share `pᵢ·H` of every commit it took part in (Hassan's History Complexity " +"Metric). Higher = the file is repeatedly caught up in diffuse, cross-" +"cutting changes. Later work (arXiv 2504.18511, below) measured file-level " +"change entropy at a Pearson correlation up to 0.54 with defect counts on " +"eight Apache projects." +msgstr "" +"**変更エントロピー**(Hassan, 2009 — _Predicting Faults Using the " +"Complexity of Code Changes_)。各コミットについて、そのコミットが触れたファ" +"イル群にわたるチャーン分布の Shannon エントロピー(ビット単位)が、その変更" +"がどれだけ「分散」していたかを測ります。1 ファイルのみのコミットは 0 で、" +"_n_ 個のファイルへ均等にチャーンを広げるコミットは log₂(_n_) に近づきます。" +"次に、各ファイルには参加した各コミットのチャーンシェア `pᵢ·H` がクレジットさ" +"れます(Hassan の History Complexity Metric)。値が高いほど、そのファイルは" +"拡散的で横断的な変更に繰り返し巻き込まれていることを意味します。後続研究(下" +"記の arXiv 2504.18511)では、8 つの Apache プロジェクトにおいてファイルレベ" +"ルの変更エントロピーと欠陥数との Pearson 相関が最大 0.54 と測定されました。" #: src/commands/vcs.md:130 msgid "" @@ -5862,36 +6041,39 @@ msgid "" "commits). A file's co-change entropy is the Shannon entropy of its edge-" "weight distribution: low when it always co-changes with the same partner, " "high when its changes ripple across many different files. Combined with " -"change entropy it improved AUROC in 82.5% of cases over the v1 signal set on " -"eight Apache projects." +"change entropy it improved AUROC in 82.5% of cases over the v1 signal set " +"on eight Apache projects." msgstr "" "**共変更グラフエントロピー**(arXiv 2504.18511, 2025)。同じコミットで変更さ" -"れたファイル同士は、重み付きエッジ(重み = 共有コミット数)で結ばれます。ファ" -"イルの共変更エントロピーは、そのエッジ重み分布の Shannon エントロピーです。常" -"に同じ相手と共変更される場合は低く、変更が多くの異なるファイルへ波及する場合" -"は高くなります。変更エントロピーと組み合わせることで、8 つの Apache プロジェ" -"クトにおいて v1 シグナルセットに対し 82.5% のケースで AUROC を改善しました。" +"れたファイル同士は、重み付きエッジ(重み = 共有コミット数)で結ばれます。" +"ファイルの共変更エントロピーは、そのエッジ重み分布の Shannon エントロピーで" +"す。常に同じ相手と共変更される場合は低く、変更が多くの異なるファイルへ波及す" +"る場合は高くなります。変更エントロピーと組み合わせることで、8 つの Apache プ" +"ロジェクトにおいて v1 シグナルセットに対し 82.5% のケースで AUROC を改善しま" +"した。" #: src/commands/vcs.md:138 msgid "" -"Both are reported per window. A `0.0` is **computed**, not missing: the file " -"only ever changed alone (no co-change neighbours, or single-file commits " -"with zero change entropy). Bulk-import commits touching more than 1000 files " -"are excluded from the co-change graph — its edge count grows O(width²) — but " -"still contribute their O(width) change entropy." +"Both are reported per window. A `0.0` is **computed**, not missing: the " +"file only ever changed alone (no co-change neighbours, or single-file " +"commits with zero change entropy). Bulk-import commits touching more than " +"1000 files are excluded from the co-change graph — its edge count grows " +"O(width²) — but still contribute their O(width) change entropy." msgstr "" "どちらもウィンドウごとに報告されます。`0.0` は欠損値ではなく**計算された値**" "です。そのファイルが常に単独で変更されていた(共変更の隣接ファイルがない、ま" -"たは変更エントロピーがゼロの単一ファイルコミットのみ)ことを意味します。1000 " -"ファイル超に触れる一括インポートコミットは、エッジ数が O(width²) で増えるため" -"共変更グラフからは除外されますが、O(width) の変更エントロピーには引き続き寄与" -"します。" +"たは変更エントロピーがゼロの単一ファイルコミットのみ)ことを意味します。" +"1000 ファイル超に触れる一括インポートコミットは、エッジ数が O(width²) で増え" +"るため共変更グラフからは除外されますが、O(width) の変更エントロピーには引き" +"続き寄与します。" #: src/commands/vcs.md:146 msgid "" "The default **weighted** formula is a log-scaled weighted sum with " "categorical multiplicative bumps:" -msgstr "デフォルトの**加重(weighted)** 式は、カテゴリ別の乗法的ボーナスを伴う、対数スケールの加重和です。" +msgstr "" +"デフォルトの**加重(weighted)** 式は、カテゴリ別の乗法的ボーナスを伴う、対" +"数スケールの加重和です。" #: src/commands/vcs.md:149 msgid "" @@ -5961,8 +6143,8 @@ msgid "" "touched by ≥9 developers were ~16× more likely to harbour a vulnerability; " "security fixes are double-weighted (Sentence-Level VFC studies; PySecDB); " "and the recent-window change- and co-change-entropy terms enter additively " -"(Hassan 2009; arXiv 2504.18511). The full derivation lives in `src/vcs/score." -"rs`." +"(Hassan 2009; arXiv 2504.18511). The full derivation lives in `src/vcs/" +"score.rs`." msgstr "" "各項の重みは文献に基づいています。直近のチャーンとコミット頻度が最大の重みを" "持ちます(Nagappan & Ball の相対チャーン、just-in-time 欠陥予測、Firefox の " @@ -5980,7 +6162,11 @@ msgid "" "`risk_score_version` (now `2`) versions **both** formulas — any change to " "the weighted sum _or_ the `--risk-formula percentile` blend bumps it; the " "recent entropy pair joins both." -msgstr "このスコアは**順序尺度**であり、相対的な順位のみが意味を持ちます。単一の `risk_score_version`(現在は `2`)が**両方の**式をバージョン管理します。加重和「または」 `--risk-formula percentile` ブレンドのどちらを変更してもバージョンが上がります。直近のエントロピー 2 項は両方の式に加わっています。" +msgstr "" +"このスコアは**順序尺度**であり、相対的な順位のみが意味を持ちます。単一の " +"`risk_score_version`(現在は `2`)が**両方の**式をバージョン管理します。加重" +"和「または」 `--risk-formula percentile` ブレンドのどちらを変更してもバー" +"ジョンが上がります。直近のエントロピー 2 項は両方の式に加わっています。" #: src/commands/vcs.md:190 msgid "" @@ -5990,10 +6176,10 @@ msgid "" "robustness." msgstr "" "`--risk-formula percentile` は代替の式です。各シグナルを解析対象集合内のパー" -"センタイルに再ランク付けし、その平均を取ります — 文献は、プロジェクト横断の頑" -"健性のために、固定しきい値よりも相対的なトリガーを推奨しています。" +"センタイルに再ランク付けし、その平均を取ります — 文献は、プロジェクト横断の" +"頑健性のために、固定しきい値よりも相対的なトリガーを推奨しています。" -#: src/commands/vcs.md:197 src/commands/report.md:41 src/commands/check.md:406 +#: src/commands/vcs.md:197 src/commands/report.md:41 src/commands/check.md:416 #: src/commands/web-server.md:61 src/recipes/ci.md:529 msgid "Flag" msgstr "フラグ" @@ -6207,26 +6393,28 @@ msgid "" "Ranking re-walks only the part of history inside the long window, but on a " "large, active repository that is still the dominant cost — and in CI the " "interesting deltas between runs are just the commits pushed since the last " -"one. `bca vcs` therefore keeps a **persistent cache** of each walk, keyed by " -"the resolved `HEAD` SHA and the repository's identity:" +"one. `bca vcs` therefore keeps a **persistent cache** of each walk, keyed " +"by the resolved `HEAD` SHA and the repository's identity:" msgstr "" "ランキングが再走査するのは長期ウィンドウ内の履歴部分だけですが、大規模で活発" -"なリポジトリではそれでも支配的なコストです — そして CI では、実行間で意味のあ" -"る差分は前回以降にプッシュされたコミットだけです。そのため `bca vcs` は、解決" -"済みの `HEAD` SHA とリポジトリの同一性をキーとして、各走査の**永続キャッシュ" -"**を保持します。" +"なリポジトリではそれでも支配的なコストです — そして CI では、実行間で意味の" +"ある差分は前回以降にプッシュされたコミットだけです。そのため `bca vcs` は、" +"解決済みの `HEAD` SHA とリポジトリの同一性をキーとして、各走査の**永続キャッ" +"シュ**を保持します。" #: src/commands/vcs.md:225 -msgid "On an **unchanged tree** the prior result is replayed, no history walk." -msgstr "**変更のないツリー**では前回の結果が再生され、履歴走査は行われません。" +msgid "" +"On an **unchanged tree** the prior result is replayed, no history walk." +msgstr "" +"**変更のないツリー**では前回の結果が再生され、履歴走査は行われません。" #: src/commands/vcs.md:226 msgid "" "When **`HEAD` has advanced** the walk visits only the new commits and " "splices them onto the cached history." msgstr "" -"**`HEAD` が前進した**場合、走査は新しいコミットのみを訪れ、それをキャッシュ済" -"み履歴に継ぎ足します。" +"**`HEAD` が前進した**場合、走査は新しいコミットのみを訪れ、それをキャッシュ" +"済み履歴に継ぎ足します。" #: src/commands/vcs.md:228 msgid "" @@ -6244,10 +6432,19 @@ msgid "" "history recomputed — whenever the schema, the score-formula version, or the " "_walk-affecting_ options differ; in particular **changing a window forces a " "fresh walk**. (Finalization-only knobs such as `--risk-formula`, `--emit-" -"author-details`, `--author-hash-key`, and `--include-deleted` are applied on " -"replay, so they reuse the same cached walk — a cached walk even re-finalizes " -"under a _different_ author-hash key without re-walking.)" -msgstr "このキャッシュは純粋な最適化です。キャッシュヒットは新規の走査と**ビット単位で同一**であり、時間ウィンドウは実行のたびに「現在」時刻に対して再計算されるため、キャッシュされた結果が古くなることはありません。スキーマ、スコア式のバージョン、または「走査に影響する」オプションが異なる場合、エントリは無視され履歴が再計算されます。特に、**ウィンドウを変更すると新規の走査が強制されます**。(`--risk-formula`、`--emit-author-details`、`--author-hash-key`、`--include-deleted` のような最終化のみのノブは再生時に適用されるため、同じキャッシュ済み走査を再利用します — キャッシュ済み走査は、「異なる」作者ハッシュ鍵の下でも再走査なしで再最終化されます。)" +"author-details`, `--author-hash-key`, and `--include-deleted` are applied " +"on replay, so they reuse the same cached walk — a cached walk even re-" +"finalizes under a _different_ author-hash key without re-walking.)" +msgstr "" +"このキャッシュは純粋な最適化です。キャッシュヒットは新規の走査と**ビット単位" +"で同一**であり、時間ウィンドウは実行のたびに「現在」時刻に対して再計算される" +"ため、キャッシュされた結果が古くなることはありません。スキーマ、スコア式の" +"バージョン、または「走査に影響する」オプションが異なる場合、エントリは無視さ" +"れ履歴が再計算されます。特に、**ウィンドウを変更すると新規の走査が強制されま" +"す**。(`--risk-formula`、`--emit-author-details`、`--author-hash-key`、`--" +"include-deleted` のような最終化のみのノブは再生時に適用されるため、同じ" +"キャッシュ済み走査を再利用します — キャッシュ済み走査は、「異なる」作者ハッ" +"シュ鍵の下でも再走査なしで再最終化されます。)" #: src/commands/vcs.md:241 msgid "" @@ -6256,17 +6453,17 @@ msgid "" "stored only as their SHA-256 digests — never plaintext — so the cache holds " "no raw author emails. Note this is pseudonymization, not anonymization: the " "digests are recoverable against a candidate email set (see [`--emit-author-" -"details`](#author-detail-privacy)). The same cache transparently accelerates " -"`bca metrics --vcs` and `bca report --vcs`." -msgstr "" -"デフォルトでは、キャッシュは `$XDG_CACHE_HOME/big-code-analysis/vcs` の下に置" -"かれます(Windows では `%LOCALAPPDATA%`、それ以外では `~/.cache`)。作者 ID " -"は SHA-256 ダイジェストとしてのみ保存され、平文では決して保存されないため、" -"キャッシュに生の作者メールアドレスは含まれません。これは匿名化ではなく仮名化" -"である点に注意してください。ダイジェストは候補となるメールアドレス集合に対し" -"て復元可能です([`--emit-author-details`](#author-detail-privacy) を参照)。" -"同じキャッシュは `bca metrics --vcs` と `bca report --vcs` も透過的に高速化し" -"ます。" +"details`](#author-detail-privacy)). The same cache transparently " +"accelerates `bca metrics --vcs` and `bca report --vcs`." +msgstr "" +"デフォルトでは、キャッシュは `$XDG_CACHE_HOME/big-code-analysis/vcs` の下に" +"置かれます(Windows では `%LOCALAPPDATA%`、それ以外では `~/.cache`)。作者 " +"ID は SHA-256 ダイジェストとしてのみ保存され、平文では決して保存されないた" +"め、キャッシュに生の作者メールアドレスは含まれません。これは匿名化ではなく仮" +"名化である点に注意してください。ダイジェストは候補となるメールアドレス集合に" +"対して復元可能です([`--emit-author-details`](#author-detail-privacy) を参" +"照)。同じキャッシュは `bca metrics --vcs` と `bca report --vcs` も透過的に" +"高速化します。" #: src/commands/vcs.md:251 msgid "# First run primes the cache; the second replays it.\n" @@ -6287,12 +6484,12 @@ msgstr "# ゼロから再構築\n" #: src/commands/vcs.md:260 msgid "" "The REST (`POST /v1/vcs`) and Python ([`vcs.rank`](../python/vcs.md)) " -"surfaces expose the same behaviour through optional `no_cache` / `cache_dir` " -"parameters." +"surfaces expose the same behaviour through optional `no_cache` / " +"`cache_dir` parameters." msgstr "" -"REST(`POST /v1/vcs`)と Python([`vcs.rank`](../python/vcs.md))の各インター" -"フェースは、省略可能な `no_cache` / `cache_dir` パラメータを通じて同じ挙動を" -"提供します。" +"REST(`POST /v1/vcs`)と Python([`vcs.rank`](../python/vcs.md))の各イン" +"ターフェースは、省略可能な `no_cache` / `cache_dir` パラメータを通じて同じ挙" +"動を提供します。" #: src/commands/vcs.md:264 msgid "" @@ -6355,11 +6552,16 @@ msgstr "関数単位の帰属" #: src/commands/vcs.md:289 msgid "" "`bca metrics --vcs-per-function` (which implies `--vcs`) additionally " -"attaches a `vcs` block to every nested function, method, and class space. It " -"blames each file once with `git blame` and buckets the surviving lines into " -"the AST function spans, so you can rank the risky _function_ inside a risky " -"file:" -msgstr "`bca metrics --vcs-per-function`(`--vcs` を暗黙に含みます)は、さらに入れ子になったすべての関数・メソッド・クラスのスペースに `vcs` ブロックを付加します。各ファイルを `git blame` で一度だけ blame し、現存する行を AST の関数スパンに振り分けるため、リスクの高いファイルの中のリスクの高い「関数」をランク付けできます:" +"attaches a `vcs` block to every nested function, method, and class space. " +"It blames each file once with `git blame` and buckets the surviving lines " +"into the AST function spans, so you can rank the risky _function_ inside a " +"risky file:" +msgstr "" +"`bca metrics --vcs-per-function`(`--vcs` を暗黙に含みます)は、さらに入れ子" +"になったすべての関数・メソッド・クラスのスペースに `vcs` ブロックを付加しま" +"す。各ファイルを `git blame` で一度だけ blame し、現存する行を AST の関数ス" +"パンに振り分けるため、リスクの高いファイルの中のリスクの高い「関数」をランク" +"付けできます:" #: src/commands/vcs.md:295 msgid "" @@ -6378,8 +6580,8 @@ msgstr "" "```console\n" "$ bca metrics --vcs-per-function --paths src/parser.rs --format json\n" "{ \"name\": \"src/parser.rs\",\n" -" \"metrics\": { \"vcs\": { \"risk_score\": 3.7, ... } }, // ファイルレベル" -"のブロック\n" +" \"metrics\": { \"vcs\": { \"risk_score\": 3.7, ... } }, // ファイルレベ" +"ルのブロック\n" " \"spaces\": [\n" " { \"name\": \"parse\", \"kind\": \"function\",\n" " \"metrics\": { \"vcs\": { \"commits_long\": 4, \"churn_recent\": 12,\n" @@ -6389,14 +6591,21 @@ msgstr "" #: src/commands/vcs.md:305 msgid "" -"The per-function block is a **current-blame snapshot** and is _not_ directly " -"comparable to the file-level block: its `churn` counts surviving lines whose " -"last touch falls inside the window (not historical added+deleted churn), and " -"ownership is credited per touching commit. A function nobody has changed " -"within the window reports zero counts. Lines whose last touch predates the " -"long window contribute to the function's size but to none of the windowed " -"counts." -msgstr "関数単位のブロックは**現時点の blame のスナップショット**であり、ファイルレベルのブロックと直接比較「できません」。その `churn` は、最終変更がウィンドウ内に収まる現存行を数えるものであり(過去の追加+削除のチャーンではありません)、所有権は変更したコミットごとに加算されます。ウィンドウ内で誰も変更していない関数のカウントはゼロと報告されます。最終変更が長期ウィンドウより前の行は、関数のサイズには寄与しますが、ウィンドウ付きのどのカウントにも寄与しません。" +"The per-function block is a **current-blame snapshot** and is _not_ " +"directly comparable to the file-level block: its `churn` counts surviving " +"lines whose last touch falls inside the window (not historical " +"added+deleted churn), and ownership is credited per touching commit. A " +"function nobody has changed within the window reports zero counts. Lines " +"whose last touch predates the long window contribute to the function's size " +"but to none of the windowed counts." +msgstr "" +"関数単位のブロックは**現時点の blame のスナップショット**であり、ファイルレ" +"ベルのブロックと直接比較「できません」。その `churn` は、最終変更がウィンド" +"ウ内に収まる現存行を数えるものであり(過去の追加+削除のチャーンではありませ" +"ん)、所有権は変更したコミットごとに加算されます。ウィンドウ内で誰も変更して" +"いない関数のカウントはゼロと報告されます。最終変更が長期ウィンドウより前の行" +"は、関数のサイズには寄与しますが、ウィンドウ付きのどのカウントにも寄与しませ" +"ん。" #: src/commands/vcs.md:313 msgid "" @@ -6404,11 +6613,18 @@ msgid "" "still attribute), but attributes a line _moved between functions_ to its " "current position only. A function split into two has no record of its pre-" "split identity, and a deleted-then-recreated function attributes to the " -"recreating commits. If a file cannot be blamed — untracked, or the rare `gix-" -"blame` failure on pathologically repetitive content — its per-function " +"recreating commits. If a file cannot be blamed — untracked, or the rare " +"`gix-blame` failure on pathologically repetitive content — its per-function " "blocks are simply omitted while the file-level block (and the AST metrics) " "still emit." -msgstr "**制限事項。** blame はファイルのリネームを追跡します(そのため旧パスでの編集も帰属します)が、「関数間を移動した」行は現在の位置にのみ帰属します。2 つに分割された関数には分割前のアイデンティティの記録はなく、削除後に再作成された関数は再作成したコミットに帰属します。ファイルが blame できない場合 — 未追跡の場合や、病的に反復的な内容に対するまれな `gix-blame` の失敗の場合 — その関数単位のブロックは単に省略され、ファイルレベルのブロック(と AST メトリクス)は引き続き出力されます。" +msgstr "" +"**制限事項。** blame はファイルのリネームを追跡します(そのため旧パスでの編" +"集も帰属します)が、「関数間を移動した」行は現在の位置にのみ帰属します。2 つ" +"に分割された関数には分割前のアイデンティティの記録はなく、削除後に再作成され" +"た関数は再作成したコミットに帰属します。ファイルが blame できない場合 — 未追" +"跡の場合や、病的に反復的な内容に対するまれな `gix-blame` の失敗の場合 — その" +"関数単位のブロックは単に省略され、ファイルレベルのブロック(と AST メトリク" +"ス)は引き続き出力されます。" #: src/commands/vcs.md:322 msgid "Just-in-time (commit-level) scoring" @@ -6422,14 +6638,28 @@ msgid "" "the old `jit` spelling keeps working as a hidden alias for one release " "cycle. \"Just-in-time (JIT)\" stays the literature term, below.) It is a " "static, rule-based scorer (no trained model, so nothing drifts as the " -"project ages), with the feature groups and signs taken from the just-in-time " -"defect-prediction literature: Kamei et al., [_A Large-Scale Empirical Study " -"of Just-in-Time Quality Assurance_](https://doi.org/10.1109/TSE.2013.2386), " -"IEEE TSE 2013, with the open replications [Commit Guru](https://doi." -"org/10.1145/2786805.2803183) (FSE 2015) and McIntosh & Kamei, [_Are Fix-" -"Inducing Changes a Moving Target?_](https://doi.org/10.1109/" +"project ages), with the feature groups and signs taken from the just-in-" +"time defect-prediction literature: Kamei et al., [_A Large-Scale Empirical " +"Study of Just-in-Time Quality Assurance_](https://doi.org/10.1109/" +"TSE.2013.2386), IEEE TSE 2013, with the open replications [Commit Guru]" +"(https://doi.org/10.1145/2786805.2803183) (FSE 2015) and McIntosh & Kamei, " +"[_Are Fix-Inducing Changes a Moving Target?_](https://doi.org/10.1109/" "TSE.2017.2693980) (IEEE TSE 2018)." -msgstr "ここまでの機能がリファレンス時点の「ファイル」をランク付けするのに対し、`bca vcs commit ` は単一の「コミット」の欠陥誘発リスクをスコアリングします — これは CI ゲートがチェックイン時にレビューする単位です。(このサブコマンドは 2.0 で `bca vcs jit` から改名されました。旧称の `jit` は 1 リリースサイクルの間、隠しエイリアスとして引き続き動作します。「ジャストインタイム(JIT)」は以下でも文献上の用語として残ります。)これは静的なルールベースのスコアラーで(学習済みモデルを使わないため、プロジェクトが古くなっても何もドリフトしません)、特徴量グループと符号はジャストインタイム欠陥予測の文献から採られています:Kamei et al., [_A Large-Scale Empirical Study of Just-in-Time Quality Assurance_](https://doi.org/10.1109/TSE.2013.2386), IEEE TSE 2013、およびそのオープンな追試である [Commit Guru](https://doi.org/10.1145/2786805.2803183)(FSE 2015)と McIntosh & Kamei, [_Are Fix-Inducing Changes a Moving Target?_](https://doi.org/10.1109/TSE.2017.2693980)(IEEE TSE 2018)です。" +msgstr "" +"ここまでの機能がリファレンス時点の「ファイル」をランク付けするのに対し、" +"`bca vcs commit ` は単一の「コミット」の欠陥誘発リスクをスコアリング" +"します — これは CI ゲートがチェックイン時にレビューする単位です。(このサブ" +"コマンドは 2.0 で `bca vcs jit` から改名されました。旧称の `jit` は 1 リリー" +"スサイクルの間、隠しエイリアスとして引き続き動作します。「ジャストインタイム" +"(JIT)」は以下でも文献上の用語として残ります。)これは静的なルールベースの" +"スコアラーで(学習済みモデルを使わないため、プロジェクトが古くなっても何もド" +"リフトしません)、特徴量グループと符号はジャストインタイム欠陥予測の文献から" +"採られています:Kamei et al., [_A Large-Scale Empirical Study of Just-in-" +"Time Quality Assurance_](https://doi.org/10.1109/TSE.2013.2386), IEEE TSE " +"2013、およびそのオープンな追試である [Commit Guru](https://doi." +"org/10.1145/2786805.2803183)(FSE 2015)と McIntosh & Kamei, [_Are Fix-" +"Inducing Changes a Moving Target?_](https://doi.org/10.1109/" +"TSE.2017.2693980)(IEEE TSE 2018)です。" #: src/commands/vcs.md:339 msgid "" @@ -6506,9 +6736,12 @@ msgstr "個別のサブシステム数とディレクトリ数、コミット内 #: src/commands/vcs.md:372 msgid "" "the touched files' priors — prior changes, distinct authors, bug- and " -"security-fix counts, and the composite [`risk_score`](#composite-risk-score) " -"— measured from history _before_ the commit" -msgstr "変更対象ファイルの事前値 — 過去の変更回数、個別の作者数、バグ修正・セキュリティ修正の回数、および複合 [`risk_score`](#composite-risk-score) — をコミット「以前」の履歴から測定" +"security-fix counts, and the composite [`risk_score`](#composite-risk-" +"score) — measured from history _before_ the commit" +msgstr "" +"変更対象ファイルの事前値 — 過去の変更回数、個別の作者数、バグ修正・セキュリ" +"ティ修正の回数、および複合 [`risk_score`](#composite-risk-score) — をコミッ" +"ト「以前」の履歴から測定" #: src/commands/vcs.md:372 msgid "turbulent file history ⇒ riskier" @@ -6527,7 +6760,14 @@ msgid "" "distribution, but do not read the magnitude as a probability. Any formula " "change bumps `jit_score_version` (separate from the file-level " "`risk_score_version`)." -msgstr "`contributions` ブロックは、順序尺度である `risk_score` への各グループの符号付き寄与を報告するため、コミットが「なぜ」その順位になったのかを利用側が確認できます。ファイルレベルの `risk_score` と同様、このスコアは**順序尺度**です。スコアでコミットをランク付けしたり、リポジトリ自身の分布とコミットを比較したりできますが、その大きさを確率として読み取らないでください。計算式が変更されると `jit_score_version` が上がります(ファイルレベルの `risk_score_version` とは別です)。" +msgstr "" +"`contributions` ブロックは、順序尺度である `risk_score` への各グループの符号" +"付き寄与を報告するため、コミットが「なぜ」その順位になったのかを利用側が確認" +"できます。ファイルレベルの `risk_score` と同様、このスコアは**順序尺度**で" +"す。スコアでコミットをランク付けしたり、リポジトリ自身の分布とコミットを比較" +"したりできますが、その大きさを確率として読み取らないでください。計算式が変更" +"されると `jit_score_version` が上がります(ファイルレベルの " +"`risk_score_version` とは別です)。" #: src/commands/vcs.md:383 msgid "" @@ -6537,18 +6777,18 @@ msgid "" "construction — the score then leans on size and author experience, exactly " "as the literature prescribes for changes with no file history." msgstr "" -"コミットは**第一親**に対してスコアリングされます。*「マージ」*コミットにはフラ" -"グが立てられ(`is_merge`、`parent_count ≥ 2`)、その第一親に対してスコアリン" -"グされます。**ルート**コミットと**新規ファイル**は、構造上、事前値がゼロにな" -"ります — その場合スコアはサイズと作者の経験に依存します。これはファイル履歴の" -"ない変更に対して文献が定めるとおりの挙動です。" +"コミットは**第一親**に対してスコアリングされます。*「マージ」*コミットにはフ" +"ラグが立てられ(`is_merge`、`parent_count ≥ 2`)、その第一親に対してスコアリ" +"ングされます。**ルート**コミットと**新規ファイル**は、構造上、事前値がゼロに" +"なります — その場合スコアはサイズと作者の経験に依存します。これはファイル履" +"歴のない変更に対して文献が定めるとおりの挙動です。" #: src/commands/vcs.md:389 msgid "" -"The window / `--ref` / bot / merge / rename flags are shared with the parent " -"`bca vcs` command; the commit-only flags are the positional `` " -"(default `HEAD`), `--format json|yaml|toml|cbor` (default `json`), `--" -"output`, `--pretty`, and:" +"The window / `--ref` / bot / merge / rename flags are shared with the " +"parent `bca vcs` command; the commit-only flags are the positional " +"`` (default `HEAD`), `--format json|yaml|toml|cbor` (default " +"`json`), `--output`, `--pretty`, and:" msgstr "" "ウィンドウ / `--ref` / ボット / マージ / リネームの各フラグは親コマンドの " "`bca vcs` と共有されます。commit 専用のフラグは、位置引数の ``(デ" @@ -6568,9 +6808,9 @@ msgid "" "distribution rather than treating it as an absolute." msgstr "" "`--fail-above` は終了コード `2` を使用します(`bca check` と同じ「メトリクス" -"ゲート」の慣例です。終了コード `1` はツールエラー用に予約されたままです)。ス" -"コアは順序尺度なので、しきい値は絶対値として扱うのではなく、リポジトリ自身の" -"コミットスコア分布に対して調整してください。" +"ゲート」の慣例です。終了コード `1` はツールエラー用に予約されたままです)。" +"スコアは順序尺度なので、しきい値は絶対値として扱うのではなく、リポジトリ自身" +"のコミットスコア分布に対して調整してください。" #: src/commands/vcs.md:404 msgid "Scoring an arbitrary diff (`--diff`)" @@ -6583,10 +6823,10 @@ msgid "" "or a code-review bot, where the change exists only as a diff and has not " "been committed yet." msgstr "" -"`bca vcs commit --diff ` はコミットの代わりに `git diff` をスコアリング" -"します(標準入力から diff を読むには `--diff -` を使用します)。変更がまだコ" -"ミットされておらず diff としてのみ存在する pre-commit フックやコードレビュー" -"ボットで便利です。" +"`bca vcs commit --diff ` はコミットの代わりに `git diff` をスコアリン" +"グします(標準入力から diff を読むには `--diff -` を使用します)。変更がまだ" +"コミットされておらず diff としてのみ存在する pre-commit フックやコードレ" +"ビューボットで便利です。" #: src/commands/vcs.md:415 msgid "" @@ -6598,18 +6838,21 @@ msgid "" "two-way `git diff` instead." msgstr "" "入力は、`git diff` や `git format-patch` が生成する、`diff --git` ファイル" -"ヘッダーを持つ **git 形式**の unified diff でなければなりません。素の `diff -" -"u` / `diff -ru` の出力(`---`/`+++` ヘッダー行はあるが `diff --git` ヘッダー" -"がないもの)は 0 ファイルとしてパースされ、combined / マージ diff(`@@@` ハン" -"クヘッダーを持つ `git diff --cc`)は不正な diff として拒否されます — 代わりに" -"通常の 2-way `git diff` をパイプしてください。" +"ヘッダーを持つ **git 形式**の unified diff でなければなりません。素の `diff " +"-u` / `diff -ru` の出力(`---`/`+++` ヘッダー行はあるが `diff --git` ヘッ" +"ダーがないもの)は 0 ファイルとしてパースされ、combined / マージ diff" +"(`@@@` ハンクヘッダーを持つ `git diff --cc`)は不正な diff として拒否されま" +"す — 代わりに通常の 2-way `git diff` をパイプしてください。" #: src/commands/vcs.md:422 msgid "" "A bare diff carries **no author, parent, or file history**, so only the " "**size** and **diffusion** groups are computable. The output is therefore a " "deliberately _partial_ report — a distinct shape from a commit report:" -msgstr "素の diff には**作者・親・ファイル履歴の情報が一切ない**ため、計算できるのは **size**と**diffusion** のグループだけです。したがって出力は意図的に「部分的な」レポートであり、コミットレポートとは異なる形をしています:" +msgstr "" +"素の diff には**作者・親・ファイル履歴の情報が一切ない**ため、計算できるの" +"は **size**と**diffusion** のグループだけです。したがって出力は意図的に「部" +"分的な」レポートであり、コミットレポートとは異なる形をしています:" #: src/commands/vcs.md:426 msgid "" @@ -6648,31 +6891,46 @@ msgid "" "The `source` field is a permanent `\"diff\"` marker, and the history / " "experience / purpose groups are **absent from the report entirely** — _not_ " "present as zero. Zero is a real value (a commit genuinely with no prior " -"history scores those groups at zero); an absent group means \"unavailable\", " -"so a consumer can never mistake an unscored group for \"low risk\". For the " -"same reason the score field is named `partial_risk_score`, not `risk_score`." -msgstr "`source` フィールドは恒久的な `\"diff\"` マーカーであり、history / experience / purpose の各グループは**レポートから完全に欠落**します — ゼロとして現れるのでは「ありません」。ゼロは実際の値です(本当に事前履歴のないコミットは、これらのグループをゼロとしてスコアリングします)。欠落したグループは「利用不可」を意味するため、利用側がスコアリングされていないグループを「低リスク」と取り違えることはありません。同じ理由で、スコアのフィールド名は `risk_score` ではなく `partial_risk_score` です。" +"history scores those groups at zero); an absent group means " +"\"unavailable\", so a consumer can never mistake an unscored group for " +"\"low risk\". For the same reason the score field is named " +"`partial_risk_score`, not `risk_score`." +msgstr "" +"`source` フィールドは恒久的な `\"diff\"` マーカーであり、history / " +"experience / purpose の各グループは**レポートから完全に欠落**します — ゼロと" +"して現れるのでは「ありません」。ゼロは実際の値です(本当に事前履歴のないコ" +"ミットは、これらのグループをゼロとしてスコアリングします)。欠落したグループ" +"は「利用不可」を意味するため、利用側がスコアリングされていないグループを「低" +"リスク」と取り違えることはありません。同じ理由で、スコアのフィールド名は " +"`risk_score` ではなく `partial_risk_score` です。" #: src/commands/vcs.md:448 msgid "" -"**A diff-only score is not comparable to a commit score.** The partial score " -"sums only size + diffusion, so it is always lower than the full commit score " -"for the same change (which also folds in history, experience, and purpose). " -"Rank diffs against _other diffs_, never against commit scores. `--diff` and " -"the positional `` are mutually exclusive; `--fail-above` works in " -"both modes (calibrate the diff-mode threshold against your own diff-score " -"distribution)." -msgstr "**diff のみのスコアはコミットスコアと比較できません。** 部分スコアは size + diffusion のみを合計するため、同じ変更に対する完全なコミットスコア(history、experience、purpose も織り込まれます)より常に低くなります。diff は「他の diff」 に対してランク付けし、決してコミットスコアと比較しないでください。`--diff` と位置引数の `` は同時に指定できません。`--fail-above` は両方のモードで機能します(diff モードのしきい値は自身の diff スコア分布に対して調整してください)。" +"**A diff-only score is not comparable to a commit score.** The partial " +"score sums only size + diffusion, so it is always lower than the full " +"commit score for the same change (which also folds in history, experience, " +"and purpose). Rank diffs against _other diffs_, never against commit " +"scores. `--diff` and the positional `` are mutually exclusive; `--" +"fail-above` works in both modes (calibrate the diff-mode threshold against " +"your own diff-score distribution)." +msgstr "" +"**diff のみのスコアはコミットスコアと比較できません。** 部分スコアは size + " +"diffusion のみを合計するため、同じ変更に対する完全なコミットスコア" +"(history、experience、purpose も織り込まれます)より常に低くなります。diff " +"は「他の diff」 に対してランク付けし、決してコミットスコアと比較しないでくだ" +"さい。`--diff` と位置引数の `` は同時に指定できません。`--fail-" +"above` は両方のモードで機能します(diff モードのしきい値は自身の diff スコア" +"分布に対して調整してください)。" #: src/commands/vcs.md:456 msgid "" "The parser understands git's default C-style path quoting (`core." "quotePath=true`), so a diff touching a file with a non-ASCII or spaced name " -"(which git emits as `\"a/na\\303\\257ve.txt\"`) is grouped under its decoded " -"path in the diffusion features, not the raw quoted string." +"(which git emits as `\"a/na\\303\\257ve.txt\"`) is grouped under its " +"decoded path in the diffusion features, not the raw quoted string." msgstr "" -"パーサーは git のデフォルトである C 形式のパス引用(`core.quotePath=true`)を" -"理解するため、非 ASCII 文字や空白を含む名前のファイル(git は `\"a/" +"パーサーは git のデフォルトである C 形式のパス引用(`core.quotePath=true`)" +"を理解するため、非 ASCII 文字や空白を含む名前のファイル(git は `\"a/" "na\\303\\257ve.txt\"` のように出力します)に触れる diff は、diffusion の特徴" "量では引用付きの生文字列ではなく、デコードされたパスの下にグループ化されま" "す。" @@ -6692,15 +6950,15 @@ msgid "" "partial diff report. See [Driving the REST API](../recipes/rest-api.md)." msgstr "" "**REST:** `POST /v1/vcs/jit` に `{ \"id\", \"repo_path\", \"commit\" }` を渡" -"すとコミットの `JitReport` JSON が返り、`{ \"id\", \"diff\" }` を渡すと部分的" -"な diff レポートが返ります。[REST API の利用](../recipes/rest-api.md)を参照し" -"てください。" +"すとコミットの `JitReport` JSON が返り、`{ \"id\", \"diff\" }` を渡すと部分" +"的な diff レポートが返ります。[REST API の利用](../recipes/rest-api.md)を参" +"照してください。" #: src/commands/vcs.md:468 msgid "" -"**Python:** `vcs.commit(repo_path, commit=...)` returns the commit report as " -"a `dict`, and `vcs.score_diff(diff)` the partial diff report. See [Change-" -"history (VCS) metrics](../python/vcs.md)." +"**Python:** `vcs.commit(repo_path, commit=...)` returns the commit report " +"as a `dict`, and `vcs.score_diff(diff)` the partial diff report. See " +"[Change-history (VCS) metrics](../python/vcs.md)." msgstr "" "**Python:** `vcs.commit(repo_path, commit=...)` はコミットレポートを `dict` " "として返し、`vcs.score_diff(diff)` は部分的な diff レポートを返します。[変更" @@ -6720,9 +6978,13 @@ msgstr "履歴トレンド(時系列)" msgid "" "A single `bca vcs` run answers _\"what is risky now.\"_ `bca vcs trend` " "answers _\"is it getting better or worse\"_ — the actionable question for a " -"technical-debt programme — by sampling the metrics at several points in time " -"and emitting a per-file time series." -msgstr "単発の `bca vcs` 実行は *「いま何がリスキーか」* に答えます。`bca vcs trend` は、複数の時点でメトリクスをサンプリングしてファイルごとの時系列を出力することで、_「良くなっているのか悪くなっているのか」_ — 技術的負債プログラムにとって行動につながる問い — に答えます。" +"technical-debt programme — by sampling the metrics at several points in " +"time and emitting a per-file time series." +msgstr "" +"単発の `bca vcs` 実行は *「いま何がリスキーか」* に答えます。`bca vcs " +"trend` は、複数の時点でメトリクスをサンプリングしてファイルごとの時系列を出" +"力することで、_「良くなっているのか悪くなっているのか」_ — 技術的負債プログ" +"ラムにとって行動につながる問い — に答えます。" #: src/commands/vcs.md:481 msgid "" @@ -6783,32 +7045,32 @@ msgid "" "`--points N` evenly-spaced samples (inclusive of both endpoints) cover `--" "span DURATION`, ending at `--as-of` (or wall-clock now). `as_of_points` " "lists the sample timestamps oldest-first; every file's array aligns to it " -"1:1, with a `null` element marking a point where the file did not exist yet. " -"`deltas` ranks the files whose `risk_score` fell the most (`improved`) and " -"rose the most (`regressed`) between each file's earliest and latest present " -"points; `--top-deltas` trims each list." +"1:1, with a `null` element marking a point where the file did not exist " +"yet. `deltas` ranks the files whose `risk_score` fell the most (`improved`) " +"and rose the most (`regressed`) between each file's earliest and latest " +"present points; `--top-deltas` trims each list." msgstr "" "`--points N` 個の等間隔サンプル(両端点を含む)が `--span DURATION` をカバー" "し、`--as-of`(指定がなければ現在時刻)で終わります。`as_of_points` はサンプ" "ルのタイムスタンプを古い順に列挙し、各ファイルの配列はそれと 1:1 で対応しま" "す。`null` 要素は、その時点でファイルがまだ存在しなかったことを示します。" -"`deltas` は、各ファイルの最初と最後に存在した時点の間で `risk_score` が最も下" -"がったファイル(`improved`)と最も上がったファイル(`regressed`)をランク付け" -"します。`--top-deltas` で各リストを切り詰められます。" +"`deltas` は、各ファイルの最初と最後に存在した時点の間で `risk_score` が最も" +"下がったファイル(`improved`)と最も上がったファイル(`regressed`)をランク" +"付けします。`--top-deltas` で各リストを切り詰められます。" #: src/commands/vcs.md:513 msgid "" "Crucially, each point **re-anchors at the mainline tip that existed at or " "before that moment** — it does not just re-window today's `HEAD` tree. That " "is what makes a file born later show as `null` at older points (rather than " -"leaking its present-day metrics backwards). Files kept in the series are the " -"`--top` highest-risk by their most-recent sample." +"leaking its present-day metrics backwards). Files kept in the series are " +"the `--top` highest-risk by their most-recent sample." msgstr "" "重要なのは、各時点が**その瞬間かそれ以前に存在したメインラインの先端に再アン" -"カーする**ことです — 今日の `HEAD` ツリーのウィンドウを引き直すだけではありま" -"せん。これにより、後から生まれたファイルは古い時点で `null` として表示されま" -"す(現在のメトリクスが過去に漏れ出すことはありません)。系列に残されるファイ" -"ルは、最新サンプルの時点でリスクが最も高い `--top` 件です。" +"カーする**ことです — 今日の `HEAD` ツリーのウィンドウを引き直すだけではあり" +"ません。これにより、後から生まれたファイルは古い時点で `null` として表示され" +"ます(現在のメトリクスが過去に漏れ出すことはありません)。系列に残されるファ" +"イルは、最新サンプルの時点でリスクが最も高い `--top` 件です。" #: src/commands/vcs.md:519 msgid "" @@ -6823,10 +7085,10 @@ msgstr "" "親コマンド `bca vcs` から再利用されるフラグ:ウィンドウ(`--long-window` / " "`--recent-window`)、`--ref`、`--file-types`、ボット / マージ / リネームのト" "グル、`--as-of`(最新のアンカー)、および `--top`。`-O` は `json`(デフォル" -"ト)、`yaml`、`cbor` を受け付けます。存在しない時点は `null` としてシリアライ" -"ズされ、TOML はこれを表現できないため、TOML は除外されています。時点数は、深" -"い履歴でも時点ごとの履歴走査が扱いきれる範囲に収まるよう、2–120 に制限されて" -"います。" +"ト)、`yaml`、`cbor` を受け付けます。存在しない時点は `null` としてシリアラ" +"イズされ、TOML はこれを表現できないため、TOML は除外されています。時点数は、" +"深い履歴でも時点ごとの履歴走査が扱いきれる範囲に収まるよう、2–120 に制限され" +"ています。" #: src/commands/vcs.md:526 msgid "" @@ -6834,7 +7096,11 @@ msgid "" "file renamed _between_ two samples appears as two separate path series (its " "old name, then its new name) rather than one continuous line. Cross-sample " "rename stitching is a deferred follow-up." -msgstr "**リネームに関する注意。** リネームは各サンプルの走査「内」では追跡されますが、2 つのサンプルの「間」でリネームされたファイルは、1 本の連続した線ではなく、2 つの別々のパス系列(旧名、次に新名)として現れます。サンプル間のリネームの縫合は後回しのフォローアップです。" +msgstr "" +"**リネームに関する注意。** リネームは各サンプルの走査「内」では追跡されます" +"が、2 つのサンプルの「間」でリネームされたファイルは、1 本の連続した線ではな" +"く、2 つの別々のパス系列(旧名、次に新名)として現れます。サンプル間のリネー" +"ムの縫合は後回しのフォローアップです。" #: src/commands/vcs.md:531 msgid "Bus factor (directory & repo level)" @@ -6848,7 +7114,13 @@ msgid "" "than half of a directory's files without a knowledgeable maintainer. `bca " "vcs` emits it as a top-level `vcs_aggregate` object alongside the ranked " "`files`:" -msgstr "ファイルごとの `ownership_top_share` がファイル「内」の集中度を測るのに対し、**バスファクター**(別名トラックファクター)は「ファイル集合をまたいで」集中度を測ります。すなわち、その離脱によってディレクトリ内のファイルの半数超が精通した保守者を失うことになる、最小の開発者数です。`bca vcs` はこれを、ランク付けされた `files` と並ぶトップレベルの `vcs_aggregate` オブジェクトとして出力します:" +msgstr "" +"ファイルごとの `ownership_top_share` がファイル「内」の集中度を測るのに対" +"し、**バスファクター**(別名トラックファクター)は「ファイル集合をまたいで」" +"集中度を測ります。すなわち、その離脱によってディレクトリ内のファイルの半数超" +"が精通した保守者を失うことになる、最小の開発者数です。`bca vcs` はこれを、ラ" +"ンク付けされた `files` と並ぶトップレベルの `vcs_aggregate` オブジェクトとし" +"て出力します:" #: src/commands/vcs.md:540 msgid "" @@ -6893,8 +7165,8 @@ msgstr "" #: src/commands/vcs.md:557 msgid "" "Each developer's authorship of each file is scored with the Avelino _Degree-" -"of-Authorship_ heuristic (Avelino, Passos, Hora & Valente, _A Novel Approach " -"for Estimating Truck Factors_, ICPC 2016):" +"of-Authorship_ heuristic (Avelino, Passos, Hora & Valente, _A Novel " +"Approach for Estimating Truck Factors_, ICPC 2016):" msgstr "" "各開発者の各ファイルに対する作者性は、Avelino の _Degree-of-Authorship_ " "ヒューリスティック(Avelino, Passos, Hora & Valente, _A Novel Approach for " @@ -6909,9 +7181,19 @@ msgid "" "factor is then a greedy removal: drop the developer who authors the most " "still-covered files, repeat until more than `--bus-factor-threshold` " "(default `0.5`, per Avelino) of the files are orphaned, and report how many " -"were removed. `by_directory` covers each top-level directory and each of its " -"immediate subdirectories, computed over every file recursively beneath it." -msgstr "ここで `FA` は最初の作者性(`d` が `f` を作成したなら `1`)、`DL` は `d` の `f` への提供(変更)回数、`AC` は「他の」開発者による変更回数です。ファイルの最大値で正規化した DoA が `0.75`(論文のしきい値)を超えるとき、その開発者は `f` の**作者**とみなされます。トラックファクターは貪欲な除去で求めます。すなわち、まだカバーされているファイルを最も多く作者として持つ開発者を除去し、ファイルの `--bus-factor-threshold`(デフォルト `0.5`、Avelino に準拠)超が孤児になるまで繰り返し、除去した人数を報告します。`by_directory` は各トップレベルディレクトリとその直下のサブディレクトリをカバーし、それぞれ再帰的に配下のすべてのファイルに対して計算されます。" +"were removed. `by_directory` covers each top-level directory and each of " +"its immediate subdirectories, computed over every file recursively beneath " +"it." +msgstr "" +"ここで `FA` は最初の作者性(`d` が `f` を作成したなら `1`)、`DL` は `d` の " +"`f` への提供(変更)回数、`AC` は「他の」開発者による変更回数です。ファイル" +"の最大値で正規化した DoA が `0.75`(論文のしきい値)を超えるとき、その開発者" +"は `f` の**作者**とみなされます。トラックファクターは貪欲な除去で求めます。" +"すなわち、まだカバーされているファイルを最も多く作者として持つ開発者を除去" +"し、ファイルの `--bus-factor-threshold`(デフォルト `0.5`、Avelino に準拠)" +"超が孤児になるまで繰り返し、除去した人数を報告します。`by_directory` は各" +"トップレベルディレクトリとその直下のサブディレクトリをカバーし、それぞれ再帰" +"的に配下のすべてのファイルに対して計算されます。" #: src/commands/vcs.md:576 msgid "Caveats, by construction:" @@ -6925,14 +7207,15 @@ msgid "" "signal, not a guarantee." msgstr "" "大部分が単一作者のファイルからなるリポジトリ(またはディレクトリ)のバスファ" -"クターは `1` と報告されます — その 1 人の作者を失うと各ファイルが孤児になるか" -"らです。これはヒューリスティックが意図どおりに働いているのであってバグではあ" -"りません。この数値は保証ではなく計画のためのシグナルとして扱ってください。" +"クターは `1` と報告されます — その 1 人の作者を失うと各ファイルが孤児になる" +"からです。これはヒューリスティックが意図どおりに働いているのであってバグでは" +"ありません。この数値は保証ではなく計画のためのシグナルとして扱ってください。" #: src/commands/vcs.md:582 msgid "" "Bot identities are filtered (like the per-file signals), and files with no " -"in-window activity carry no authorship and are excluded from the denominator." +"in-window activity carry no authorship and are excluded from the " +"denominator." msgstr "" "ボットのアイデンティティは(ファイルごとのシグナルと同様に)フィルタリングさ" "れ、ウィンドウ内に活動のないファイルは作者性を持たず、分母から除外されます。" @@ -6941,34 +7224,44 @@ msgstr "" msgid "" "\"First authorship\" means the earliest commit _observed within the long " "window_, not necessarily a file's true creation." -msgstr "「最初の作者性」は「長期ウィンドウ内で観測された」最古のコミットを意味し、必ずしもファイルの真の作成を意味しません。" +msgstr "" +"「最初の作者性」は「長期ウィンドウ内で観測された」最古のコミットを意味し、必" +"ずしもファイルの真の作成を意味しません。" #: src/commands/vcs.md:588 msgid "" "The aggregate reflects the **whole repository within the file-type scope** " "(one history walk covers every in-scope file — by default the files-with-" -"metrics set, see [File-type scope](#file-type-scope) — so `--file-types all` " -"widens the bus factor to every tracked file). `--paths` / `--include` / `--" -"exclude` scope only the ranked per-file list, _not_ the bus factor. To focus " -"on a subsystem, read its entry in `by_directory` rather than filtering the " -"walk." -msgstr "この集約は**ファイル種別スコープ内のリポジトリ全体**を反映します(1 回の履歴走査がスコープ内のすべてのファイルをカバーします — デフォルトはメトリクスを持つファイルの集合で、[ファイル種別スコープ](#file-type-scope)を参照 — したがって `--file-types all` はバスファクターを追跡対象のすべてのファイルに広げます)。`--paths` / `--include` / `--exclude` はランク付けされたファイルごとのリストのみをスコープし、バスファクターには「適用されません」。サブシステムに注目したい場合は、走査をフィルタリングするのではなく `by_directory` の該当エントリを読んでください。" +"metrics set, see [File-type scope](#file-type-scope) — so `--file-types " +"all` widens the bus factor to every tracked file). `--paths` / `--" +"include` / `--exclude` scope only the ranked per-file list, _not_ the bus " +"factor. To focus on a subsystem, read its entry in `by_directory` rather " +"than filtering the walk." +msgstr "" +"この集約は**ファイル種別スコープ内のリポジトリ全体**を反映します(1 回の履歴" +"走査がスコープ内のすべてのファイルをカバーします — デフォルトはメトリクスを" +"持つファイルの集合で、[ファイル種別スコープ](#file-type-scope)を参照 — した" +"がって `--file-types all` はバスファクターを追跡対象のすべてのファイルに広げ" +"ます)。`--paths` / `--include` / `--exclude` はランク付けされたファイルごと" +"のリストのみをスコープし、バスファクターには「適用されません」。サブシステム" +"に注目したい場合は、走査をフィルタリングするのではなく `by_directory` の該当" +"エントリを読んでください。" #: src/commands/vcs.md:596 msgid "" "`--emit-author-details` adds a `key_author_ids` list to each group — the " "SHA-256-hashed identities of the removed key developers, in removal order " "(plaintext identities never leave the process). The aggregate is computed " -"only for the dedicated `bca vcs` / `bca report --vcs` reports and the REST / " -"Python endpoints; the per-file `bca metrics --vcs` injection path does not " -"pay for it." +"only for the dedicated `bca vcs` / `bca report --vcs` reports and the " +"REST / Python endpoints; the per-file `bca metrics --vcs` injection path " +"does not pay for it." msgstr "" -"`--emit-author-details` は各グループに `key_author_ids` リストを追加します — " -"除去されたキー開発者の SHA-256 ハッシュ化されたアイデンティティを、除去順に並" -"べたものです(平文のアイデンティティがプロセスの外に出ることはありません)。" -"この集約は専用の `bca vcs` / `bca report --vcs` レポートと REST / Python エン" -"ドポイントに対してのみ計算されます。ファイルごとの `bca metrics --vcs` 注入パ" -"スはこのコストを払いません。" +"`--emit-author-details` は各グループに `key_author_ids` リストを追加します " +"— 除去されたキー開発者の SHA-256 ハッシュ化されたアイデンティティを、除去順" +"に並べたものです(平文のアイデンティティがプロセスの外に出ることはありませ" +"ん)。この集約は専用の `bca vcs` / `bca report --vcs` レポートと REST / " +"Python エンドポイントに対してのみ計算されます。ファイルごとの `bca metrics " +"--vcs` 注入パスはこのコストを払いません。" #: src/commands/vcs.md:603 msgid "Author-detail privacy" @@ -6978,13 +7271,21 @@ msgstr "作者詳細のプライバシー" msgid "" "The `key_author_ids` digests are a **stable pseudonym, not anonymization**. " "Hashing keeps plaintext emails out of the report and the cache and deters " -"casual disclosure, but the hash is _not_ cryptographically irreversible. The " -"pre-image is an email — low-entropy and enumerable — and commit histories " -"are public, so anyone with a candidate set of emails can recover which " -"digest belongs to whom by hashing each candidate or with a precomputed " -"email→hash table. This is the same weakness that broke Gravatar's email " -"hashing." -msgstr "`key_author_ids` のダイジェストは**安定した仮名であり、匿名化ではありません**。ハッシュ化により平文のメールアドレスはレポートとキャッシュに含まれず、安易な漏洩は抑止されますが、このハッシュは暗号学的に不可逆では「ありません」。原像はメールアドレス — 低エントロピーで列挙可能 — であり、コミット履歴は公開されているため、候補となるメールアドレスの集合を持つ者なら誰でも、各候補をハッシュ化するか、事前計算されたメール→ハッシュのテーブルを使って、どのダイジェストが誰のものかを割り出せます。これは Gravatar のメールハッシュ化を破ったのと同じ弱点です。" +"casual disclosure, but the hash is _not_ cryptographically irreversible. " +"The pre-image is an email — low-entropy and enumerable — and commit " +"histories are public, so anyone with a candidate set of emails can recover " +"which digest belongs to whom by hashing each candidate or with a " +"precomputed email→hash table. This is the same weakness that broke " +"Gravatar's email hashing." +msgstr "" +"`key_author_ids` のダイジェストは**安定した仮名であり、匿名化ではありません" +"**。ハッシュ化により平文のメールアドレスはレポートとキャッシュに含まれず、安" +"易な漏洩は抑止されますが、このハッシュは暗号学的に不可逆では「ありません」。" +"原像はメールアドレス — 低エントロピーで列挙可能 — であり、コミット履歴は公開" +"されているため、候補となるメールアドレスの集合を持つ者なら誰でも、各候補を" +"ハッシュ化するか、事前計算されたメール→ハッシュのテーブルを使って、どのダイ" +"ジェストが誰のものかを割り出せます。これは Gravatar のメールハッシュ化を破っ" +"たのと同じ弱点です。" #: src/commands/vcs.md:614 msgid "" @@ -7005,33 +7306,33 @@ msgstr "強化モード:`--author-hash-key`" #: src/commands/vcs.md:621 msgid "" "For stronger resistance, pass a secret key with `--author-hash-key ` " -"(requires `--emit-author-details`). The emitted digests then become an `HMAC-" -"SHA256(key, SHA-256(email))` instead of a bare hash: an attacker without the " -"key can no longer hash a candidate email to recognise its digest, nor use a " -"precomputed email→hash table — both attacks need the secret key. Pick a high-" -"entropy key and keep it secret; anyone who learns it can re-run the " -"enumeration." -msgstr "" -"より強い耐性が必要な場合は、`--author-hash-key ` で秘密鍵を渡します(`--" -"emit-author-details` が必要です)。出力されるダイジェストは素のハッシュではな" -"く `HMAC-SHA256(key, SHA-256(email))` になります。鍵を持たない攻撃者は、候補" -"のメールアドレスをハッシュ化してダイジェストを見分けることも、事前計算された" -"メール→ハッシュのテーブルを使うこともできなくなります — どちらの攻撃にも秘密" -"鍵が必要です。高エントロピーの鍵を選び、秘密に保ってください。鍵を知った者は" -"誰でも列挙をやり直せます。" +"(requires `--emit-author-details`). The emitted digests then become an " +"`HMAC-SHA256(key, SHA-256(email))` instead of a bare hash: an attacker " +"without the key can no longer hash a candidate email to recognise its " +"digest, nor use a precomputed email→hash table — both attacks need the " +"secret key. Pick a high-entropy key and keep it secret; anyone who learns " +"it can re-run the enumeration." +msgstr "" +"より強い耐性が必要な場合は、`--author-hash-key ` で秘密鍵を渡します" +"(`--emit-author-details` が必要です)。出力されるダイジェストは素のハッシュ" +"ではなく `HMAC-SHA256(key, SHA-256(email))` になります。鍵を持たない攻撃者" +"は、候補のメールアドレスをハッシュ化してダイジェストを見分けることも、事前計" +"算されたメール→ハッシュのテーブルを使うこともできなくなります — どちらの攻撃" +"にも秘密鍵が必要です。高エントロピーの鍵を選び、秘密に保ってください。鍵を" +"知った者は誰でも列挙をやり直せます。" #: src/commands/vcs.md:629 msgid "" "The key is **stable**: the same key yields the same digests across every " -"report and across a persistent-cache replay, so cross-report correlation and " -"the cache still work. Different keys produce unrelated digests, so two teams " -"sharing histories cannot cross-link authors unless they share the key." +"report and across a persistent-cache replay, so cross-report correlation " +"and the cache still work. Different keys produce unrelated digests, so two " +"teams sharing histories cannot cross-link authors unless they share the key." msgstr "" "鍵は**安定**しています。同じ鍵なら、すべてのレポートにわたって、また永続" "キャッシュのリプレイをまたいでも同じダイジェストが得られるため、レポート間の" "相関付けとキャッシュは引き続き機能します。異なる鍵は無関係なダイジェストを生" -"成するため、履歴を共有する 2 つのチームは、鍵を共有しない限り作者を相互にひも" -"付けることはできません。" +"成するため、履歴を共有する 2 つのチームは、鍵を共有しない限り作者を相互にひ" +"も付けることはできません。" #: src/commands/vcs.md:635 msgid "" @@ -7053,12 +7354,20 @@ msgid "" "What the key does **not** cover: the on-disk history cache (issue #334) " "deliberately stores the _unkeyed_ inner SHA-256 digest, because the key is " "applied at finalization so a cached walk can be re-finalized under any key " -"without re-walking. The cache is local-only and never published, but if your " -"threat model includes an attacker reading your local cache directory, " -"disable the cache (`--no-cache`) or clear it (`--clear-cache`). The same key " -"option is available on the REST endpoint (`author_hash_key`) and in Python " -"(`vcs.Options(author_hash_key=…)`)." -msgstr "鍵がカバー**しない**もの:ディスク上の履歴キャッシュ(issue #334)は意図的に「鍵なしの」内側の SHA-256 ダイジェストを保存します。鍵は確定処理の段階で適用されるため、キャッシュ済みの走査は再走査なしに任意の鍵で再確定できるからです。キャッシュはローカル限定で公開されることはありませんが、脅威モデルにローカルのキャッシュディレクトリを読む攻撃者が含まれる場合は、キャッシュを無効化(`--no-cache`)するかクリア(`--clear-cache`)してください。同じ鍵オプションは REST エンドポイント(`author_hash_key`)と Python(`vcs.Options(author_hash_key=…)`)でも利用できます。" +"without re-walking. The cache is local-only and never published, but if " +"your threat model includes an attacker reading your local cache directory, " +"disable the cache (`--no-cache`) or clear it (`--clear-cache`). The same " +"key option is available on the REST endpoint (`author_hash_key`) and in " +"Python (`vcs.Options(author_hash_key=…)`)." +msgstr "" +"鍵がカバー**しない**もの:ディスク上の履歴キャッシュ(issue #334)は意図的に" +"「鍵なしの」内側の SHA-256 ダイジェストを保存します。鍵は確定処理の段階で適" +"用されるため、キャッシュ済みの走査は再走査なしに任意の鍵で再確定できるからで" +"す。キャッシュはローカル限定で公開されることはありませんが、脅威モデルにロー" +"カルのキャッシュディレクトリを読む攻撃者が含まれる場合は、キャッシュを無効化" +"(`--no-cache`)するかクリア(`--clear-cache`)してください。同じ鍵オプショ" +"ンは REST エンドポイント(`author_hash_key`)と Python(`vcs." +"Options(author_hash_key=…)`)でも利用できます。" #: src/commands/vcs.md:654 msgid "Dogfooding in this repo" @@ -7068,25 +7377,25 @@ msgstr "このリポジトリでのドッグフーディング" msgid "" "This project runs `bca vcs` on its own source. `make vcs` prints the ranked " "table (path selection and the `.bcaignore` deny-set come from the repo-root " -"`bca.toml` manifest, the same config `make self-scan` and `make report` use; " -"`BCA_VCS_TOP` overrides the row cap). The manifest's `[vcs] file_types` key " -"sets the default scope (the `--file-types` CLI flag replaces it when given). " -"On every push to `main` the Pages CI job folds the rendered ranking into the " -"flagship report — `bca report html --vcs` / `report markdown --vcs` — so the " -"published [`reports/index.html`](https://dekobon.github.io/big-code-analysis/" -"reports/index.html) shows the change-history risk section side-by-side with " -"the AST hotspots, and additionally publishes the full top-100 ranking as " -"[`reports/vcs-report.json`](https://dekobon.github.io/big-code-analysis/" -"reports/vcs-report.json) for tooling." +"`bca.toml` manifest, the same config `make self-scan` and `make report` " +"use; `BCA_VCS_TOP` overrides the row cap). The manifest's `[vcs] " +"file_types` key sets the default scope (the `--file-types` CLI flag " +"replaces it when given). On every push to `main` the Pages CI job folds the " +"rendered ranking into the flagship report — `bca report html --vcs` / " +"`report markdown --vcs` — so the published [`reports/index.html`](https://" +"dekobon.github.io/big-code-analysis/reports/index.html) shows the change-" +"history risk section side-by-side with the AST hotspots, and additionally " +"publishes the full top-100 ranking as [`reports/vcs-report.json`](https://" +"dekobon.github.io/big-code-analysis/reports/vcs-report.json) for tooling." msgstr "" "このプロジェクトは自身のソースに対して `bca vcs` を実行しています。`make " "vcs` はランク付けされたテーブルを表示します(パス選択と `.bcaignore` の除外" "セットは、`make self-scan` と `make report` が使うのと同じ、リポジトリルート" "の `bca.toml` マニフェストから取得されます。`BCA_VCS_TOP` で行数の上限を上書" "きできます)。マニフェストの `[vcs] file_types` キーがデフォルトのスコープを" -"設定します(`--file-types` CLI フラグが指定された場合はそちらで置き換えられま" -"す)。`main` へのプッシュのたびに、Pages CI ジョブがレンダリング済みランキン" -"グをフラッグシップレポート — `bca report html --vcs` / `report markdown --" +"設定します(`--file-types` CLI フラグが指定された場合はそちらで置き換えられ" +"ます)。`main` へのプッシュのたびに、Pages CI ジョブがレンダリング済みランキ" +"ングをフラッグシップレポート — `bca report html --vcs` / `report markdown --" "vcs` — に織り込むため、公開される [`reports/index.html`](https://dekobon." "github.io/big-code-analysis/reports/index.html) には変更履歴リスクのセクショ" "ンが AST ホットスポットと並んで表示され、さらにツール向けに完全なトップ 100 " @@ -7099,10 +7408,11 @@ msgstr "REST と Python" #: src/commands/vcs.md:672 msgid "" -"**REST:** `POST /v1/vcs` with a JSON body `{ \"id\": \"...\", \"repo_path\": " -"\"/path/to/repo\", ... }` returns the ranked report, and `POST /v1/vcs/" -"trend` (same fields plus `points` / `span` / `top_deltas`) returns the " -"historical time series. See [Driving the REST API](../recipes/rest-api.md)." +"**REST:** `POST /v1/vcs` with a JSON body `{ \"id\": \"...\", " +"\"repo_path\": \"/path/to/repo\", ... }` returns the ranked report, and " +"`POST /v1/vcs/trend` (same fields plus `points` / `span` / `top_deltas`) " +"returns the historical time series. See [Driving the REST API](../recipes/" +"rest-api.md)." msgstr "" "**REST:** JSON ボディ `{ \"id\": \"...\", \"repo_path\": \"/path/to/" "repo\", ... }` を伴う `POST /v1/vcs` はランク付けされたレポートを返し、" @@ -7113,14 +7423,14 @@ msgstr "" #: src/commands/vcs.md:676 msgid "" "**Python:** [`big_code_analysis.vcs.rank(repo_path, …)`](../python/vcs.md) " -"returns the ranked report as a dict, `vcs.trend(repo_path, points=…, span=…, " -"…)` returns the time series, and `analyze(path, vcs=True)` attaches a `vcs` " -"block to a single file's metrics." +"returns the ranked report as a dict, `vcs.trend(repo_path, points=…, " +"span=…, …)` returns the time series, and `analyze(path, vcs=True)` attaches " +"a `vcs` block to a single file's metrics." msgstr "" -"**Python:** [`big_code_analysis.vcs.rank(repo_path, …)`](../python/vcs.md) は" -"ランク付けされたレポートを dict として返し、`vcs.trend(repo_path, points=…, " -"span=…, …)` は時系列を返します。また `analyze(path, vcs=True)` は単一ファイル" -"のメトリクスに `vcs` ブロックを付加します。" +"**Python:** [`big_code_analysis.vcs.rank(repo_path, …)`](../python/vcs.md) " +"はランク付けされたレポートを dict として返し、`vcs.trend(repo_path, " +"points=…, span=…, …)` は時系列を返します。また `analyze(path, vcs=True)` は" +"単一ファイルのメトリクスに `vcs` ブロックを付加します。" #: src/commands/vcs.md:681 msgid "" @@ -7138,8 +7448,8 @@ msgid "" "Both include the `vcs_aggregate` bus factor in the result and accept a " "`bus_factor_threshold` (in `(0, 1)`) to tune the coverage fraction." msgstr "" -"どちらも結果に `vcs_aggregate` のバスファクターを含み、カバレッジの割合を調整" -"する `bus_factor_threshold`(範囲は `(0, 1)`)を受け付けます。" +"どちらも結果に `vcs_aggregate` のバスファクターを含み、カバレッジの割合を調" +"整する `bus_factor_threshold`(範囲は `(0, 1)`)を受け付けます。" #: src/commands/report.md:3 msgid "" @@ -7147,9 +7457,9 @@ msgid "" "report across every file walked. It is designed for pasting into pull " "requests, wikis, or issue trackers." msgstr "" -"`bca report [--format ]` は、走査したすべてのファイルにわたる品質メト" -"リクスの集約レポートを生成します。プルリクエスト、wiki、課題トラッカーへの貼" -"り付けを想定して設計されています。" +"`bca report [--format ]` は、走査したすべてのファイルにわたる品質メ" +"トリクスの集約レポートを生成します。プルリクエスト、wiki、課題トラッカーへの" +"貼り付けを想定して設計されています。" #: src/commands/report.md:7 msgid "" @@ -7158,10 +7468,10 @@ msgid "" "report markdown`) still works as a deprecated alias and is slated for " "removal in the next major; prefer `--format`." msgstr "" -"フォーマットは `--format` / `-O` で選択します(`bca report --format html`)。" -"省略時のデフォルトは `markdown` です。素の位置引数形式(`bca report " -"markdown`)は非推奨のエイリアスとして引き続き動作しますが、次のメジャーバー" -"ジョンで削除される予定です。`--format` を使用してください。" +"フォーマットは `--format` / `-O` で選択します(`bca report --format " +"html`)。省略時のデフォルトは `markdown` です。素の位置引数形式(`bca " +"report markdown`)は非推奨のエイリアスとして引き続き動作しますが、次のメ" +"ジャーバージョンで削除される予定です。`--format` を使用してください。" #: src/commands/report.md:12 msgid "" @@ -7180,8 +7490,8 @@ msgid "" "sharing as a build artifact)." msgstr "" "利用できるフォーマットは 2 つです。`markdown`(プレーンテキストで、PR コメン" -"トに最適)と `html`(ソート可能なテーブルを備えた自己完結型ダッシュボードで、" -"ビルド成果物として共有するのに最適)です。" +"トに最適)と `html`(ソート可能なテーブルを備えた自己完結型ダッシュボード" +"で、ビルド成果物として共有するのに最適)です。" #: src/commands/report.md:20 msgid "" @@ -7201,7 +7511,9 @@ msgstr "ファイルに書き出し:" #: src/commands/report.md:37 msgid "**Note:** `--output` must be a _file_ path, not a directory." -msgstr "**注:** `--output` はディレクトリではなく「ファイル」パスでなければなりません。" +msgstr "" +"**注:** `--output` はディレクトリではなく「ファイル」パスでなければなりませ" +"ん。" #: src/commands/report.md:43 msgid "`--top N`" @@ -7237,7 +7549,8 @@ msgstr "_(オフ)_" #: src/commands/report.md:45 msgid "" -"Include functions silenced by in-source suppression markers (raw audit view)." +"Include functions silenced by in-source suppression markers (raw audit " +"view)." msgstr "" "ソース内の抑制マーカーで沈黙させられた関数を含めます(生の監査ビュー)。" @@ -7275,26 +7588,26 @@ msgstr "出力ファイル。親ディレクトリが存在している必要が #: src/commands/report.md:51 msgid "" "By default, `bca report markdown|html` **honours** in-source suppression " -"markers — the same `// bca: suppress`, `// bca: suppress-file`, and `#lizard " -"forgives` comments that [`bca check`](check.md) and the SARIF emitter " -"respect (see [Suppression](suppression.md)). A function is omitted from a " -"metric's hotspot table when that metric is suppressed for it, so the " +"markers — the same `// bca: suppress`, `// bca: suppress-file`, and " +"`#lizard forgives` comments that [`bca check`](check.md) and the SARIF " +"emitter respect (see [Suppression](suppression.md)). A function is omitted " +"from a metric's hotspot table when that metric is suppressed for it, so the " "published report agrees with the threshold gate instead of re-surfacing " "every silenced offender." msgstr "" -"デフォルトでは、`bca report markdown|html` はソース内の抑制マーカーを**尊重**" -"します — [`bca check`](check.md) と SARIF エミッターが尊重するのと同じ `// " -"bca: suppress`、`// bca: suppress-file`、`#lizard forgives` コメントです([抑" -"制](suppression.md)を参照)。あるメトリクスが抑制されている関数はそのメトリク" -"スのホットスポットテーブルから除外されるため、公開されるレポートは、沈黙済み" -"の違反をすべて再表示するのではなく、しきい値ゲートと一致します。" +"デフォルトでは、`bca report markdown|html` はソース内の抑制マーカーを**尊重" +"**します — [`bca check`](check.md) と SARIF エミッターが尊重するのと同じ " +"`// bca: suppress`、`// bca: suppress-file`、`#lizard forgives` コメントです" +"([抑制](suppression.md)を参照)。あるメトリクスが抑制されている関数はそのメ" +"トリクスのホットスポットテーブルから除外されるため、公開されるレポートは、沈" +"黙済みの違反をすべて再表示するのではなく、しきい値ゲートと一致します。" #: src/commands/report.md:59 msgid "" -"Suppression is per-metric: a `// bca: suppress(cyclomatic)` marker drops the " -"function from the Cyclomatic table only — it still appears in the Cognitive, " -"Halstead, and other tables. A bare `// bca: suppress` (or `// bca: suppress-" -"file`) covers every metric." +"Suppression is per-metric: a `// bca: suppress(cyclomatic)` marker drops " +"the function from the Cyclomatic table only — it still appears in the " +"Cognitive, Halstead, and other tables. A bare `// bca: suppress` (or `// " +"bca: suppress-file`) covers every metric." msgstr "" "抑制はメトリクス単位です。`// bca: suppress(cyclomatic)` マーカーは関数を " "Cyclomatic テーブルからのみ除外します — Cognitive、Halstead などのテーブルに" @@ -7307,17 +7620,17 @@ msgid "" "regardless of markers. The setting can also be pinned in the [`bca.toml` " "manifest](check.md):" msgstr "" -"マーカーに関係なくすべての違反を列挙する生の監査ビューには `--no-suppress` を" -"渡します。この設定は [`bca.toml` マニフェスト](check.md)に固定することもでき" -"ます:" +"マーカーに関係なくすべての違反を列挙する生の監査ビューには `--no-suppress` " +"を渡します。この設定は [`bca.toml` マニフェスト](check.md)に固定することもで" +"きます:" #: src/commands/report.md:73 msgid "" "The CLI flag wins; a bare `--no-suppress` can force the audit view on, but " "the manifest never forces it off." msgstr "" -"CLI フラグが優先されます。素の `--no-suppress` は監査ビューを強制的に有効化で" -"きますが、マニフェストがそれを強制的に無効化することはありません。" +"CLI フラグが優先されます。素の `--no-suppress` は監査ビューを強制的に有効化" +"できますが、マニフェストがそれを強制的に無効化することはありません。" #: src/commands/report.md:76 msgid "Examples" @@ -7353,47 +7666,52 @@ msgstr "" #: src/commands/report.md:108 msgid "" -"**Project summary** — files analyzed, languages, total SLOC / PLOC / comment " -"counts, function and class counts, comment ratio." +"**Project summary** — files analyzed, languages, total SLOC / PLOC / " +"comment counts, function and class counts, comment ratio." msgstr "" -"**プロジェクトサマリー** — 分析したファイル数、言語、SLOC / PLOC / コメントの" -"総数、関数数とクラス数、コメント比率。" +"**プロジェクトサマリー** — 分析したファイル数、言語、SLOC / PLOC / コメント" +"の総数、関数数とクラス数、コメント比率。" #: src/commands/report.md:110 msgid "" "**Per-language overview table** — one row per language with file count, " "SLOC, function count, the SLOC-weighted average Maintainability Index (MI), " -"average Cyclomatic Complexity (CC), and average Cognitive Complexity. The MI " -"average is size-weighted and uses the _unclamped_ Visual Studio value, so a " -"language whose files are mostly unmaintainable reads negative instead of " -"saturating at the 0 floor of the per-file `MI` column." +"average Cyclomatic Complexity (CC), and average Cognitive Complexity. The " +"MI average is size-weighted and uses the _unclamped_ Visual Studio value, " +"so a language whose files are mostly unmaintainable reads negative instead " +"of saturating at the 0 floor of the per-file `MI` column." msgstr "" -"**言語別概要テーブル** — 言語ごとに 1 行で、ファイル数、SLOC、関数数、SLOC 加" -"重平均の保守容易性指数(MI)、平均循環的複雑度(CC)、平均認知的複雑度を示し" -"ます。MI の平均はサイズ加重で、「クランプされていない」 Visual Studio の値を使" -"用するため、ファイルの大半が保守不能な言語は、ファイルごとの `MI` 列の下限 0 " -"で飽和するのではなく負の値として表示されます。" +"**言語別概要テーブル** — 言語ごとに 1 行で、ファイル数、SLOC、関数数、SLOC " +"加重平均の保守容易性指数(MI)、平均循環的複雑度(CC)、平均認知的複雑度を示" +"します。MI の平均はサイズ加重で、「クランプされていない」 Visual Studio の値" +"を使用するため、ファイルの大半が保守不能な言語は、ファイルごとの `MI` 列の下" +"限 0 で飽和するのではなく負の値として表示されます。" #: src/commands/report.md:117 msgid "" "**Per-language hotspot sections** (repeated for each language). Every " -"hotspot title follows one template, ` hotspots (top N by )` " -"— the truncation clause states the actual `--top` state (`top 20 by CC`, or " -"`all, by CC` for `--top 0`):" +"hotspot title follows one template, ` hotspots (top N by " +")` — the truncation clause states the actual `--top` state (`top 20 " +"by CC`, or `all, by CC` for `--top 0`):" msgstr "" "**言語別ホットスポットセクション**(言語ごとに繰り返されます)。すべてのホッ" -"トスポットのタイトルは ` hotspots (top N by )` という 1 つの" -"テンプレートに従い、切り詰め句は実際の `--top` の状態を示します(`top 20 by " -"CC`、`--top 0` の場合は `all, by CC`):" +"トスポットのタイトルは ` hotspots (top N by )` という 1 つ" +"のテンプレートに従い、切り詰め句は実際の `--top` の状態を示します(`top 20 " +"by CC`、`--top 0` の場合は `all, by CC`):" #: src/commands/report.md:121 msgid "" "_Summary_ — file count, SLOC, PLOC, comment ratio, and `Average MI (SLOC-" "weighted)` with a GOOD / MODERATE / LOW rating. The headline is the SLOC-" -"weighted mean of the _unclamped_ Visual Studio MI: large files dominate, and " -"a file whose displayed MI clamps to 0 still contributes its true (often " +"weighted mean of the _unclamped_ Visual Studio MI: large files dominate, " +"and a file whose displayed MI clamps to 0 still contributes its true (often " "negative) maintainability rather than a misleading 0." -msgstr "_Summary_ — ファイル数、SLOC、PLOC、コメント比率、および GOOD / MODERATE / LOW の評価付き `Average MI (SLOC-weighted)`。見出しの値は「クランプされていない」 Visual Studio MI の SLOC 加重平均です。大きなファイルが支配的になり、表示上の MI が 0 にクランプされるファイルも、誤解を招く 0 ではなく真の(多くの場合負の)保守性で寄与します。" +msgstr "" +"_Summary_ — ファイル数、SLOC、PLOC、コメント比率、および GOOD / MODERATE / " +"LOW の評価付き `Average MI (SLOC-weighted)`。見出しの値は「クランプされてい" +"ない」 Visual Studio MI の SLOC 加重平均です。大きなファイルが支配的になり、" +"表示上の MI が 0 にクランプされるファイルも、誤解を招く 0 ではなく真の(多く" +"の場合負の)保守性で寄与します。" #: src/commands/report.md:127 msgid "" @@ -7401,23 +7719,23 @@ msgid "" "default CC > 10, cognitive > 15, SLOC > 100, args > 3, Halstead bugs > 1; a " "manifest `[thresholds]` table overrides each cutoff). Emitted **first**, " "directly after the Summary and before any hotspot table, so a reader who " -"stops after a table or two still sees the highest-altitude counts. These are " -"**raw** counts that ignore suppression; the section is captioned to say so, " -"naming how many suppressed functions are folded in. When suppression empties " -"a hotspot table whose metric this summary still counts, the table is " -"replaced by a one-line \"table omitted: all N matching functions " +"stops after a table or two still sees the highest-altitude counts. These " +"are **raw** counts that ignore suppression; the section is captioned to say " +"so, naming how many suppressed functions are folded in. When suppression " +"empties a hotspot table whose metric this summary still counts, the table " +"is replaced by a one-line \"table omitted: all N matching functions " "suppressed\" note so a summary bullet never points at a missing table." msgstr "" -"_Actionable Summary_ — 一般的なしきい値を超える関数の数(デフォルトでは CC > " -"10、cognitive > 15、SLOC > 100、args > 3、Halstead bugs > 1。マニフェストの " -"`[thresholds]` テーブルで各カットオフを上書きできます)。Summary の直後、どの" -"ホットスポットテーブルよりも前に**最初に**出力されるため、テーブルを 1〜2 個" -"読んで止めた読者でも最も俯瞰的なカウントを目にできます。これらは抑制を無視し" -"た**生の**カウントです。セクションのキャプションにその旨が記され、抑制された" -"関数がいくつ含まれているかが明示されます。このサマリーがカウントしているメト" -"リクスのホットスポットテーブルが抑制によって空になった場合、そのテーブルは" -"「table omitted: all N matching functions suppressed」という 1 行の注記に置き" -"換えられ、サマリーの箇条書きが存在しないテーブルを指すことはありません。" +"_Actionable Summary_ — 一般的なしきい値を超える関数の数(デフォルトでは CC " +"> 10、cognitive > 15、SLOC > 100、args > 3、Halstead bugs > 1。マニフェスト" +"の `[thresholds]` テーブルで各カットオフを上書きできます)。Summary の直後、" +"どのホットスポットテーブルよりも前に**最初に**出力されるため、テーブルを 1〜" +"2 個読んで止めた読者でも最も俯瞰的なカウントを目にできます。これらは抑制を無" +"視した**生の**カウントです。セクションのキャプションにその旨が記され、抑制さ" +"れた関数がいくつ含まれているかが明示されます。このサマリーがカウントしている" +"メトリクスのホットスポットテーブルが抑制によって空になった場合、そのテーブル" +"は「table omitted: all N matching functions suppressed」という 1 行の注記に" +"置き換えられ、サマリーの箇条書きが存在しないテーブルを指すことはありません。" #: src/commands/report.md:139 msgid "" @@ -7429,8 +7747,9 @@ msgstr "" #: src/commands/report.md:141 msgid "" -"_Cyclomatic complexity hotspots (top N by CC)_ — functions sorted descending " -"by CC, with summary statistics (average, max, counts above 10 and 20)." +"_Cyclomatic complexity hotspots (top N by CC)_ — functions sorted " +"descending by CC, with summary statistics (average, max, counts above 10 " +"and 20)." msgstr "" "_Cyclomatic complexity hotspots (top N by CC)_ — CC の降順でソートされた関" "数。要約統計(平均、最大、10 超・20 超の件数)付き。" @@ -7450,17 +7769,17 @@ msgid "" "render as rounded integers with thousands separators (`8,845`); full " "precision lives in JSON/CSV." msgstr "" -"_Halstead effort hotspots (top N by Effort)_ — Halstead effort の降順でソート" -"された関数。volume と推定バグ数を含みます。Effort と Volume は千区切り付きの" -"丸め整数(`8,845`)として表示され、完全な精度は JSON/CSV に保持されます。" +"_Halstead effort hotspots (top N by Effort)_ — Halstead effort の降順でソー" +"トされた関数。volume と推定バグ数を含みます。Effort と Volume は千区切り付き" +"の丸め整数(`8,845`)として表示され、完全な精度は JSON/CSV に保持されます。" #: src/commands/report.md:150 msgid "" "_Function size hotspots (top N by SLOC)_ — functions sorted descending by " "source lines of code." msgstr "" -"_Function size hotspots (top N by SLOC)_ — ソースコード行数の降順でソートされ" -"た関数。" +"_Function size hotspots (top N by SLOC)_ — ソースコード行数の降順でソートさ" +"れた関数。" #: src/commands/report.md:152 msgid "" @@ -7472,10 +7791,10 @@ msgstr "" #: src/commands/report.md:154 msgid "" -"_Type hotspots (top N by WMC)_ — types sorted descending by Weighted Methods " -"per Class, with NOM, NPA, and NPM. \"Type\" covers all six kinds the report " -"counts: class, struct, trait, impl, interface, namespace (the legend's WMC " -"entry lists them)." +"_Type hotspots (top N by WMC)_ — types sorted descending by Weighted " +"Methods per Class, with NOM, NPA, and NPM. \"Type\" covers all six kinds " +"the report counts: class, struct, trait, impl, interface, namespace (the " +"legend's WMC entry lists them)." msgstr "" "_Type hotspots (top N by WMC)_ — Weighted Methods per Class の降順でソートさ" "れた型。NOM、NPA、NPM 付き。「Type」はレポートが数える 6 種類すべて(class、" @@ -7485,9 +7804,9 @@ msgstr "" #: src/commands/report.md:158 msgid "" "_Exit points hotspots (top N by Exits)_ — functions with more than two exit " -"points, sorted descending. A single `return` is the baseline, not a hotspot, " -"so the table admits only `nexits > 2`; when nothing clears the floor the " -"section is omitted." +"points, sorted descending. A single `return` is the baseline, not a " +"hotspot, so the table admits only `nexits > 2`; when nothing clears the " +"floor the section is omitted." msgstr "" "_Exit points hotspots (top N by Exits)_ — 出口点が 2 個を超える関数。降順で" "ソートされます。単一の `return` は基準であってホットスポットではないため、" @@ -7496,8 +7815,8 @@ msgstr "" #: src/commands/report.md:162 msgid "" -"_ABC magnitude hotspots (top N by ABC)_ — functions sorted descending by ABC " -"metric magnitude." +"_ABC magnitude hotspots (top N by ABC)_ — functions sorted descending by " +"ABC metric magnitude." msgstr "" "_ABC magnitude hotspots (top N by ABC)_ — ABC メトリクスの大きさの降順でソー" "トされた関数。" @@ -7518,8 +7837,8 @@ msgstr "" "Markdown レポートと HTML レポートは、1 つの基盤データモデルの 2 つのレンダリ" "ングであり、常に**同じデータ**を提示します。共有されるすべての数値(プロジェ" "クトおよび言語別のサマリー、ホットスポットテーブルのメンバーシップ、循環的複" -"雑度の Average / Max / CC > 10 注記のような各ホットスポットのキャプション)は" -"一度だけ計算されて両方でレンダリングされるため、1 回の実行で `--format " +"雑度の Average / Max / CC > 10 注記のような各ホットスポットのキャプション)" +"は一度だけ計算されて両方でレンダリングされるため、1 回の実行で `--format " "markdown` と `--format html` のどちらを出力しても同一の数値になります。" #: src/commands/report.md:174 @@ -7535,36 +7854,38 @@ msgid "" "shared column specs the tooltips use, so the two formats cannot drift." msgstr "" "どちらのフォーマットにも、すべてのメトリクス列の略語(`CC`、`MI`、`ABC`、" -"`WMC`、…)とグローバルヘッダーの統計(`PLOC`、`Comments`、`Comment ratio`)を" -"定義する**凡例**が含まれます — Markdown では `## Legend` セクション(最後の言" -"語の下に入れ子になるのではなく、独立したアウトラインエントリ)、HTML では展開" -"済みの(`
`)ブロックです。これにより、ホバーツールチップに加え" -"て、印刷・モバイル・スクリーンリーダーでも凡例が失われません。各エントリは[対" -"応メトリクス](../metrics.md)リファレンスの該当章にリンクしているため、1 行の" -"定義から完全な説明へ読者を案内できます。定義はツールチップが使うのと同じ共有" -"列仕様に由来するため、2 つのフォーマットが乖離することはありません。" +"`WMC`、…)とグローバルヘッダーの統計(`PLOC`、`Comments`、`Comment ratio`)" +"を定義する**凡例**が含まれます — Markdown では `## Legend` セクション(最後" +"の言語の下に入れ子になるのではなく、独立したアウトラインエントリ)、HTML で" +"は展開済みの(`
`)ブロックです。これにより、ホバーツールチップ" +"に加えて、印刷・モバイル・スクリーンリーダーでも凡例が失われません。各エント" +"リは[対応メトリクス](../metrics.md)リファレンスの該当章にリンクしているた" +"め、1 行の定義から完全な説明へ読者を案内できます。定義はツールチップが使うの" +"と同じ共有列仕様に由来するため、2 つのフォーマットが乖離することはありませ" +"ん。" #: src/commands/report.md:185 msgid "" "Both formats also close with a **provenance footer** stating the `bca` " "version, generation date, the seed paths scanned, the per-table `--top` " -"value, and whether suppression markers were honored — so a detached artifact " -"(a PR comment, a Pages deployment, a file on a ticket) records what it was " -"generated from. The date honors `SOURCE_DATE_EPOCH` for reproducible builds. " -"The HTML report additionally carries a `` tag and " -"wraps every table in a horizontal-scroll container so wide tables stay " -"reachable on mobile and narrow windows, and its table of contents nests each " -"language's hotspot subsections under a collapsible entry." +"value, and whether suppression markers were honored — so a detached " +"artifact (a PR comment, a Pages deployment, a file on a ticket) records " +"what it was generated from. The date honors `SOURCE_DATE_EPOCH` for " +"reproducible builds. The HTML report additionally carries a `` tag and wraps every table in a horizontal-scroll " +"container so wide tables stay reachable on mobile and narrow windows, and " +"its table of contents nests each language's hotspot subsections under a " +"collapsible entry." msgstr "" "どちらのフォーマットも、`bca` のバージョン、生成日、走査したシードパス、テー" -"ブルごとの `--top` 値、抑制マーカーを尊重したかどうかを記した**来歴フッター**" -"で締めくくられます — これにより、切り離された成果物(PR コメント、Pages デプ" -"ロイ、チケットに添付されたファイル)に、それが何から生成されたのかが記録され" -"ます。生成日は再現可能ビルドのために `SOURCE_DATE_EPOCH` を尊重します。HTML " -"レポートはさらに `` タグを持ち、すべてのテーブルを水" -"平スクロールコンテナで包むため、幅の広いテーブルもモバイルや狭いウィンドウで" -"閲覧可能なままです。また目次では、各言語のホットスポットのサブセクションが折" -"りたたみ可能なエントリの下に入れ子になります。" +"ブルごとの `--top` 値、抑制マーカーを尊重したかどうかを記した**来歴フッター" +"**で締めくくられます — これにより、切り離された成果物(PR コメント、Pages デ" +"プロイ、チケットに添付されたファイル)に、それが何から生成されたのかが記録さ" +"れます。生成日は再現可能ビルドのために `SOURCE_DATE_EPOCH` を尊重します。" +"HTML レポートはさらに `` タグを持ち、すべてのテーブ" +"ルを水平スクロールコンテナで包むため、幅の広いテーブルもモバイルや狭いウィン" +"ドウで閲覧可能なままです。また目次では、各言語のホットスポットのサブセクショ" +"ンが折りたたみ可能なエントリの下に入れ子になります。" #: src/commands/report.md:196 msgid "" @@ -7573,17 +7894,17 @@ msgid "" "baseline — is dropped from `bca check`'s offender formats (`code-climate`, " "`sarif`, `checkstyle`, `clang-warning`, `msvc-warning`) and from the " "matching report hotspot table alike. The CodeClimate, SARIF, and Checkstyle " -"documents are themselves three renderings of one offender set, so they agree " -"by construction; the reports honour the same per-metric suppression " +"documents are themselves three renderings of one offender set, so they " +"agree by construction; the reports honour the same per-metric suppression " "decisions." msgstr "" "抑制はレポートだけでなく**すべての**出力に一律に適用されます。あるメトリクス" "について — ソース内マーカーまたはベースラインにより — 沈黙させられた関数は、" "`bca check` の違反出力フォーマット(`code-climate`、`sarif`、`checkstyle`、" -"`clang-warning`、`msvc-warning`)からも、対応するレポートのホットスポットテー" -"ブルからも同様に除外されます。CodeClimate、SARIF、Checkstyle の各ドキュメント" -"自体が 1 つの違反集合の 3 つのレンダリングなので、構造上一致します。レポート" -"も同じメトリクス単位の抑制判断を尊重します。" +"`clang-warning`、`msvc-warning`)からも、対応するレポートのホットスポット" +"テーブルからも同様に除外されます。CodeClimate、SARIF、Checkstyle の各ドキュ" +"メント自体が 1 つの違反集合の 3 つのレンダリングなので、構造上一致します。レ" +"ポートも同じメトリクス単位の抑制判断を尊重します。" #: src/commands/report.md:205 msgid "" @@ -7594,17 +7915,17 @@ msgid "" "figure, including each hotspot table's caption, reflects the suppression-" "filtered set. To stop a reader mistaking the two populations for a double-" "count, each is captioned: the cyclomatic note adds \"(excluding suppressed " -"functions)\", and the Actionable Summary names the raw, suppression-ignoring " -"basis of its counts." +"functions)\", and the Actionable Summary names the raw, suppression-" +"ignoring basis of its counts." msgstr "" "唯一の意図的な例外は **Actionable Summary** です。これはコードベース全体の健" -"全性指標であり、抑制に関係なく生の測定値を意図的にカウントします — あるメトリ" -"クスのホットスポットテーブルで関数を沈黙させても、この集約された懸念カウント" -"からは消えません。各ホットスポットテーブルのキャプションを含む他のすべての数" -"値は、抑制でフィルタリングされた集合を反映します。読者が 2 つの母集団を二重カ" -"ウントと取り違えないよう、それぞれにキャプションが付きます。循環的複雑度の注" -"記には「(excluding suppressed functions)」が追加され、Actionable Summary はそ" -"のカウントが抑制を無視した生の値に基づくことを明示します。" +"全性指標であり、抑制に関係なく生の測定値を意図的にカウントします — あるメト" +"リクスのホットスポットテーブルで関数を沈黙させても、この集約された懸念カウン" +"トからは消えません。各ホットスポットテーブルのキャプションを含む他のすべての" +"数値は、抑制でフィルタリングされた集合を反映します。読者が 2 つの母集団を二" +"重カウントと取り違えないよう、それぞれにキャプションが付きます。循環的複雑度" +"の注記には「(excluding suppressed functions)」が追加され、Actionable " +"Summary はそのカウントが抑制を無視した生の値に基づくことを明示します。" #: src/commands/report.md:215 msgid "HTML format" @@ -7615,13 +7936,13 @@ msgid "" "`bca report html` emits a single self-contained HTML page covering the same " "sections as the Markdown report. It is designed to be served as a static " "artifact: inline CSS, inline vanilla JavaScript for click-to-sort on every " -"hotspot table, and zero external dependencies (no CDN, no fonts, no template " -"engine). The page renders identically offline." +"hotspot table, and zero external dependencies (no CDN, no fonts, no " +"template engine). The page renders identically offline." msgstr "" -"`bca report html` は、Markdown レポートと同じセクションをカバーする単一の自己" -"完結型 HTML ページを出力します。静的成果物として配信することを想定した設計で" -"す。インライン CSS、すべてのホットスポットテーブルをクリックでソートするため" -"のインラインのプレーンな JavaScript を備え、外部依存はゼロです(CDN なし、" +"`bca report html` は、Markdown レポートと同じセクションをカバーする単一の自" +"己完結型 HTML ページを出力します。静的成果物として配信することを想定した設計" +"です。インライン CSS、すべてのホットスポットテーブルをクリックでソートするた" +"めのインラインのプレーンな JavaScript を備え、外部依存はゼロです(CDN なし、" "フォントなし、テンプレートエンジンなし)。ページはオフラインでも同一にレンダ" "リングされます。" @@ -7645,30 +7966,30 @@ msgstr "" #: src/commands/report.md:235 msgid "" "Hover (or keyboard-focus, where the browser supports it) any metric column " -"header — `SLOC`, `MI`, `CC`, `ABC`, `WMC`, `NPA`, `NPM`, `Exits`, etc. — for " -"a one-sentence plain-English explanation of the metric. The tooltip is " +"header — `SLOC`, `MI`, `CC`, `ABC`, `WMC`, `NPA`, `NPM`, `Exits`, etc. — " +"for a one-sentence plain-English explanation of the metric. The tooltip is " "delivered through the native HTML `title` attribute, so it works offline " "with no JavaScript." msgstr "" -"任意のメトリクス列ヘッダー — `SLOC`、`MI`、`CC`、`ABC`、`WMC`、`NPA`、`NPM`、" -"`Exits` など — にホバー(ブラウザが対応していればキーボードフォーカスでも可)" -"すると、そのメトリクスの平易な英語による 1 文の説明が表示されます。ツールチッ" -"プはネイティブの HTML `title` 属性で提供されるため、JavaScript なしでもオフラ" -"インで機能します。" +"任意のメトリクス列ヘッダー — `SLOC`、`MI`、`CC`、`ABC`、`WMC`、`NPA`、" +"`NPM`、`Exits` など — にホバー(ブラウザが対応していればキーボードフォーカス" +"でも可)すると、そのメトリクスの平易な英語による 1 文の説明が表示されます。" +"ツールチップはネイティブの HTML `title` 属性で提供されるため、JavaScript な" +"しでもオフラインで機能します。" #: src/commands/report.md:241 msgid "" -"Because `title` tooltips are hover-only — invisible in print, on mobile, and " -"to screen readers — the page also ends with a visible, collapsible " +"Because `title` tooltips are hover-only — invisible in print, on mobile, " +"and to screen readers — the page also ends with a visible, collapsible " "**Legend** (`
`) listing every metric column's one-line definition. " "Both the tooltips and the legend draw from the same column specs, so a " "definition cannot say one thing on hover and another in the legend." msgstr "" -"`title` ツールチップはホバー時のみ有効で — 印刷・モバイル・スクリーンリーダー" -"では見えないため — ページの末尾には、すべてのメトリクス列の 1 行定義を列挙す" -"る、目に見える折りたたみ可能な**凡例**(`
`)も置かれます。ツールチッ" -"プと凡例は同じ列仕様から生成されるため、ホバー時と凡例とで定義が食い違うこと" -"はありません。" +"`title` ツールチップはホバー時のみ有効で — 印刷・モバイル・スクリーンリー" +"ダーでは見えないため — ページの末尾には、すべてのメトリクス列の 1 行定義を列" +"挙する、目に見える折りたたみ可能な**凡例**(`
`)も置かれます。ツー" +"ルチップと凡例は同じ列仕様から生成されるため、ホバー時と凡例とで定義が食い違" +"うことはありません。" #: src/commands/report.md:248 msgid "" @@ -7677,8 +7998,8 @@ msgid "" "inject markup or break out of an attribute value." msgstr "" "補間されるすべての文字列 — 関数名、ファイルパス、言語ラベル — は出力時に " -"HTML エスケープされるため、細工されたソースパスやシンボル名がマークアップを注" -"入したり、属性値の外に抜け出したりすることはできません。" +"HTML エスケープされるため、細工されたソースパスやシンボル名がマークアップを" +"注入したり、属性値の外に抜け出したりすることはできません。" #: src/commands/report.md:252 msgid "" @@ -7689,12 +8010,12 @@ msgid "" "to a neutral `lang-other` tint, and a `prefers-color-scheme: dark` adapter " "raises the alpha so contrast holds in both themes." msgstr "" -"言語ごとの各 `
` には安定した `lang-` クラス(例:`lang-rust`、" -"`lang-python`)が付与され、低アルファの背景色とそれに対応する左ボーダーでスタ" -"イル付けされるため、多言語レポートのセクション境界が一目で分かります。明示的" -"なパレットエントリを持たない言語は中立的な `lang-other` の色にフォールバック" -"し、`prefers-color-scheme: dark` アダプターがアルファを引き上げるため、どちら" -"のテーマでもコントラストが保たれます。" +"言語ごとの各 `
` には安定した `lang-` クラス(例:`lang-" +"rust`、`lang-python`)が付与され、低アルファの背景色とそれに対応する左ボー" +"ダーでスタイル付けされるため、多言語レポートのセクション境界が一目で分かりま" +"す。明示的なパレットエントリを持たない言語は中立的な `lang-other` の色に" +"フォールバックし、`prefers-color-scheme: dark` アダプターがアルファを引き上" +"げるため、どちらのテーマでもコントラストが保たれます。" #: src/commands/report.md:260 msgid "Metric values of zero" @@ -7706,16 +8027,16 @@ msgid "" "that item (e.g. Halstead metrics on an empty function). Sections whose " "entries are all zero are omitted entirely." msgstr "" -"レポート内のメトリクス値 **0** は、その項目についてメトリクスが測定されなかっ" -"たことを意味します(例:空の関数に対する Halstead メトリクス)。エントリがす" -"べてゼロのセクションは完全に省略されます。" +"レポート内のメトリクス値 **0** は、その項目についてメトリクスが測定されな" +"かったことを意味します(例:空の関数に対する Halstead メトリクス)。エントリ" +"がすべてゼロのセクションは完全に省略されます。" #: src/commands/check.md:3 msgid "" "`bca check` evaluates per-function metrics against thresholds and exits non-" -"zero when any function exceeds a limit. It is the CI integration point: wire " -"it into a build step and a regression in code complexity fails the pipeline " -"before the change lands." +"zero when any function exceeds a limit. It is the CI integration point: " +"wire it into a build step and a regression in code complexity fails the " +"pipeline before the change lands." msgstr "" "`bca check` は関数ごとのメトリクスをしきい値に照らして評価し、いずれかの関数" "が制限を超えると非ゼロで終了します。これは CI の統合ポイントです。ビルドス" @@ -7725,10 +8046,10 @@ msgstr "" #: src/commands/check.md:8 msgid "" "**Looking for full CI recipes?** The [CI integration recipe](../recipes/ci." -"md) consolidates the `--report-format` matrix, runnable GitHub Actions and `." -"gitlab-ci.yml` examples, the baseline / ratchet pattern, and the GitLab Code " -"Quality path. This page documents the command itself; the recipe documents " -"how to wire it into a pipeline." +"md) consolidates the `--report-format` matrix, runnable GitHub Actions and " +"`.gitlab-ci.yml` examples, the baseline / ratchet pattern, and the GitLab " +"Code Quality path. This page documents the command itself; the recipe " +"documents how to wire it into a pipeline." msgstr "" "**完全な CI レシピをお探しですか?** [CI 統合レシピ](../recipes/ci.md)には、" "`--report-format` のマトリクス、実行可能な GitHub Actions と `.gitlab-ci." @@ -7736,7 +8057,7 @@ msgstr "" "まとめられています。本ページはコマンド自体を、レシピはパイプラインへの組み込" "み方をそれぞれ説明します。" -#: src/commands/check.md:19 src/commands/check.md:34 +#: src/commands/check.md:19 src/commands/check.md:44 msgid "All functions within thresholds (or `--no-fail` set)." msgstr "すべての関数がしきい値内(または `--no-fail` 指定時)。" @@ -7745,22 +8066,45 @@ msgid "At least one threshold exceeded." msgstr "少なくとも 1 つのしきい値を超過。" #: src/commands/check.md:21 -msgid "Tool error (bad arguments, unreadable config, unknown metric)." -msgstr "ツールエラー(不正な引数、読み取れない設定、未知のメトリクス)。" +msgid "" +"Tool error (bad arguments, unreadable config or input, unknown metric)." +msgstr "" +"ツールエラー(不正な引数、読み取れない設定または入力、未知のメトリクス)。" #: src/commands/check.md:23 msgid "" "`1` is reserved so CI can distinguish a regression (`2`) from a tool " "misconfiguration (`1`)." msgstr "" -"`1` は予約されており、CI がリグレッション(`2`)とツールの設定ミス(`1`)を区" -"別できるようになっています。" +"`1` は予約されており、CI がリグレッション(`2`)とツールの設定ミス(`1`)を" +"区別できるようになっています。" #: src/commands/check.md:26 +msgid "" +"A gate that could not read all of its input has no verdict to report, so " +"two input problems exit `1` rather than `0`: nothing matched `--paths` / `--" +"include` / `--exclude`, and any input file that failed to read. The second " +"is the workspace-wide [unreadable-input rule](README.md#unreadable-input) — " +"`check` is not special here, it is just where the rule matters most. Both " +"checks run before the gate is evaluated and are not suppressed by `--no-" +"fail`, which suppresses threshold failures, not broken input, so neither " +"lets `--write-baseline` record a partial run." +msgstr "" +"入力をすべて読み取れなかったゲートには報告すべき判定が存在しないため、2 つの" +"入力の問題は `0` ではなく `1` で終了します。`--paths` / `--include` / `--" +"exclude` に何も一致しなかった場合と、入力ファイルの読み取りに失敗した場合で" +"す。後者はワークスペース全体に適用される[読み取れない入力の規則](README." +"md#unreadable-input)であり、`check` が特別なわけではありません — この規則が" +"最も効いてくる場所というだけです。どちらのチェックもゲートの評価前に走り、" +"`--no-fail` では抑制されません。`--no-fail` が抑制するのはしきい値の失敗で" +"あって壊れた入力ではないためです。したがってどちらの場合も `--write-" +"baseline` が部分的な実行を記録することはありません。" + +#: src/commands/check.md:36 msgid "Tiered exit codes (`--exit-codes=tiered`)" msgstr "段階的終了コード(`--exit-codes=tiered`)" -#: src/commands/check.md:28 +#: src/commands/check.md:38 msgid "" "`--exit-codes=tiered` (or `[check] exit_codes = \"tiered\"` in `bca.toml`) " "splits the single violation code `2` by severity so CI can branch on it " @@ -7770,95 +8114,96 @@ msgstr "" "\"tiered\"`)は、単一の違反コード `2` を重大度別に分割し、CI が stderr の " "`[new]` / `[regr +N%]` タグをパースせずに分岐できるようにします。" -#: src/commands/check.md:32 +#: src/commands/check.md:42 msgid "Meaning (tiered mode)" msgstr "意味(tiered モード)" -#: src/commands/check.md:35 +#: src/commands/check.md:45 msgid "Tool error." msgstr "ツールエラー。" -#: src/commands/check.md:36 +#: src/commands/check.md:46 msgid "New offenders only (no `--baseline` entry matched)." msgstr "新規違反のみ(一致する `--baseline` エントリなし)。" -#: src/commands/check.md:37 +#: src/commands/check.md:47 msgid "`3`" msgstr "`3`" -#: src/commands/check.md:37 +#: src/commands/check.md:47 msgid "Baseline regressions only (a baselined offender worsened)." msgstr "ベースライン退行のみ(ベースライン登録済みの違反が悪化)。" -#: src/commands/check.md:38 +#: src/commands/check.md:48 msgid "`4`" msgstr "`4`" -#: src/commands/check.md:38 +#: src/commands/check.md:48 msgid "Both new offenders and regressions." msgstr "新規違反と退行の両方。" -#: src/commands/check.md:39 +#: src/commands/check.md:49 msgid "`5`" msgstr "`5`" -#: src/commands/check.md:39 +#: src/commands/check.md:49 msgid "A `--tier=soft` violation that also breaches the hard limit." msgstr "ハード制限も超えている `--tier=soft` 違反。" -#: src/commands/check.md:41 +#: src/commands/check.md:51 msgid "" "The tiered codes are opt-in; the default contract above stays `0`/`1`/`2`. " "Every fail-state remains non-zero, so `exit != 0 → fail` wrappers keep " "working — only tooling that tests `$? -eq 2` explicitly needs to widen to " "`2`\\-`5`. `--no-fail` still forces exit `0`. Code `5` is emitted only at " "the soft tier; at the hard tier every violation is a hard breach by " -"definition, so the `2`/`3`/`4` split applies instead. `--exit-codes ` is value-taking; the CLI value overrides the `[check] exit_codes` " -"manifest key in either direction. An invalid `exit_codes` value is a tool " -"error (`1`). `--print-effective-config` reports the resolved `exit_codes` " -"style. The deprecated `--strict-exit-codes` flag is a one-cycle alias for `--" -"exit-codes tiered` (warns; removed at the next major)." +"definition, so the `2`/`3`/`4` split applies instead. `--exit-codes " +"` is value-taking; the CLI value overrides the `[check] " +"exit_codes` manifest key in either direction. An invalid `exit_codes` value " +"is a tool error (`1`). `--print-effective-config` reports the resolved " +"`exit_codes` style. The deprecated `--strict-exit-codes` flag is a one-" +"cycle alias for `--exit-codes tiered` (warns; removed at the next major)." msgstr "" "tiered コードはオプトインであり、上記のデフォルト契約は `0`/`1`/`2` のままで" -"す。すべての失敗状態は非ゼロのままなので、`exit != 0 → fail` 方式のラッパーは" -"引き続き動作します — `$? -eq 2` を明示的に判定するツールだけが `2`\\-`5` に広" -"げる必要があります。`--no-fail` は引き続き終了コード `0` を強制します。コー" -"ド `5` はソフト層でのみ出力されます。ハード層では定義上すべての違反がハード超" -"過であるため、代わりに `2`/`3`/`4` の分割が適用されます。`--exit-codes " -"` は値を取るフラグで、CLI の値はどちらの方向でもマニフェスト" -"の `[check] exit_codes` キーを上書きします。無効な `exit_codes` 値はツールエ" -"ラー(`1`)です。`--print-effective-config` は解決後の `exit_codes` スタイル" -"を報告します。非推奨の `--strict-exit-codes` フラグは `--exit-codes tiered` " -"の 1 サイクル限りのエイリアスです(警告を出し、次のメジャーで削除されます)。" - -#: src/commands/check.md:54 +"す。すべての失敗状態は非ゼロのままなので、`exit != 0 → fail` 方式のラッパー" +"は引き続き動作します — `$? -eq 2` を明示的に判定するツールだけが `2`\\-`5` " +"に広げる必要があります。`--no-fail` は引き続き終了コード `0` を強制します。" +"コード `5` はソフト層でのみ出力されます。ハード層では定義上すべての違反が" +"ハード超過であるため、代わりに `2`/`3`/`4` の分割が適用されます。`--exit-" +"codes ` は値を取るフラグで、CLI の値はどちらの方向でもマニ" +"フェストの `[check] exit_codes` キーを上書きします。無効な `exit_codes` 値は" +"ツールエラー(`1`)です。`--print-effective-config` は解決後の `exit_codes` " +"スタイルを報告します。非推奨の `--strict-exit-codes` フラグは `--exit-codes " +"tiered` の 1 サイクル限りのエイリアスです(警告を出し、次のメジャーで削除さ" +"れます)。" + +#: src/commands/check.md:64 msgid "Declaring thresholds" msgstr "しきい値の宣言" -#: src/commands/check.md:56 +#: src/commands/check.md:66 msgid "" "Pass `--threshold =` once per metric (repeatable). Metric " "names match `bca list-metrics`; sub-metrics use a dotted form. `0` is a " "valid limit and means \"no value permitted\"." msgstr "" -"メトリクスごとに `--threshold =` を 1 回ずつ渡します(繰り返し" -"指定可能)。メトリクス名は `bca list-metrics` と一致し、サブメトリクスはドッ" -"ト区切り形式を使います。`0` は有効な制限値で、「いかなる値も許容しない」こと" -"を意味します。" +"メトリクスごとに `--threshold =` を 1 回ずつ渡します(繰り返" +"し指定可能)。メトリクス名は `bca list-metrics` と一致し、サブメトリクスは" +"ドット区切り形式を使います。`0` は有効な制限値で、「いかなる値も許容しない」" +"ことを意味します。" -#: src/commands/check.md:67 +#: src/commands/check.md:77 msgid "" "Or keep thresholds in the `bca.toml` manifest (one place to version CI " "thresholds alongside the code). Dropped at the repo root, it is auto-" "discovered — a bare `bca check` reads it with no `--config` flag:" msgstr "" -"あるいは、しきい値を `bca.toml` マニフェストに置くこともできます(CI のしきい" -"値をコードと一緒にバージョン管理できる一元的な場所です)。リポジトリルートに" -"置けば自動検出され、`--config` フラグなしの素の `bca check` がそれを読み込み" -"ます。" +"あるいは、しきい値を `bca.toml` マニフェストに置くこともできます(CI のしき" +"い値をコードと一緒にバージョン管理できる一元的な場所です)。リポジトリルート" +"に置けば自動検出され、`--config` フラグなしの素の `bca check` がそれを読み込" +"みます。" -#: src/commands/check.md:71 +#: src/commands/check.md:81 msgid "" "```toml\n" "# bca.toml\n" @@ -7882,7 +8227,7 @@ msgstr "" "\"halstead.volume\" = 1000\n" "```" -#: src/commands/check.md:86 +#: src/commands/check.md:96 msgid "" "To merge a separate threshold file on top of the manifest for one run, pass " "it explicitly with `--config`; CLI flags and `--config` values override the " @@ -7894,34 +8239,35 @@ msgstr "" "についてマニフェストを上書きするため、プロジェクト全体のデフォルトを保ちなが" "ら、特定の実行でひとつのメトリクスだけを厳しくできます。" -#: src/commands/check.md:95 +#: src/commands/check.md:105 msgid "Accepted metric names" msgstr "使用できるメトリクス名" -#: src/commands/check.md:97 +#: src/commands/check.md:107 msgid "" "Top-level scalar metrics use their `list-metrics` names directly: " -"`cognitive`, `cyclomatic`, `nargs`, `nexits`, `nom`, `tokens`, `abc`, `wmc`, " -"`npm`, `npa`. Metric suites with multiple sub-fields use a dotted form:" +"`cognitive`, `cyclomatic`, `nargs`, `nexits`, `nom`, `tokens`, `abc`, " +"`wmc`, `npm`, `npa`. Metric suites with multiple sub-fields use a dotted " +"form:" msgstr "" "トップレベルのスカラーメトリクスは `list-metrics` の名前をそのまま使います:" -"`cognitive`、`cyclomatic`、`nargs`、`nexits`、`nom`、`tokens`、`abc`、`wmc`、" -"`npm`、`npa`。複数のサブフィールドを持つメトリクススイートはドット区切り形式" -"を使います。" +"`cognitive`、`cyclomatic`、`nargs`、`nexits`、`nom`、`tokens`、`abc`、" +"`wmc`、`npm`、`npa`。複数のサブフィールドを持つメトリクススイートはドット区" +"切り形式を使います。" -#: src/commands/check.md:102 +#: src/commands/check.md:112 msgid "Accepted threshold names" msgstr "使用できるしきい値名" -#: src/commands/check.md:104 src/python/metrics.md:82 +#: src/commands/check.md:114 src/python/metrics.md:82 msgid "Cyclomatic" msgstr "循環的複雑度" -#: src/commands/check.md:104 +#: src/commands/check.md:114 msgid "`cyclomatic`, `cyclomatic.modified`" msgstr "`cyclomatic`、`cyclomatic.modified`" -#: src/commands/check.md:105 src/python/sarif.md:47 +#: src/commands/check.md:115 src/python/sarif.md:47 msgid "" "`halstead.volume`, `halstead.difficulty`, `halstead.effort`, `halstead." "time`, `halstead.bugs`" @@ -7929,34 +8275,34 @@ msgstr "" "`halstead.volume`、`halstead.difficulty`、`halstead.effort`、`halstead." "time`、`halstead.bugs`" -#: src/commands/check.md:106 +#: src/commands/check.md:116 msgid "Lines of code" msgstr "コード行数" -#: src/commands/check.md:106 src/commands/check.md:121 src/python/sarif.md:49 +#: src/commands/check.md:116 src/commands/check.md:131 src/python/sarif.md:49 msgid "`loc.sloc`, `loc.ploc`, `loc.lloc`, `loc.cloc`, `loc.blank`" msgstr "`loc.sloc`、`loc.ploc`、`loc.lloc`、`loc.cloc`、`loc.blank`" -#: src/commands/check.md:107 src/python/metrics.md:92 +#: src/commands/check.md:117 src/python/metrics.md:92 msgid "Maintainability Index" msgstr "保守容易性指数" -#: src/commands/check.md:107 src/python/sarif.md:51 +#: src/commands/check.md:117 src/python/sarif.md:51 msgid "`mi.original`, `mi.sei`, `mi.visual_studio`" msgstr "`mi.original`、`mi.sei`、`mi.visual_studio`" -#: src/commands/check.md:109 +#: src/commands/check.md:119 msgid "" "An unknown threshold name is a tool error (exit `1`), not silently ignored." msgstr "" "不明なしきい値名はツールエラー(終了コード `1`)となり、黙って無視されること" "はありません。" -#: src/commands/check.md:112 +#: src/commands/check.md:122 msgid "Threshold scope" msgstr "しきい値のスコープ" -#: src/commands/check.md:114 +#: src/commands/check.md:124 msgid "" "A threshold is checked only against the space kind its metric actually " "measures, so a metric's whole-file or whole-`impl` aggregate is never " @@ -7968,33 +8314,33 @@ msgstr "" "り違えられることはありません。各メトリクスのスコープは固定で、設定項目はあり" "ません。" -#: src/commands/check.md:119 src/commands/suppression.md:27 +#: src/commands/check.md:129 src/commands/suppression.md:27 #: src/commands/suppression.md:97 msgid "Scope" msgstr "スコープ" -#: src/commands/check.md:119 +#: src/commands/check.md:129 msgid "Gated spaces" msgstr "ゲート対象のスペース" -#: src/commands/check.md:121 src/commands/suppression.md:31 +#: src/commands/check.md:131 src/commands/suppression.md:31 #: src/commands/suppression.md:32 src/commands/suppression.md:100 msgid "File" msgstr "ファイル" -#: src/commands/check.md:121 +#: src/commands/check.md:131 msgid "the whole-file root only" msgstr "ファイル全体のルートのみ" -#: src/commands/check.md:122 +#: src/commands/check.md:132 msgid "Function" msgstr "関数" -#: src/commands/check.md:122 +#: src/commands/check.md:132 msgid "individual functions, methods, and closures" msgstr "個々の関数、メソッド、クロージャ" -#: src/commands/check.md:122 +#: src/commands/check.md:132 msgid "" "`cognitive`, `cyclomatic`, `cyclomatic.modified`, `halstead.*`, `mi.*`, " "`abc`, `nargs`, `nexits`, `tokens`" @@ -8002,29 +8348,29 @@ msgstr "" "`cognitive`、`cyclomatic`、`cyclomatic.modified`、`halstead.*`、`mi.*`、" "`abc`、`nargs`、`nexits`、`tokens`" -#: src/commands/check.md:123 +#: src/commands/check.md:133 msgid "Container" msgstr "コンテナ" -#: src/commands/check.md:123 +#: src/commands/check.md:133 msgid "classes, structs, traits, impls, namespaces, interfaces" msgstr "クラス、構造体、トレイト、impl、名前空間、インターフェイス" -#: src/commands/check.md:123 +#: src/commands/check.md:133 msgid "`nom`, `wmc`, `npm`, `npa`" msgstr "`nom`、`wmc`、`npm`、`npa`" -#: src/commands/check.md:125 +#: src/commands/check.md:135 msgid "" "The Function-scoped metrics include the subtree sums (`nargs`, `nexits`, " "`tokens`, `halstead.*`): these still roll a function's own nested closures " "into its figure, but they are no longer summed across an entire file or " "`impl`. The Container-scoped metrics describe a type's method set (methods " "per class, weighted methods, public members), so they gate the container " -"rather than every leaf function. This means a clean file whose functions are " -"individually fine no longer trips an additive limit purely from the file-" -"wide total — the false positive that `bca: suppress-file` markers used to " -"mask." +"rather than every leaf function. This means a clean file whose functions " +"are individually fine no longer trips an additive limit purely from the " +"file-wide total — the false positive that `bca: suppress-file` markers used " +"to mask." msgstr "" "関数スコープのメトリクスにはサブツリー合計(`nargs`、`nexits`、`tokens`、" "`halstead.*`)が含まれます。これらは引き続き関数自身の入れ子クロージャをその" @@ -8032,10 +8378,10 @@ msgstr "" "なりました。コンテナスコープのメトリクスは型のメソッド集合(クラスあたりのメ" "ソッド数、重み付きメソッド、公開メンバー)を表すため、末端の関数ごとではなく" "コンテナをゲートします。これにより、個々の関数は問題ないクリーンなファイル" -"が、ファイル全体の合計だけで加算型の制限に引っかかることはなくなりました — か" -"つて `bca: suppress-file` マーカーが覆い隠していた偽陽性です。" +"が、ファイル全体の合計だけで加算型の制限に引っかかることはなくなりました — " +"かつて `bca: suppress-file` マーカーが覆い隠していた偽陽性です。" -#: src/commands/check.md:135 +#: src/commands/check.md:145 msgid "" "The bare `bca diff --metric` spelling of a `loc` sub-metric is accepted as " "an alias for its dotted form (`sloc` is equivalent to `loc.sloc`, and so on " @@ -8044,29 +8390,35 @@ msgid "" "`mi`) is ambiguous and rejected with a \"did you mean\" hint listing the " "concrete sub-metrics — pick one (e.g. `halstead.volume`)." msgstr "" -"`loc` サブメトリクスの素の `bca diff --metric` 表記は、ドット区切り形式のエイ" -"リアスとして受け付けられます(`sloc` は `loc.sloc` と等価で、`ploc`/`lloc`/" -"`cloc`/`blank` も同様)。そのため `diff` 実行からコピーした名前は正しくゲート" -"されます。単一のしきい値スカラーを持たない素のファミリー名(`halstead`、" -"`mi`)はあいまいなため拒否され、具体的なサブメトリクスを列挙する「もしかし" -"て」ヒントが表示されます — いずれか 1 つ(例:`halstead.volume`)を選んでくだ" -"さい。" +"`loc` サブメトリクスの素の `bca diff --metric` 表記は、ドット区切り形式のエ" +"イリアスとして受け付けられます(`sloc` は `loc.sloc` と等価で、`ploc`/" +"`lloc`/`cloc`/`blank` も同様)。そのため `diff` 実行からコピーした名前は正し" +"くゲートされます。単一のしきい値スカラーを持たない素のファミリー名" +"(`halstead`、`mi`)はあいまいなため拒否され、具体的なサブメトリクスを列挙す" +"る「もしかして」ヒントが表示されます — いずれか 1 つ(例:`halstead." +"volume`)を選んでください。" -#: src/commands/check.md:142 +#: src/commands/check.md:152 msgid "Two-tier thresholds (`--tier`)" msgstr "二層しきい値(`--tier`)" -#: src/commands/check.md:144 +#: src/commands/check.md:154 msgid "" "`--tier ` selects which threshold tier the gate " "compares against. `hard` (the default) uses the `[thresholds]` table " -"verbatim; `soft` is an early-warning tier that fires _before_ the hard gate, " -"flagging a function at `RATIO` of any limit. A bare `--tier` means `soft`; " -"`soft` alone uses the default ratio `0.95`; `soft=0.90` pins the ratio to " -"`0.90`; `soft=1.0` disables the blanket scale." -msgstr "`--tier ` は、ゲートが比較に使うしきい値の層を選択します。`hard`(デフォルト)は `[thresholds]` テーブルをそのまま使います。`soft` はハードゲートの「前に」発火する早期警告の層で、いずれかの制限の `RATIO` 倍に達した関数をフラグします。`--tier` 単独指定は `soft` を意味し、`soft` だけならデフォルト比率 `0.95` を使い、`soft=0.90` は比率を `0.90` に固定し、`soft=1.0` は一括スケールを無効にします。" +"verbatim; `soft` is an early-warning tier that fires _before_ the hard " +"gate, flagging a function at `RATIO` of any limit. A bare `--tier` means " +"`soft`; `soft` alone uses the default ratio `0.95`; `soft=0.90` pins the " +"ratio to `0.90`; `soft=1.0` disables the blanket scale." +msgstr "" +"`--tier ` は、ゲートが比較に使うしきい値の層を選択しま" +"す。`hard`(デフォルト)は `[thresholds]` テーブルをそのまま使います。" +"`soft` はハードゲートの「前に」発火する早期警告の層で、いずれかの制限の " +"`RATIO` 倍に達した関数をフラグします。`--tier` 単独指定は `soft` を意味し、" +"`soft` だけならデフォルト比率 `0.95` を使い、`soft=0.90` は比率を `0.90` に" +"固定し、`soft=1.0` は一括スケールを無効にします。" -#: src/commands/check.md:151 +#: src/commands/check.md:161 msgid "" "A `[thresholds.soft]` table sets per-metric soft limits, each either an " "absolute number or a `\"x\"` string that scales the metric's hard " @@ -8076,7 +8428,7 @@ msgstr "" "絶対値の数値か、そのメトリクスのハード制限をスケールする `\"x\"` 文字" "列のいずれかです。" -#: src/commands/check.md:155 src/recipes/local-gates.md:112 +#: src/commands/check.md:165 src/recipes/local-gates.md:112 msgid "" "```toml\n" "[thresholds]\n" @@ -8102,49 +8454,49 @@ msgstr "" "# nargs は未指定 → ソフト層はハード制限を継承(ソフト帯なし)\n" "```" -#: src/commands/check.md:171 +#: src/commands/check.md:181 msgid "The soft tier resolves in a fixed order:" msgstr "ソフト層は次の固定順序で解決されます。" -#: src/commands/check.md:173 +#: src/commands/check.md:183 msgid "" "Start from `[thresholds]` (a `bca.toml` manifest, merged with `--config`)." msgstr "" "`[thresholds]`(`bca.toml` マニフェスト、`--config` とマージ済み)から始めま" "す。" -#: src/commands/check.md:175 +#: src/commands/check.md:185 msgid "" "If a `[thresholds.soft]` table exists, merge its overrides on top; metrics " "absent from it inherit their hard limit. The blanket `RATIO` does not apply " "(explicit per-metric limits win)." msgstr "" "`[thresholds.soft]` テーブルが存在する場合は、その上書きを上にマージします。" -"そこに無いメトリクスはハード制限を継承します。一括の `RATIO` は適用されません" -"(明示的なメトリクスごとの制限が優先されます)。" +"そこに無いメトリクスはハード制限を継承します。一括の `RATIO` は適用されませ" +"ん(明示的なメトリクスごとの制限が優先されます)。" -#: src/commands/check.md:178 +#: src/commands/check.md:188 msgid "" "Otherwise scale every limit by the soft `RATIO` (default `0.95` for a bare " "`soft`; `soft=1.0` disables scaling)." msgstr "" -"それ以外の場合は、すべての制限をソフト `RATIO` でスケールします(素の `soft` " -"のデフォルトは `0.95`、`soft=1.0` はスケールを無効化します)。" +"それ以外の場合は、すべての制限をソフト `RATIO` でスケールします(素の " +"`soft` のデフォルトは `0.95`、`soft=1.0` はスケールを無効化します)。" -#: src/commands/check.md:180 src/recipes/local-gates.md:104 +#: src/commands/check.md:190 src/recipes/local-gates.md:104 msgid "Repeated `--threshold name=value` flags apply last, absolutely." msgstr "" "繰り返し指定された `--threshold name=value` フラグは最後に、絶対値として適用" "されます。" -#: src/commands/check.md:182 +#: src/commands/check.md:192 msgid "" "The soft `RATIO` (and the scale factor in a `\"x\"` string) must be " "in `(0, 1]`. The `[check] headroom` manifest key supplies the ratio for a " "bare `--tier=soft`. The deprecated `--headroom ` flag is a one-cycle " "alias for `--tier=soft=` (warns; removed at the next major) — it now " -"promotes a hard run to the soft tier. Both tiers ratchet through the same `--" -"baseline`, and `--print-effective-config` reports the resolved `tier` " +"promotes a hard run to the soft tier. Both tiers ratchet through the same " +"`--baseline`, and `--print-effective-config` reports the resolved `tier` " "alongside the post-merge limits. See the [Local threshold gates](../recipes/" "local-gates.md#two-tier-thresholds) recipe for the migration tip and " "rationale." @@ -8154,16 +8506,16 @@ msgstr "" "tier=soft` に比率を供給します。非推奨の `--headroom ` フラグは `--" "tier=soft=` の 1 サイクル限りのエイリアスで(警告を出し、次のメジャーで削" "除されます)、現在はハード実行をソフト層に昇格させます。両方の層は同じ `--" -"baseline` を通じてラチェットし、`--print-effective-config` はマージ後の制限と" -"併せて解決後の `tier` を報告します。移行のヒントと背景については[ローカルしき" -"い値ゲート](../recipes/local-gates.md#two-tier-thresholds)レシピを参照してく" -"ださい。" +"baseline` を通じてラチェットし、`--print-effective-config` はマージ後の制限" +"と併せて解決後の `tier` を報告します。移行のヒントと背景については[ローカル" +"しきい値ゲート](../recipes/local-gates.md#two-tier-thresholds)レシピを参照し" +"てください。" -#: src/commands/check.md:192 +#: src/commands/check.md:202 msgid "Offender output" msgstr "違反の出力" -#: src/commands/check.md:194 +#: src/commands/check.md:204 msgid "" "Every offending `(function, metric)` pair prints one line to stderr in this " "stable format:" @@ -8171,11 +8523,11 @@ msgstr "" "違反した `(function, metric)` の各ペアは、次の安定したフォーマットで 1 行ず" "つ stderr に出力されます。" -#: src/commands/check.md:201 +#: src/commands/check.md:211 msgid "For example:" msgstr "例:" -#: src/commands/check.md:208 +#: src/commands/check.md:218 msgid "" "Lines are sorted by path, then start line, then metric name, so output is " "deterministic across runs over the same tree." @@ -8183,48 +8535,49 @@ msgstr "" "行はパス、開始行、メトリクス名の順でソートされるため、同じツリーに対する実行" "間で出力は決定的です。" -#: src/commands/check.md:211 +#: src/commands/check.md:221 msgid "Silencing violations with suppression markers" msgstr "抑制マーカーによる違反の抑制" -#: src/commands/check.md:213 +#: src/commands/check.md:223 msgid "" "In-source comments can silence threshold violations on individual functions " "or whole files without editing the offending code or excluding it from the " -"walk. The native dialect is `bca: suppress` / `bca: suppress-file`; Lizard's " -"`#lizard forgives` is recognized as a compatibility shim. See [Suppression " -"markers](suppression.md) for the full reference and the `--no-suppress` CI-" -"audit flag." +"walk. The native dialect is `bca: suppress` / `bca: suppress-file`; " +"Lizard's `#lizard forgives` is recognized as a compatibility shim. See " +"[Suppression markers](suppression.md) for the full reference and the `--no-" +"suppress` CI-audit flag." msgstr "" "ソース内コメントによって、問題のコードを編集したりウォークから除外したりせず" "に、個々の関数またはファイル全体のしきい値違反を抑制できます。ネイティブの記" -"法は `bca: suppress` / `bca: suppress-file` で、Lizard の `#lizard forgives` " -"は互換シムとして認識されます。完全なリファレンスと `--no-suppress` CI 監査フ" -"ラグについては[抑制マーカー](suppression.md)を参照してください。" +"法は `bca: suppress` / `bca: suppress-file` で、Lizard の `#lizard " +"forgives` は互換シムとして認識されます。完全なリファレンスと `--no-" +"suppress` CI 監査フラグについては[抑制マーカー](suppression.md)を参照してく" +"ださい。" -#: src/commands/check.md:220 +#: src/commands/check.md:230 msgid "Exempting whole file categories (`[check.exclude]`)" msgstr "ファイルカテゴリ全体の除外(`[check.exclude]`)" -#: src/commands/check.md:222 +#: src/commands/check.md:232 msgid "" "Some files should be **analysed and reported but never gated**: test " "fixtures that intentionally trip cognitive/cyclomatic, generated bindings, " "macro-dispatch modules whose complexity is structural and will never be " -"\"fixed\". Putting these in `.bcaignore` is too blunt — it removes them from " -"the walk entirely, so `bca report` loses them too. Baselining them is also " -"wrong — they are not debt being paid down, and they churn the baseline diff " -"forever." +"\"fixed\". Putting these in `.bcaignore` is too blunt — it removes them " +"from the walk entirely, so `bca report` loses them too. Baselining them is " +"also wrong — they are not debt being paid down, and they churn the baseline " +"diff forever." msgstr "" "一部のファイルは**分析・報告はするがゲートは決してしない**扱いにすべきです。" "意図的に cognitive/cyclomatic を超過させるテストフィクスチャ、生成されたバイ" "ンディング、複雑さが構造的で決して「修正」されないマクロディスパッチモジュー" -"ルなどです。これらを `.bcaignore` に入れるのは大雑把すぎます — ウォークから完" -"全に除外されるため、`bca report` からも消えてしまいます。ベースラインに登録す" -"るのも誤りです — これらは返済中の負債ではなく、ベースラインの diff を永遠にか" -"き乱すことになります。" +"ルなどです。これらを `.bcaignore` に入れるのは大雑把すぎます — ウォークから" +"完全に除外されるため、`bca report` からも消えてしまいます。ベースラインに登" +"録するのも誤りです — これらは返済中の負債ではなく、ベースラインの diff を永" +"遠にかき乱すことになります。" -#: src/commands/check.md:230 +#: src/commands/check.md:240 msgid "" "`[check.exclude]` is the glob-level middle ground: matching files are " "walked, parsed, metric'd, and shown by `bca report`, but `bca check` drops " @@ -8238,11 +8591,11 @@ msgstr "" "に**それらの違反を破棄するため、構造的な除外対象は `.bca-baseline.toml` の外" "に保たれます。" -#: src/commands/check.md:236 +#: src/commands/check.md:246 msgid "In `bca.toml`:" msgstr "`bca.toml` の場合:" -#: src/commands/check.md:238 +#: src/commands/check.md:248 msgid "" "```toml\n" "[check]\n" @@ -8262,23 +8615,23 @@ msgstr "" "]\n" "```" -#: src/commands/check.md:247 +#: src/commands/check.md:257 msgid "" "Or on the command line (`--check-exclude` is repeatable and unions with `--" "check-exclude-from`):" msgstr "" -"またはコマンドラインで指定します(`--check-exclude` は繰り返し指定可能で、`--" -"check-exclude-from` と結合されます)。" +"またはコマンドラインで指定します(`--check-exclude` は繰り返し指定可能で、" +"`--check-exclude-from` と結合されます)。" -#: src/commands/check.md:251 +#: src/commands/check.md:261 msgid "\"tests/**\"" msgstr "\"tests/**\"" -#: src/commands/check.md:251 +#: src/commands/check.md:261 msgid "\"xtask/**\"" msgstr "\"xtask/**\"" -#: src/commands/check.md:255 +#: src/commands/check.md:265 msgid "" "`--check-exclude-from` reads a `.gitignore`\\-style file (blank lines and " "`#`\\-comments skipped); the conventional name is `.bcacheckignore`, " @@ -8287,39 +8640,53 @@ msgid "" "`--check-exclude` list **unions with** (does not replace) the manifest " "`[check] exclude` list — a CLI exemption is added to the project's, never a " "replacement, so you cannot accidentally re-gate a path the manifest " -"deliberately exempted. Duplicates collapse; CLI patterns sort first. Pass `--" -"no-config` to drop the manifest's exemptions entirely. (Positive scope keys " -"like `paths` / `include` still _replace_ on the CLI — only the exclude " +"deliberately exempted. Duplicates collapse; CLI patterns sort first. Pass " +"`--no-config` to drop the manifest's exemptions entirely. (Positive scope " +"keys like `paths` / `include` still _replace_ on the CLI — only the exclude " "filters merge.)" -msgstr "`--check-exclude-from` は `.gitignore` 形式のファイルを読み込みます(空行と `#` コメントはスキップ)。慣例的な名前は、ウォーカー用の `.bcaignore` に対応する `.bcacheckignore` です。グロブは、ウォーカーが `--exclude` でマッチさせたのと全く同じパスにマッチします。「負のフィルター」キーであるため、明示的な `--check-exclude` リストはマニフェストの `[check] exclude` リストと**結合されます**(置き換えではありません)。CLI の除外はプロジェクトの除外に追加されるのであって置き換えではないため、マニフェストが意図的に除外したパスを誤って再ゲートすることはできません。重複はまとめられ、CLI のパターンが先にソートされます。マニフェストの除外を完全に外すには `--no-config` を渡します。(`paths` / `include` のような正のスコープキーは CLI では引き続き「置き換え」です — マージされるのは exclude フィルターだけです。)" - -#: src/commands/check.md:267 +msgstr "" +"`--check-exclude-from` は `.gitignore` 形式のファイルを読み込みます(空行と " +"`#` コメントはスキップ)。慣例的な名前は、ウォーカー用の `.bcaignore` に対応" +"する `.bcacheckignore` です。グロブは、ウォーカーが `--exclude` でマッチさせ" +"たのと全く同じパスにマッチします。「負のフィルター」キーであるため、明示的" +"な `--check-exclude` リストはマニフェストの `[check] exclude` リストと**結合" +"されます**(置き換えではありません)。CLI の除外はプロジェクトの除外に追加さ" +"れるのであって置き換えではないため、マニフェストが意図的に除外したパスを誤っ" +"て再ゲートすることはできません。重複はまとめられ、CLI のパターンが先にソート" +"されます。マニフェストの除外を完全に外すには `--no-config` を渡します。" +"(`paths` / `include` のような正のスコープキーは CLI では引き続き「置き換" +"え」です — マージされるのは exclude フィルターだけです。)" + +#: src/commands/check.md:277 msgid "Precedence with the other suppression mechanisms" msgstr "他の抑制メカニズムとの優先順位" -#: src/commands/check.md:269 +#: src/commands/check.md:279 msgid "Most-specific to least, `bca check` resolves exemptions in this order:" -msgstr "`bca check` は、最も特異的なものから順に、次の順序で除外を解決します。" +msgstr "" +"`bca check` は、最も特異的なものから順に、次の順序で除外を解決します。" -#: src/commands/check.md:271 +#: src/commands/check.md:281 msgid "" -"**In-source markers** (`bca: suppress` / `bca: suppress-file`) — always win; " -"applied during the walk so the function never becomes a violation." +"**In-source markers** (`bca: suppress` / `bca: suppress-file`) — always " +"win; applied during the walk so the function never becomes a violation." msgstr "" "**ソース内マーカー**(`bca: suppress` / `bca: suppress-file`)— 常に優先され" "ます。ウォーク中に適用されるため、その関数はそもそも違反になりません。" -#: src/commands/check.md:274 +#: src/commands/check.md:284 msgid "" -"**`[check.exclude]` globs** — exempt _categories_ of files (tests, generated " -"code)." -msgstr "**`[check.exclude]` グロブ** — ファイルの「カテゴリ」(テスト、生成コード)を除外します。" +"**`[check.exclude]` globs** — exempt _categories_ of files (tests, " +"generated code)." +msgstr "" +"**`[check.exclude]` グロブ** — ファイルの「カテゴリ」(テスト、生成コード)" +"を除外します。" -#: src/commands/check.md:276 +#: src/commands/check.md:286 msgid "**`.bca-baseline.toml`** — known offenders being paid down." msgstr "**`.bca-baseline.toml`** — 返済中の既知の違反。" -#: src/commands/check.md:278 +#: src/commands/check.md:288 msgid "" "`--print-effective-config` reports the resolved `check_exclude` globs " "alongside the other gate inputs." @@ -8327,13 +8694,13 @@ msgstr "" "`--print-effective-config` は、他のゲート入力と併せて解決後の " "`check_exclude` グロブを報告します。" -#: src/commands/check.md:283 +#: src/commands/check.md:293 msgid "" "When you adopt thresholds on an existing codebase you typically face a " "binary choice between \"raise the limit until nothing fires\" and \"fix " "every offender before turning the gate on\". A baseline file is the ratchet-" -"down alternative: record today's offenders, fail only on regressions and new " -"offenders, and shrink the file over time as the team pays down debt." +"down alternative: record today's offenders, fail only on regressions and " +"new offenders, and shrink the file over time as the team pays down debt." msgstr "" "既存のコードベースにしきい値を導入するとき、通常は「何も発火しなくなるまで制" "限を引き上げる」か「ゲートを有効にする前にすべての違反を修正する」かの二者択" @@ -8341,14 +8708,14 @@ msgstr "" "の違反を記録し、退行と新規違反のみを失敗させ、チームが負債を返済するにつれて" "ファイルを縮小していきます。" -#: src/commands/check.md:290 +#: src/commands/check.md:300 msgid "" -"Baselines are **complementary to** the suppression markers from [Suppression " -"markers](suppression.md), not a substitute. Suppressions express \"this " -"function is intentionally exempt forever\" and live in source; baselines " -"express \"this is tech debt we're paying down\" and live in a committed TOML " -"file. `bca check` honors suppressions first and applies the baseline filter " -"to whatever remains." +"Baselines are **complementary to** the suppression markers from " +"[Suppression markers](suppression.md), not a substitute. Suppressions " +"express \"this function is intentionally exempt forever\" and live in " +"source; baselines express \"this is tech debt we're paying down\" and live " +"in a committed TOML file. `bca check` honors suppressions first and applies " +"the baseline filter to whatever remains." msgstr "" "ベースラインは、[抑制マーカー](suppression.md)の抑制マーカーを**補完する**も" "のであり、代替ではありません。抑制は「この関数は意図的に永久に除外する」を表" @@ -8356,21 +8723,21 @@ msgstr "" "表現し、コミットされた TOML ファイルに置かれます。`bca check` はまず抑制を尊" "重し、残ったものにベースラインフィルターを適用します。" -#: src/commands/check.md:297 +#: src/commands/check.md:307 msgid "Writing a baseline" msgstr "ベースラインの書き出し" -#: src/commands/check.md:304 +#: src/commands/check.md:314 msgid "" -"This walks the tree, captures every threshold violation that would otherwise " -"fail the check, and writes them to the file as sorted TOML. The run exits " -"`0` regardless of offender count — the point is to capture them." +"This walks the tree, captures every threshold violation that would " +"otherwise fail the check, and writes them to the file as sorted TOML. The " +"run exits `0` regardless of offender count — the point is to capture them." msgstr "" "これはツリーをウォークし、そのままではチェックを失敗させるすべてのしきい値違" "反を捕捉して、ソート済み TOML としてファイルに書き出します。この実行は違反数" "に関係なく `0` で終了します — 目的は違反を捕捉することだからです。" -#: src/commands/check.md:309 +#: src/commands/check.md:319 msgid "" "```toml\n" "# bca baseline file. Generated by `bca check --write-baseline`.\n" @@ -8408,62 +8775,65 @@ msgstr "" "value = 22.0\n" "```" -#: src/commands/check.md:327 +#: src/commands/check.md:337 msgid "" "The `qualified` field is the function's qualified symbol (the `::`\\-joined " -"chain of enclosing named containers plus the function name); `start_line` is " -"retained only to disambiguate a symbol shared by several functions. With `--" -"baseline-fuzzy-match`, each entry also carries a `body_hash` for rename-" +"chain of enclosing named containers plus the function name); `start_line` " +"is retained only to disambiguate a symbol shared by several functions. With " +"`--baseline-fuzzy-match`, each entry also carries a `body_hash` for rename-" "tolerant matching." msgstr "" "`qualified` フィールドは関数の修飾シンボル(囲んでいる名前付きコンテナを `::" -"` で連結した連鎖に関数名を加えたもの)です。`start_line` は、複数の関数で共有" -"されるシンボルを区別するためだけに保持されます。`--baseline-fuzzy-match` を使" -"うと、各エントリはリネーム耐性のあるマッチングのための `body_hash` も持ちま" -"す。" +"` で連結した連鎖に関数名を加えたもの)です。`start_line` は、複数の関数で共" +"有されるシンボルを区別するためだけに保持されます。`--baseline-fuzzy-match` " +"を使うと、各エントリはリネーム耐性のあるマッチングのための `body_hash` も持" +"ちます。" -#: src/commands/check.md:333 +#: src/commands/check.md:343 msgid "" "Functions already covered by an in-source suppression marker are excluded. " "Pass `--no-suppress` together with `--write-baseline` to record every " "violation (CI-auditor flow)." msgstr "" "ソース内の抑制マーカーで既にカバーされている関数は除外されます。すべての違反" -"を記録するには、`--write-baseline` と一緒に `--no-suppress` を渡します(CI 監" -"査フロー)。" +"を記録するには、`--write-baseline` と一緒に `--no-suppress` を渡します(CI " +"監査フロー)。" -#: src/commands/check.md:337 +#: src/commands/check.md:347 msgid "" "`--write-baseline` cannot be combined with `--baseline`, `--report-format`, " "`--output`, `--since`, or `--changed-only` — the baseline file _is_ the " "output." -msgstr "`--write-baseline` は `--baseline`、`--report-format`、`--output`、`--since`、`--changed-only` と組み合わせられません — ベースラインファイルが出力「そのもの」だからです。" +msgstr "" +"`--write-baseline` は `--baseline`、`--report-format`、`--output`、`--" +"since`、`--changed-only` と組み合わせられません — ベースラインファイルが出力" +"「そのもの」だからです。" -#: src/commands/check.md:341 +#: src/commands/check.md:351 msgid "Reading a baseline" msgstr "ベースラインの読み込み" -#: src/commands/check.md:348 +#: src/commands/check.md:358 msgid "A violation is suppressed when both conditions hold:" msgstr "違反は、次の両方の条件が成り立つときに抑制されます。" -#: src/commands/check.md:350 +#: src/commands/check.md:360 msgid "" -"An entry matches by `(path, qualified_symbol, metric)` — independent of line " -"number — or, failing that and with `--baseline-fuzzy-match`, by body hash. " -"(See the [Baselines recipe](../recipes/baselines.md#how-matching-works) for " -"the full resolution order.)" +"An entry matches by `(path, qualified_symbol, metric)` — independent of " +"line number — or, failing that and with `--baseline-fuzzy-match`, by body " +"hash. (See the [Baselines recipe](../recipes/baselines.md#how-matching-" +"works) for the full resolution order.)" msgstr "" -"エントリが `(path, qualified_symbol, metric)` で一致する — 行番号には依存しま" -"せん — か、それで一致しない場合は `--baseline-fuzzy-match` 指定時にボディハッ" -"シュで一致する。(完全な解決順序は[ベースラインレシピ](../recipes/baselines." -"md#how-matching-works)を参照してください。)" +"エントリが `(path, qualified_symbol, metric)` で一致する — 行番号には依存し" +"ません — か、それで一致しない場合は `--baseline-fuzzy-match` 指定時にボディ" +"ハッシュで一致する。(完全な解決順序は[ベースラインレシピ](../recipes/" +"baselines.md#how-matching-works)を参照してください。)" -#: src/commands/check.md:354 +#: src/commands/check.md:364 msgid "The current `value` is **less than or equal to** the recorded value." msgstr "現在の `value` が記録された値**以下**である。" -#: src/commands/check.md:356 +#: src/commands/check.md:366 msgid "" "A function that gets worse than its baseline value still fails. New " "offenders not listed in the baseline still fail. Improvements pass silently " @@ -8474,7 +8844,7 @@ msgstr "" "い新規違反も引き続き失敗します。改善は黙って通過します(エントリは次の `--" "write-baseline` による更新まで、古い高めの値のまま残ります)。" -#: src/commands/check.md:361 +#: src/commands/check.md:371 msgid "" "A baseline file that does not exist, is empty, has a missing or unsupported " "`version`, or fails to parse is a tool error (exit `1`), not a silent zero-" @@ -8484,7 +8854,7 @@ msgstr "" "敗するベースラインファイルはツールエラー(終了コード `1`)であり、黙ってゼロ" "マッチ扱いにはなりません。" -#: src/commands/check.md:365 +#: src/commands/check.md:375 msgid "" "Path keys are canonicalised relative to the baseline file's own directory " "(the _anchor_), so `--paths .`, `--paths src/`, and `--paths \"$PWD\"` " @@ -8498,29 +8868,39 @@ msgstr "" "く `--baseline` 実行はマッチします — `--write-baseline` を再実行せずに自由に" "切り替えられます。" -#: src/commands/check.md:371 src/recipes/baselines.md:368 +#: src/commands/check.md:381 src/recipes/baselines.md:368 msgid "Limitations" msgstr "制限事項" -#: src/commands/check.md:373 +#: src/commands/check.md:383 msgid "" "**Ambiguous symbols / anonymous functions.** Entries key on the qualified " -"symbol, so inserting code above a _named_ function no longer re-keys it. The " -"exceptions: functions sharing a qualified symbol that drift beyond `--" +"symbol, so inserting code above a _named_ function no longer re-keys it. " +"The exceptions: functions sharing a qualified symbol that drift beyond `--" "baseline-line-tolerance` apart, and anonymous closures/lambdas (whose " "synthetic symbol embeds the line). Both re-key as \"new\" on movement; " "refresh with `--write-baseline`." -msgstr "**あいまいなシンボル / 無名関数。** エントリは修飾シンボルをキーとするため、「名前付き」関数の上にコードを挿入してもキーは変わらなくなりました。例外は、同じ修飾シンボルを共有する関数が `--baseline-line-tolerance` を超えて離れた場合と、無名のクロージャ / ラムダ(合成シンボルに行番号が埋め込まれます)です。どちらも移動すると「新規」として再キーされます。`--write-baseline` で更新してください。" +msgstr "" +"**あいまいなシンボル / 無名関数。** エントリは修飾シンボルをキーとするため、" +"「名前付き」関数の上にコードを挿入してもキーは変わらなくなりました。例外は、" +"同じ修飾シンボルを共有する関数が `--baseline-line-tolerance` を超えて離れた" +"場合と、無名のクロージャ / ラムダ(合成シンボルに行番号が埋め込まれます)で" +"す。どちらも移動すると「新規」として再キーされます。`--write-baseline` で更" +"新してください。" -#: src/commands/check.md:379 +#: src/commands/check.md:389 msgid "" "**OS portability.** Paths are stored with forward slashes so a baseline " -"written on one OS matches the same tree on another. Paths that are not valid " -"UTF-8 fall back to a lossy display form (U+FFFD substitution) and may not " -"round-trip exactly." -msgstr "**OS 間の可搬性。** パスはスラッシュ区切りで保存されるため、ある OS で書かれたベースラインは別の OS 上の同じツリーにマッチします。有効な UTF-8 でないパスは損失のある表示形式(U+FFFD 置換)にフォールバックし、正確にラウンドトリップしない場合があります。" +"written on one OS matches the same tree on another. Paths that are not " +"valid UTF-8 fall back to a lossy display form (U+FFFD substitution) and may " +"not round-trip exactly." +msgstr "" +"**OS 間の可搬性。** パスはスラッシュ区切りで保存されるため、ある OS で書かれ" +"たベースラインは別の OS 上の同じツリーにマッチします。有効な UTF-8 でないパ" +"スは損失のある表示形式(U+FFFD 置換)にフォールバックし、正確にラウンドト" +"リップしない場合があります。" -#: src/commands/check.md:384 +#: src/commands/check.md:394 msgid "" "See the [Baselines recipe](../recipes/baselines.md) for the end-to-end " "adoption flow and CI integration patterns." @@ -8528,26 +8908,26 @@ msgstr "" "エンドツーエンドの導入フローと CI 統合パターンについては、[ベースラインレシ" "ピ](../recipes/baselines.md)を参照してください。" -#: src/commands/check.md:387 +#: src/commands/check.md:397 msgid "Reporting without failing" msgstr "失敗させずに報告する" -#: src/commands/check.md:389 +#: src/commands/check.md:399 msgid "" "`--no-fail` prints offenders to stderr but exits `0`. Useful while adopting " "baselines without flipping CI red. Other CI tools call this behavior `--" "report-only` or `--soft-fail`; here the flag is spelled `--no-fail`." msgstr "" -"`--no-fail` は違反を stderr に出力しますが、`0` で終了します。CI を赤くせずに" -"ベースラインを導入している間に便利です。他の CI ツールではこの挙動を `--" -"report-only` や `--soft-fail` と呼びますが、ここでは `--no-fail` という綴りで" -"す。" +"`--no-fail` は違反を stderr に出力しますが、`0` で終了します。CI を赤くせず" +"にベースラインを導入している間に便利です。他の CI ツールではこの挙動を `--" +"report-only` や `--soft-fail` と呼びますが、ここでは `--no-fail` という綴り" +"です。" -#: src/commands/check.md:398 src/recipes/ci.md:318 +#: src/commands/check.md:408 src/recipes/ci.md:318 msgid "Actionable failure output" msgstr "対処しやすい失敗出力" -#: src/commands/check.md:400 +#: src/commands/check.md:410 msgid "" "When `bca check` fails, five flags shape the failure stream so a developer " "skimming a CI log can see what tripped, where in their PR it tripped, and " @@ -8555,68 +8935,68 @@ msgid "" "Actions env vars when present, so the common CI case needs zero explicit " "configuration." msgstr "" -"`bca check` が失敗したとき、5 つのフラグが失敗ストリームを整形し、CI ログを流" -"し読みする開発者が、何が引っかかったのか、PR のどこで引っかかったのか、次に何" -"をすべきかを把握できるようにします。各フラグは独立しており、存在する場合はい" -"ずれも GitHub Actions の環境変数から自動検出されるため、一般的な CI のケース" -"では明示的な設定は不要です。" +"`bca check` が失敗したとき、5 つのフラグが失敗ストリームを整形し、CI ログを" +"流し読みする開発者が、何が引っかかったのか、PR のどこで引っかかったのか、次" +"に何をすべきかを把握できるようにします。各フラグは独立しており、存在する場合" +"はいずれも GitHub Actions の環境変数から自動検出されるため、一般的な CI の" +"ケースでは明示的な設定は不要です。" -#: src/commands/check.md:406 src/commands/suppression.md:27 +#: src/commands/check.md:416 src/commands/suppression.md:27 #: src/commands/suppression.md:115 src/recipes/ci.md:529 msgid "Effect" msgstr "効果" -#: src/commands/check.md:406 +#: src/commands/check.md:416 msgid "Auto-detect env" msgstr "自動検出する環境変数" -#: src/commands/check.md:408 src/recipes/ci.md:531 +#: src/commands/check.md:418 src/recipes/ci.md:531 msgid "`--since `" msgstr "`--since `" -#: src/commands/check.md:408 +#: src/commands/check.md:418 msgid "" "Partition per-file footer into \"Files in this range\" + \"Other offenders\"" msgstr "" "ファイル別フッターを \"Files in this range\" と \"Other offenders\" に分割" -#: src/commands/check.md:408 +#: src/commands/check.md:418 msgid "`BCA_DIFF_BASE`, `GITHUB_BASE_REF`, `GITHUB_EVENT_BEFORE`" msgstr "`BCA_DIFF_BASE`、`GITHUB_BASE_REF`、`GITHUB_EVENT_BEFORE`" -#: src/commands/check.md:409 src/recipes/ci.md:532 +#: src/commands/check.md:419 src/recipes/ci.md:532 msgid "`--changed-only`" msgstr "`--changed-only`" -#: src/commands/check.md:409 +#: src/commands/check.md:419 msgid "Drop violations outside the diff scope entirely" msgstr "diff スコープ外の違反を完全に除外" -#: src/commands/check.md:409 +#: src/commands/check.md:419 msgid "Requires a resolvable base (`--since` or one of the above)" msgstr "解決可能なベースが必要(`--since` または上記のいずれか)" -#: src/commands/check.md:410 src/recipes/ci.md:533 +#: src/commands/check.md:420 src/recipes/ci.md:533 msgid "`--github-annotations `" msgstr "`--github-annotations `" -#: src/commands/check.md:410 +#: src/commands/check.md:420 msgid "" "Emit `::error file=…::msg` workflow commands for inline file annotations " "(bare flag = `always`)" msgstr "" -"インラインのファイル注釈のために `::error file=…::msg` ワークフローコマンドを" -"出力(フラグ単独指定 = `always`)" +"インラインのファイル注釈のために `::error file=…::msg` ワークフローコマンド" +"を出力(フラグ単独指定 = `always`)" -#: src/commands/check.md:410 +#: src/commands/check.md:420 msgid "`auto` detects `GITHUB_ACTIONS == \"true\"`" msgstr "`auto` は `GITHUB_ACTIONS == \"true\"` を検出" -#: src/commands/check.md:411 src/recipes/ci.md:534 +#: src/commands/check.md:421 src/recipes/ci.md:534 msgid "`--summary-file `" msgstr "`--summary-file `" -#: src/commands/check.md:411 +#: src/commands/check.md:421 msgid "" "Append markdown digest (per-file rollup + breakdown + top-10 offenders); " "`never` suppresses it" @@ -8624,23 +9004,23 @@ msgstr "" "Markdown ダイジェスト(ファイル別集計 + 内訳 + 違反トップ 10)を追記。" "`never` で抑止" -#: src/commands/check.md:411 +#: src/commands/check.md:421 msgid "`auto` detects `GITHUB_STEP_SUMMARY`" msgstr "`auto` は `GITHUB_STEP_SUMMARY` を検出" -#: src/commands/check.md:412 src/recipes/ci.md:535 +#: src/commands/check.md:422 src/recipes/ci.md:535 msgid "`--no-remediation`" msgstr "`--no-remediation`" -#: src/commands/check.md:412 src/recipes/ci.md:535 +#: src/commands/check.md:422 src/recipes/ci.md:535 msgid "Suppress the trailing `--- next steps ---` block" msgstr "末尾の `--- next steps ---` ブロックを抑止" -#: src/commands/check.md:412 +#: src/commands/check.md:422 msgid "Block emitted on failure unless this flag is passed" msgstr "このフラグを渡さない限り、失敗時にブロックを出力" -#: src/commands/check.md:414 +#: src/commands/check.md:424 msgid "" "The per-violation stderr lines and the per-file rollup footer remain " "unchanged when none of the above are active, so existing CI tooling that " @@ -8650,29 +9030,29 @@ msgstr "" "変わらないため、従来の出力に grep でアンカーしている既存の CI ツールは引き続" "き動作します。" -#: src/commands/check.md:418 +#: src/commands/check.md:428 msgid "" "See the [CI integration recipe](../recipes/ci.md#actionable-failure-output) " "for worked examples — including a \"putting it all together\" GHA snippet " -"that composes all five into one step — and the [Baselines recipe](../recipes/" -"baselines.md) for the `--write-baseline` refresh flow the remediation block " -"links to." +"that composes all five into one step — and the [Baselines recipe](../" +"recipes/baselines.md) for the `--write-baseline` refresh flow the " +"remediation block links to." msgstr "" "実例については [CI 統合レシピ](../recipes/ci.md#actionable-failure-output)を" "参照してください — 5 つすべてを 1 つのステップにまとめる「全部まとめて」の " "GHA スニペットも含まれます。また、修復ブロックがリンクする `--write-" -"baseline` 更新フローについては[ベースラインレシピ](../recipes/baselines.md)を" -"参照してください。" +"baseline` 更新フローについては[ベースラインレシピ](../recipes/baselines.md)" +"を参照してください。" -#: src/commands/check.md:424 +#: src/commands/check.md:434 msgid "Diff-base auto-detection precedence" msgstr "diff ベース自動検出の優先順位" -#: src/commands/check.md:426 +#: src/commands/check.md:436 msgid "When `--since` is omitted, `bca` consults env vars in this order:" msgstr "`--since` が省略された場合、`bca` は次の順序で環境変数を参照します。" -#: src/commands/check.md:428 +#: src/commands/check.md:438 msgid "" "`BCA_DIFF_BASE` — explicit override hatch for local shells or non-GHA CI " "runners." @@ -8680,50 +9060,50 @@ msgstr "" "`BCA_DIFF_BASE` — ローカルシェルや GHA 以外の CI ランナー向けの明示的なオー" "バーライド手段。" -#: src/commands/check.md:430 +#: src/commands/check.md:440 msgid "" -"`GITHUB_BASE_REF` — set by GHA on `pull_request` events. Expanded to `origin/" -"`; the runner is responsible for the corresponding `git fetch` " -"(`fetch-depth: 0` on `actions/checkout`)." +"`GITHUB_BASE_REF` — set by GHA on `pull_request` events. Expanded to " +"`origin/`; the runner is responsible for the corresponding `git " +"fetch` (`fetch-depth: 0` on `actions/checkout`)." msgstr "" "`GITHUB_BASE_REF` — `pull_request` イベントで GHA が設定します。`origin/" -"` に展開されます。対応する `git fetch` はランナーの責任です(`actions/" -"checkout` の `fetch-depth: 0`)。" +"` に展開されます。対応する `git fetch` はランナーの責任です" +"(`actions/checkout` の `fetch-depth: 0`)。" -#: src/commands/check.md:433 +#: src/commands/check.md:443 msgid "" "`GITHUB_EVENT_BEFORE` — set by GHA on `push` events to the SHA at HEAD " "before the push. The all-zeroes sentinel (force push, brand-new branch) is " "treated as no signal." msgstr "" -"`GITHUB_EVENT_BEFORE` — `push` イベントで GHA が、プッシュ前の HEAD の SHA に" -"設定します。すべてゼロのセンチネル(強制プッシュ、新規ブランチ)はシグナルな" -"しとして扱われます。" +"`GITHUB_EVENT_BEFORE` — `push` イベントで GHA が、プッシュ前の HEAD の SHA " +"に設定します。すべてゼロのセンチネル(強制プッシュ、新規ブランチ)はシグナル" +"なしとして扱われます。" -#: src/commands/check.md:437 +#: src/commands/check.md:447 msgid "" "Failing to resolve a base is non-fatal **unless `--changed-only` is " -"passed**, in which case the gate dies — silently suppressing every violation " -"under a misconfigured base would be the worst failure mode this feature " -"exists to prevent. `--write-baseline` also conflicts with `--since` / `--" -"changed-only` (a partial baseline would silently mask every offender outside " -"the diff scope on the next full-tree run)." +"passed**, in which case the gate dies — silently suppressing every " +"violation under a misconfigured base would be the worst failure mode this " +"feature exists to prevent. `--write-baseline` also conflicts with `--" +"since` / `--changed-only` (a partial baseline would silently mask every " +"offender outside the diff scope on the next full-tree run)." msgstr "" "ベースの解決に失敗しても致命的ではありません。**ただし `--changed-only` が渡" -"されている場合は別で**、その場合ゲートは失敗します — 誤設定されたベースの下で" -"すべての違反を黙って抑制することは、この機能が防ごうとしている最悪の失敗モー" -"ドだからです。`--write-baseline` も `--since` / `--changed-only` と競合します" -"(部分的なベースラインは、次のフルツリー実行で diff スコープ外のすべての違反" -"を黙って覆い隠してしまいます)。" +"されている場合は別で**、その場合ゲートは失敗します — 誤設定されたベースの下" +"ですべての違反を黙って抑制することは、この機能が防ごうとしている最悪の失敗" +"モードだからです。`--write-baseline` も `--since` / `--changed-only` と競合" +"します(部分的なベースラインは、次のフルツリー実行で diff スコープ外のすべて" +"の違反を黙って覆い隠してしまいます)。" -#: src/commands/check.md:445 +#: src/commands/check.md:455 msgid "CI example (GitHub Actions)" msgstr "CI の例(GitHub Actions)" -#: src/commands/check.md:448 src/commands/check.md:460 -#: src/commands/check.md:531 src/commands/check.md:540 -#: src/commands/check.md:546 src/commands/check.md:632 -#: src/commands/check.md:639 src/commands/check.md:641 src/recipes/ci.md:119 +#: src/commands/check.md:458 src/commands/check.md:470 +#: src/commands/check.md:541 src/commands/check.md:550 +#: src/commands/check.md:556 src/commands/check.md:642 +#: src/commands/check.md:649 src/commands/check.md:651 src/recipes/ci.md:119 #: src/recipes/ci.md:126 src/recipes/ci.md:140 src/recipes/ci.md:176 #: src/recipes/ci.md:184 src/recipes/ci.md:186 src/recipes/ci.md:194 #: src/recipes/ci.md:222 src/recipes/ci.md:233 src/recipes/ci.md:237 @@ -8731,17 +9111,18 @@ msgstr "CI の例(GitHub Actions)" #: src/recipes/ci.md:411 src/recipes/ci.md:438 src/recipes/ci.md:501 #: src/recipes/ci.md:561 src/recipes/baselines.md:78 #: src/recipes/local-gates.md:404 src/recipes/local-gates.md:539 -#: src/recipes/local-gates.md:545 src/python/sarif.md:67 src/python/sarif.md:76 +#: src/recipes/local-gates.md:545 src/python/sarif.md:67 +#: src/python/sarif.md:76 msgid "name" msgstr "name" -#: src/commands/check.md:448 src/recipes/baselines.md:78 +#: src/commands/check.md:458 src/recipes/baselines.md:78 msgid "Check code complexity thresholds" msgstr "Check code complexity thresholds" -#: src/commands/check.md:449 src/commands/check.md:461 -#: src/commands/check.md:541 src/commands/check.md:640 -#: src/commands/check.md:642 src/recipes/ci.md:128 src/recipes/ci.md:141 +#: src/commands/check.md:459 src/commands/check.md:471 +#: src/commands/check.md:551 src/commands/check.md:650 +#: src/commands/check.md:652 src/recipes/ci.md:128 src/recipes/ci.md:141 #: src/recipes/ci.md:187 src/recipes/ci.md:238 src/recipes/ci.md:290 #: src/recipes/ci.md:351 src/recipes/ci.md:412 src/recipes/ci.md:439 #: src/recipes/ci.md:502 src/recipes/ci.md:562 src/recipes/baselines.md:79 @@ -8749,7 +9130,7 @@ msgstr "Check code complexity thresholds" msgid "run" msgstr "run" -#: src/commands/check.md:449 +#: src/commands/check.md:459 msgid "" " bca check\n" " # Thresholds and paths come from the auto-discovered `bca.toml`\n" @@ -8762,7 +9143,7 @@ msgstr "" " # ステップが失敗する — はまさにここで求めるものです。追加の配線は不要で" "す。\n" -#: src/commands/check.md:456 +#: src/commands/check.md:466 msgid "" "If you want to keep the job green and surface offenders as a build " "annotation while you reduce the count, swap in `--no-fail`:" @@ -8770,19 +9151,19 @@ msgstr "" "違反数を減らしている間、ジョブをグリーンに保ちつつ違反をビルド注釈として表示" "したい場合は、`--no-fail` に置き換えます。" -#: src/commands/check.md:460 +#: src/commands/check.md:470 msgid "Surface complexity hot spots (non-blocking)" msgstr "Surface complexity hot spots (non-blocking)" -#: src/commands/check.md:461 +#: src/commands/check.md:471 msgid " bca check --paths src/ --no-fail\n" msgstr " bca check --paths src/ --no-fail\n" -#: src/commands/check.md:465 +#: src/commands/check.md:475 msgid "Exporting offender records" msgstr "違反レコードのエクスポート" -#: src/commands/check.md:467 +#: src/commands/check.md:477 msgid "" "`bca check` also emits a single CI/IDE document covering every offender in " "the walk. Pass `--report-format ` to pick the shape and `--output " @@ -8798,105 +9179,105 @@ msgstr "" "削除されます。終了コードの契約はこれらのフラグの影響を受けません。クリーンな" "ら 0、違反があれば 2(`--no-fail` 時を除く)、ツールエラーなら 1 です。" -#: src/commands/check.md:475 +#: src/commands/check.md:485 msgid "" -"When `--output` is given without `--report-format`, the format is **inferred " -"from the output extension**: `.sarif` selects `sarif` and `.xml` selects " -"`checkstyle`. An extension with no unique format (notably `.json`, which " -"both `sarif` and `code-climate` produce) or no extension at all is a usage " -"error (exit `1`) naming `--report-format` — an explicit `--output` is never " -"silently ignored. An explicit `--report-format` always wins over the " +"When `--output` is given without `--report-format`, the format is " +"**inferred from the output extension**: `.sarif` selects `sarif` and `.xml` " +"selects `checkstyle`. An extension with no unique format (notably `.json`, " +"which both `sarif` and `code-climate` produce) or no extension at all is a " +"usage error (exit `1`) naming `--report-format` — an explicit `--output` is " +"never silently ignored. An explicit `--report-format` always wins over the " "extension." msgstr "" "`--report-format` なしで `--output` が指定された場合、フォーマットは**出力" "ファイルの拡張子から推定**されます。`.sarif` は `sarif` を、`.xml` は " "`checkstyle` を選択します。一意なフォーマットに対応しない拡張子(特に " -"`sarif` と `code-climate` の両方が生成する `.json`)や拡張子なしの場合は、`--" -"report-format` を挙げる使用方法エラー(終了コード `1`)になります — 明示的な " -"`--output` が黙って無視されることは決してありません。明示的な `--report-" -"format` は常に拡張子より優先されます。" +"`sarif` と `code-climate` の両方が生成する `.json`)や拡張子なしの場合は、" +"`--report-format` を挙げる使用方法エラー(終了コード `1`)になります — 明示" +"的な `--output` が黙って無視されることは決してありません。明示的な `--" +"report-format` は常に拡張子より優先されます。" -#: src/commands/check.md:483 +#: src/commands/check.md:493 msgid "Format" msgstr "フォーマット" -#: src/commands/check.md:485 +#: src/commands/check.md:495 msgid "`checkstyle`" msgstr "`checkstyle`" -#: src/commands/check.md:485 +#: src/commands/check.md:495 msgid "Jenkins, SonarQube, GitLab, \"warnings plugin\" CI" msgstr "Jenkins、SonarQube、GitLab、\"warnings plugin\" 系 CI" -#: src/commands/check.md:486 +#: src/commands/check.md:496 msgid "`sarif`" msgstr "`sarif`" -#: src/commands/check.md:486 +#: src/commands/check.md:496 msgid "GitHub Code Scanning, modern IDEs / security tooling" msgstr "GitHub Code Scanning、モダンな IDE / セキュリティツール" -#: src/commands/check.md:487 +#: src/commands/check.md:497 msgid "`code-climate`" msgstr "`code-climate`" -#: src/commands/check.md:487 +#: src/commands/check.md:497 msgid "GitLab MR Code Quality widget" msgstr "GitLab MR の Code Quality ウィジェット" -#: src/commands/check.md:488 +#: src/commands/check.md:498 msgid "`clang-warning`" msgstr "`clang-warning`" -#: src/commands/check.md:488 +#: src/commands/check.md:498 msgid "Editor quickfix parsers, GitHub Actions problem matcher" msgstr "エディタの quickfix パーサー、GitHub Actions の problem matcher" -#: src/commands/check.md:489 +#: src/commands/check.md:499 msgid "`msvc-warning`" msgstr "`msvc-warning`" -#: src/commands/check.md:489 +#: src/commands/check.md:499 msgid "Visual Studio, VS Code, Windows CI runners" msgstr "Visual Studio、VS Code、Windows CI ランナー" -#: src/commands/check.md:491 +#: src/commands/check.md:501 msgid "" "When no offenders exist the writer emits a well-formed but empty document — " "empty `runs[].results` array for SARIF, empty JSON array (`[]`) for Code " "Climate, no `` children under the `` root for Checkstyle, " -"and zero bytes for the two warning-line formats — so CI consumers can ingest " -"clean runs unchanged." +"and zero bytes for the two warning-line formats — so CI consumers can " +"ingest clean runs unchanged." msgstr "" "違反が存在しない場合、ライターは整形式だが空のドキュメントを出力します — " "SARIF では空の `runs[].results` 配列、Code Climate では空の JSON 配列" -"(`[]`)、Checkstyle では `` ルート直下に `` 子要素なし、2 " -"つの警告行フォーマットでは 0 バイト — これにより CI コンシューマーは違反のな" -"い実行結果もそのまま取り込めます。" +"(`[]`)、Checkstyle では `` ルート直下に `` 子要素なし、" +"2 つの警告行フォーマットでは 0 バイト — これにより CI コンシューマーは違反の" +"ない実行結果もそのまま取り込めます。" -#: src/commands/check.md:498 +#: src/commands/check.md:508 msgid "Checkstyle (CI integration)" msgstr "Checkstyle(CI 統合)" -#: src/commands/check.md:507 +#: src/commands/check.md:517 msgid "" -"The Checkstyle writer emits a single `` document " -"containing one `` element per source path, each holding one `` " -"per metric-threshold violation. The schema is the Checkstyle 4.3 XSD that " -"Jenkins and SonarQube's \"Warnings Next Generation\" / \"Generic Issue\" " -"importers consume directly." +"The Checkstyle writer emits a single `` " +"document containing one `` element per source path, each holding one " +"`` per metric-threshold violation. The schema is the Checkstyle 4.3 " +"XSD that Jenkins and SonarQube's \"Warnings Next Generation\" / \"Generic " +"Issue\" importers consume directly." msgstr "" "Checkstyle ライターは、ソースパスごとに 1 つの `` 要素を含む単一の " -"`` ドキュメントを出力し、各 `` はメトリクス" -"しきい値違反ごとに 1 つの `` を保持します。スキーマは Checkstyle 4.3 " -"の XSD で、Jenkins および SonarQube の「Warnings Next Generation」/「Generic " -"Issue」インポーターが直接取り込めます。" +"`` ドキュメントを出力し、各 `` はメトリク" +"スしきい値違反ごとに 1 つの `` を保持します。スキーマは Checkstyle " +"4.3 の XSD で、Jenkins および SonarQube の「Warnings Next Generation」/" +"「Generic Issue」インポーターが直接取り込めます。" -#: src/commands/check.md:513 +#: src/commands/check.md:523 msgid "SARIF (GitHub Code Scanning)" msgstr "SARIF(GitHub Code Scanning)" -#: src/commands/check.md:522 +#: src/commands/check.md:532 msgid "" "The SARIF writer emits a single SARIF 2.1.0 JSON document with one `runs[]` " "element. Each metric-threshold violation becomes a `result` under `runs[0]." @@ -8905,78 +9286,78 @@ msgid "" msgstr "" "SARIF ライターは、1 つの `runs[]` 要素を持つ単一の SARIF 2.1.0 JSON ドキュメ" "ントを出力します。各メトリクスしきい値違反は `runs[0].results[]` 配下の " -"`result` になり、実行結果に現れるメトリクス名は重複排除されて、短い説明ととも" -"に `runs[0].tool.driver.rules[]` に格納されます。" +"`result` になり、実行結果に現れるメトリクス名は重複排除されて、短い説明とと" +"もに `runs[0].tool.driver.rules[]` に格納されます。" -#: src/commands/check.md:528 +#: src/commands/check.md:538 msgid "To upload a SARIF file to GitHub Code Scanning from a workflow:" msgstr "" "ワークフローから GitHub Code Scanning に SARIF ファイルをアップロードするに" "は:" -#: src/commands/check.md:531 +#: src/commands/check.md:541 msgid "bca-sarif" msgstr "bca-sarif" -#: src/commands/check.md:532 src/commands/check.md:633 +#: src/commands/check.md:542 src/commands/check.md:643 msgid "push" msgstr "push" -#: src/commands/check.md:532 src/commands/check.md:633 src/recipes/ci.md:224 +#: src/commands/check.md:542 src/commands/check.md:643 src/recipes/ci.md:224 msgid "pull_request" msgstr "pull_request" -#: src/commands/check.md:532 src/commands/check.md:633 src/recipes/ci.md:225 +#: src/commands/check.md:542 src/commands/check.md:643 src/recipes/ci.md:225 msgid "jobs" msgstr "jobs" -#: src/commands/check.md:534 +#: src/commands/check.md:544 msgid "scan" msgstr "scan" -#: src/commands/check.md:535 src/commands/check.md:636 src/recipes/ci.md:228 +#: src/commands/check.md:545 src/commands/check.md:646 src/recipes/ci.md:228 msgid "runs-on" msgstr "runs-on" -#: src/commands/check.md:535 src/commands/check.md:636 src/recipes/ci.md:228 +#: src/commands/check.md:545 src/commands/check.md:646 src/recipes/ci.md:228 msgid "ubuntu-latest" msgstr "ubuntu-latest" -#: src/commands/check.md:536 src/recipes/ci.md:229 +#: src/commands/check.md:546 src/recipes/ci.md:229 msgid "permissions" msgstr "permissions" -#: src/commands/check.md:537 +#: src/commands/check.md:547 msgid "security-events" msgstr "security-events" -#: src/commands/check.md:537 src/recipes/ci.md:230 +#: src/commands/check.md:547 src/recipes/ci.md:230 msgid "write" msgstr "write" -#: src/commands/check.md:538 src/commands/check.md:637 src/recipes/ci.md:111 +#: src/commands/check.md:548 src/commands/check.md:647 src/recipes/ci.md:111 #: src/recipes/ci.md:231 msgid "steps" msgstr "steps" -#: src/commands/check.md:539 src/commands/check.md:547 -#: src/commands/check.md:638 src/recipes/ci.md:121 src/recipes/ci.md:177 +#: src/commands/check.md:549 src/commands/check.md:557 +#: src/commands/check.md:648 src/recipes/ci.md:121 src/recipes/ci.md:177 #: src/recipes/ci.md:185 src/recipes/ci.md:195 src/recipes/ci.md:232 #: src/recipes/ci.md:234 src/recipes/ci.md:246 src/recipes/ci.md:344 #: src/recipes/ci.md:494 src/python/sarif.md:77 msgid "uses" msgstr "uses" -#: src/commands/check.md:539 src/commands/check.md:638 src/recipes/ci.md:232 +#: src/commands/check.md:549 src/commands/check.md:648 src/recipes/ci.md:232 #: src/recipes/ci.md:344 src/recipes/ci.md:494 msgid "actions/checkout@v4" msgstr "actions/checkout@v4" -#: src/commands/check.md:540 src/commands/check.md:641 +#: src/commands/check.md:550 src/commands/check.md:651 msgid "Run big-code-analysis" msgstr "Run big-code-analysis" -#: src/commands/check.md:541 +#: src/commands/check.md:551 msgid "" " bca check --paths . \\\n" " --report-format sarif \\\n" @@ -8988,43 +9369,43 @@ msgstr "" " --output report.sarif.json \\\n" " --no-fail\n" -#: src/commands/check.md:546 +#: src/commands/check.md:556 msgid "Upload SARIF" msgstr "Upload SARIF" -#: src/commands/check.md:547 src/python/sarif.md:77 +#: src/commands/check.md:557 src/python/sarif.md:77 msgid "github/codeql-action/upload-sarif@v3" msgstr "github/codeql-action/upload-sarif@v3" -#: src/commands/check.md:548 src/recipes/ci.md:122 src/recipes/ci.md:178 +#: src/commands/check.md:558 src/recipes/ci.md:122 src/recipes/ci.md:178 #: src/recipes/ci.md:196 src/recipes/ci.md:235 src/recipes/ci.md:247 #: src/recipes/ci.md:345 src/recipes/ci.md:495 src/python/sarif.md:78 msgid "with" msgstr "with" -#: src/commands/check.md:549 src/python/sarif.md:79 +#: src/commands/check.md:559 src/python/sarif.md:79 msgid "sarif_file" msgstr "sarif_file" -#: src/commands/check.md:549 +#: src/commands/check.md:559 msgid "report.sarif.json" msgstr "report.sarif.json" -#: src/commands/check.md:552 +#: src/commands/check.md:562 msgid "" "`--no-fail` keeps the job green so the SARIF upload step still runs when " "offenders exist; remove it once you want a metric regression to fail the " "workflow." msgstr "" -"`--no-fail` はジョブを成功(グリーン)のまま保つため、違反が存在しても SARIF " -"アップロードステップは実行されます。メトリクスの悪化でワークフローを失敗させ" -"たくなったら外してください。" +"`--no-fail` はジョブを成功(グリーン)のまま保つため、違反が存在しても " +"SARIF アップロードステップは実行されます。メトリクスの悪化でワークフローを失" +"敗させたくなったら外してください。" -#: src/commands/check.md:556 +#: src/commands/check.md:566 msgid "GitLab Code Quality (Code Climate JSON)" msgstr "GitLab Code Quality(Code Climate JSON)" -#: src/commands/check.md:565 +#: src/commands/check.md:575 msgid "" "The Code Climate writer emits a single JSON array of issue objects matching " "[GitLab's strict subset](https://docs.gitlab.com/ci/testing/code_quality/) " @@ -9032,8 +9413,8 @@ msgid "" "violation, no byte-order-mark, one trailing newline (empty input renders as " "`[]\\n`). Each issue carries a namespaced `check_name` (`big-code-analysis/" "`), a stable SHA-256 `fingerprint` over `path \\0 function \\0 " -"metric` (line- and value-insensitive so cosmetic edits still dedup in the MR " -"widget), and a `severity` mapped from the value/threshold ratio onto " +"metric` (line- and value-insensitive so cosmetic edits still dedup in the " +"MR widget), and a `severity` mapped from the value/threshold ratio onto " "GitLab's five-level enum: `≤ 1.5×` → `minor`, `≤ 2×` → `major`, `≤ 4×` → " "`critical`, `> 4×` → `blocker` (inverted for the `mi.*` family where lower " "is worse). The full enum is `info`/`minor`/`major`/`critical`/`blocker`; " @@ -9043,100 +9424,100 @@ msgstr "" "Code Climate ライターは、上流の Code Climate エンジン仕様に対する [GitLab の" "厳密なサブセット](https://docs.gitlab.com/ci/testing/code_quality/)に適合す" "る issue オブジェクトの単一 JSON 配列を出力します — メトリクスしきい値違反ご" -"とに 1 エントリ、バイトオーダーマークなし、末尾の改行 1 つ(入力が空の場合は " -"`[]\\n` になります)。各 issue には、名前空間付きの `check_name`(`big-code-" -"analysis/`)、`path \\0 function \\0 metric` に対する安定した " -"SHA-256 の `fingerprint`(行番号にも値にも依存しないため、体裁だけの編集でも " -"MR ウィジェットでの重複排除が維持されます)、そして値としきい値の比率を " +"とに 1 エントリ、バイトオーダーマークなし、末尾の改行 1 つ(入力が空の場合" +"は `[]\\n` になります)。各 issue には、名前空間付きの `check_name`(`big-" +"code-analysis/`)、`path \\0 function \\0 metric` に対する安定した " +"SHA-256 の `fingerprint`(行番号にも値にも依存しないため、体裁だけの編集で" +"も MR ウィジェットでの重複排除が維持されます)、そして値としきい値の比率を " "GitLab の 5 段階 enum に対応付けた `severity` が含まれます: `≤ 1.5×` → " "`minor`、`≤ 2×` → `major`、`≤ 4×` → `critical`、`> 4×` → `blocker`(値が低い" "ほど悪い `mi.*` ファミリーでは反転)。enum の全体は `info`/`minor`/`major`/" "`critical`/`blocker` ですが、`bca` が `info` を出力することはありません — し" "きい値違反は常に `minor` 以上になります。" -#: src/commands/check.md:580 +#: src/commands/check.md:590 msgid "To wire the artifact into GitLab's MR Code Quality widget:" msgstr "" "アーティファクトを GitLab の MR Code Quality ウィジェットに接続するには:" -#: src/commands/check.md:583 src/recipes/ci.md:753 +#: src/commands/check.md:593 src/recipes/ci.md:753 msgid "code_quality" msgstr "code_quality" -#: src/commands/check.md:584 src/recipes/ci.md:673 src/recipes/ci.md:754 +#: src/commands/check.md:594 src/recipes/ci.md:673 src/recipes/ci.md:754 #: src/recipes/ci.md:796 msgid "stage" msgstr "stage" -#: src/commands/check.md:584 src/recipes/ci.md:663 src/recipes/ci.md:673 +#: src/commands/check.md:594 src/recipes/ci.md:663 src/recipes/ci.md:673 #: src/recipes/ci.md:754 src/recipes/ci.md:796 msgid "quality" msgstr "quality" -#: src/commands/check.md:585 src/recipes/ci.md:755 src/recipes/ci.md:803 +#: src/commands/check.md:595 src/recipes/ci.md:755 src/recipes/ci.md:803 #: src/recipes/baselines.md:92 msgid "script" msgstr "script" -#: src/commands/check.md:586 src/recipes/ci.md:756 +#: src/commands/check.md:596 src/recipes/ci.md:756 msgid "bca check --paths \"$CI_PROJECT_DIR\"" msgstr "bca check --paths \"$CI_PROJECT_DIR\"" -#: src/commands/check.md:587 src/recipes/ci.md:702 src/recipes/ci.md:757 +#: src/commands/check.md:597 src/recipes/ci.md:702 src/recipes/ci.md:757 msgid "--report-format code-climate" msgstr "--report-format code-climate" -#: src/commands/check.md:588 src/recipes/ci.md:703 src/recipes/ci.md:758 +#: src/commands/check.md:598 src/recipes/ci.md:703 src/recipes/ci.md:758 msgid "--output gl-code-quality-report.json" msgstr "--output gl-code-quality-report.json" -#: src/commands/check.md:589 src/recipes/ci.md:704 src/recipes/ci.md:710 +#: src/commands/check.md:599 src/recipes/ci.md:704 src/recipes/ci.md:710 #: src/recipes/ci.md:759 msgid "--no-fail" msgstr "--no-fail" -#: src/commands/check.md:590 src/recipes/ci.md:720 src/recipes/ci.md:760 +#: src/commands/check.md:600 src/recipes/ci.md:720 src/recipes/ci.md:760 msgid "artifacts" msgstr "artifacts" -#: src/commands/check.md:591 src/recipes/ci.md:721 src/recipes/ci.md:761 +#: src/commands/check.md:601 src/recipes/ci.md:721 src/recipes/ci.md:761 msgid "when" msgstr "when" -#: src/commands/check.md:591 src/recipes/ci.md:721 src/recipes/ci.md:761 +#: src/commands/check.md:601 src/recipes/ci.md:721 src/recipes/ci.md:761 msgid "always" msgstr "always" -#: src/commands/check.md:592 src/recipes/ci.md:722 src/recipes/ci.md:762 +#: src/commands/check.md:602 src/recipes/ci.md:722 src/recipes/ci.md:762 msgid "reports" msgstr "reports" -#: src/commands/check.md:593 src/recipes/ci.md:723 src/recipes/ci.md:763 +#: src/commands/check.md:603 src/recipes/ci.md:723 src/recipes/ci.md:763 msgid "codequality" msgstr "codequality" -#: src/commands/check.md:593 src/commands/check.md:595 src/recipes/ci.md:723 +#: src/commands/check.md:603 src/commands/check.md:605 src/recipes/ci.md:723 #: src/recipes/ci.md:725 src/recipes/ci.md:763 src/recipes/ci.md:765 msgid "gl-code-quality-report.json" msgstr "gl-code-quality-report.json" -#: src/commands/check.md:594 src/recipes/ci.md:679 src/recipes/ci.md:724 +#: src/commands/check.md:604 src/recipes/ci.md:679 src/recipes/ci.md:724 #: src/recipes/ci.md:764 msgid "paths" msgstr "paths" -#: src/commands/check.md:598 +#: src/commands/check.md:608 msgid "" "See the [GitLab Code Quality widget recipe](../recipes/ci.md#gitlab-code-" "quality-widget) for the full pipeline (combined Code Climate + Checkstyle + " "Markdown report) and a local `jq` smoke check." msgstr "" -"パイプライン全体(Code Climate + Checkstyle + Markdown レポートの組み合わせ)" -"とローカルでの `jq` によるスモークチェックについては、[GitLab Code Quality " -"ウィジェットのレシピ](../recipes/ci.md#gitlab-code-quality-widget)を参照して" -"ください。" +"パイプライン全体(Code Climate + Checkstyle + Markdown レポートの組み合わ" +"せ)とローカルでの `jq` によるスモークチェックについては、[GitLab Code " +"Quality ウィジェットのレシピ](../recipes/ci.md#gitlab-code-quality-widget)を" +"参照してください。" -#: src/commands/check.md:603 +#: src/commands/check.md:613 msgid "" "`--no-fail` keeps the job green so the Code Quality report still uploads " "when offenders exist; remove it once you want a metric regression to fail " @@ -9146,11 +9527,11 @@ msgstr "" "Quality レポートはアップロードされます。メトリクスの悪化でパイプラインを失敗" "させたくなったら外してください。" -#: src/commands/check.md:607 +#: src/commands/check.md:617 msgid "Clang/GCC warning lines (editor quickfix and CI annotators)" msgstr "Clang/GCC 警告行(エディタの quickfix と CI アノテーター)" -#: src/commands/check.md:616 +#: src/commands/check.md:626 msgid "" "The Clang format emits one offender per line in the conventional compiler-" "warning shape:" @@ -9158,43 +9539,43 @@ msgstr "" "Clang フォーマットは、慣例的なコンパイラ警告の形式で違反を 1 行に 1 件ずつ出" "力します:" -#: src/commands/check.md:623 +#: src/commands/check.md:633 msgid "" "This is the format `clang -fdiagnostics-format=` produces and the shape " -"every editor quickfix parser (VS Code, IntelliJ, Vim) and most CI annotators " -"understand without configuration." +"every editor quickfix parser (VS Code, IntelliJ, Vim) and most CI " +"annotators understand without configuration." msgstr "" -"これは `clang -fdiagnostics-format=` が生成するフォーマットであり、あらゆるエ" -"ディタの quickfix パーサー(VS Code、IntelliJ、Vim)と大半の CI アノテーター" -"が設定なしで解釈できる形式です。" +"これは `clang -fdiagnostics-format=` が生成するフォーマットであり、あらゆる" +"エディタの quickfix パーサー(VS Code、IntelliJ、Vim)と大半の CI アノテー" +"ターが設定なしで解釈できる形式です。" -#: src/commands/check.md:627 +#: src/commands/check.md:637 msgid "" "GitHub Actions surfaces the lines as inline annotations on the PR diff via " "the built-in GCC problem matcher (or any community `compiler-problem-" "matchers` action):" msgstr "" "GitHub Actions は、組み込みの GCC problem matcher(または任意のコミュニティ" -"製 `compiler-problem-matchers` アクション)を介して、これらの行を PR の差分上" -"のインラインアノテーションとして表示します:" +"製 `compiler-problem-matchers` アクション)を介して、これらの行を PR の差分" +"上のインラインアノテーションとして表示します:" -#: src/commands/check.md:632 +#: src/commands/check.md:642 msgid "bca-clang-warnings" msgstr "bca-clang-warnings" -#: src/commands/check.md:635 +#: src/commands/check.md:645 msgid "lint" msgstr "lint" -#: src/commands/check.md:639 +#: src/commands/check.md:649 msgid "Enable GCC problem matcher" msgstr "Enable GCC problem matcher" -#: src/commands/check.md:640 +#: src/commands/check.md:650 msgid "echo \"::add-matcher::$RUNNER_TOOL_CACHE/problem-matchers/gcc.json\"" msgstr "echo \"::add-matcher::$RUNNER_TOOL_CACHE/problem-matchers/gcc.json\"" -#: src/commands/check.md:642 +#: src/commands/check.md:652 msgid "" " bca check --paths . \\\n" " --report-format clang-warning \\\n" @@ -9204,28 +9585,29 @@ msgstr "" " --report-format clang-warning \\\n" " --no-fail\n" -#: src/commands/check.md:648 +#: src/commands/check.md:658 msgid "" -"If your runner does not ship a GCC matcher, fall back to streaming the lines " -"and re-emitting them as `::warning file=...,line=...::` workflow commands." +"If your runner does not ship a GCC matcher, fall back to streaming the " +"lines and re-emitting them as `::warning file=...,line=...::` workflow " +"commands." msgstr "" -"ランナーに GCC matcher が同梱されていない場合は、これらの行をストリーム処理し" -"て `::warning file=...,line=...::` ワークフローコマンドとして再出力する方法に" -"フォールバックしてください。" +"ランナーに GCC matcher が同梱されていない場合は、これらの行をストリーム処理" +"して `::warning file=...,line=...::` ワークフローコマンドとして再出力する方" +"法にフォールバックしてください。" -#: src/commands/check.md:652 +#: src/commands/check.md:662 msgid "MSVC warning lines (Visual Studio and Windows CI)" msgstr "MSVC 警告行(Visual Studio と Windows CI)" -#: src/commands/check.md:661 +#: src/commands/check.md:671 msgid "" "The MSVC format emits one offender per line in Visual Studio's `cl.exe` " "diagnostic shape:" msgstr "" -"MSVC フォーマットは、Visual Studio の `cl.exe` 診断形式で違反を 1 行に 1 件ず" -"つ出力します:" +"MSVC フォーマットは、Visual Studio の `cl.exe` 診断形式で違反を 1 行に 1 件" +"ずつ出力します:" -#: src/commands/check.md:668 +#: src/commands/check.md:678 msgid "" "Note the space before the colon after `warning`/`error` — that is the MSVC " "convention. On Windows the path is normalized to use `\\` separators " @@ -9234,41 +9616,41 @@ msgid "" "(Azure Pipelines, GitHub Actions on `windows-latest`) parse these inline " "without extra configuration." msgstr "" -"`warning`/`error` の後のコロンの前にスペースがある点に注意してください — これ" -"が MSVC の慣例です。Windows ではパスは `\\` 区切りに正規化されます(cl.exe の" -"出力に一致)。それ以外のプラットフォームではパスはそのまま出力されます。" -"Visual Studio、C/C++ 拡張機能を入れた VS Code、および Windows CI ランナー" -"(Azure Pipelines、`windows-latest` 上の GitHub Actions)は、追加設定なしでこ" -"れらをインラインで解釈します。" +"`warning`/`error` の後のコロンの前にスペースがある点に注意してください — こ" +"れが MSVC の慣例です。Windows ではパスは `\\` 区切りに正規化されます(cl." +"exe の出力に一致)。それ以外のプラットフォームではパスはそのまま出力されま" +"す。Visual Studio、C/C++ 拡張機能を入れた VS Code、および Windows CI ラン" +"ナー(Azure Pipelines、`windows-latest` 上の GitHub Actions)は、追加設定な" +"しでこれらをインラインで解釈します。" #: src/commands/suppression.md:3 msgid "" "In-source suppression markers silence threshold violations without editing " -"the offending function or excluding the file from the walk. Drop a marker in " -"any comment in the source file and `bca check` treats the covered metrics as " -"if they were within limits for that scope. Metric computation is unaffected " -"— raw `bca metrics` output still reports every number. Suppression is a " -"measurement-display concern: `bca check` drops the covered violations from " -"the gate, and `bca report markdown|html` omits the covered functions from " -"the matching hotspot tables by default (pass `bca report --no-suppress` for " -"the raw audit view — see [report](report.md))." +"the offending function or excluding the file from the walk. Drop a marker " +"in any comment in the source file and `bca check` treats the covered " +"metrics as if they were within limits for that scope. Metric computation is " +"unaffected — raw `bca metrics` output still reports every number. " +"Suppression is a measurement-display concern: `bca check` drops the covered " +"violations from the gate, and `bca report markdown|html` omits the covered " +"functions from the matching hotspot tables by default (pass `bca report --" +"no-suppress` for the raw audit view — see [report](report.md))." msgstr "" "ソース内抑制マーカーは、違反している関数を編集したり、ファイルを走査から除外" "したりすることなく、しきい値違反を沈黙させます。ソースファイル内の任意のコメ" "ントにマーカーを置くと、`bca check` は対象のメトリクスがそのスコープでは制限" -"内にあるものとして扱います。メトリクスの計算自体には影響しません — 生の `bca " -"metrics` 出力は引き続きすべての数値を報告します。抑制は測定結果の表示に関する" -"仕組みです: `bca check` は対象の違反をゲートから除外し、`bca report markdown|" -"html` はデフォルトで該当するホットスポットテーブルから対象の関数を省略します" -"(生の監査ビューが必要な場合は `bca report --no-suppress` を渡してください — " -"[report](report.md) を参照)。" +"内にあるものとして扱います。メトリクスの計算自体には影響しません — 生の " +"`bca metrics` 出力は引き続きすべての数値を報告します。抑制は測定結果の表示に" +"関する仕組みです: `bca check` は対象の違反をゲートから除外し、`bca report " +"markdown|html` はデフォルトで該当するホットスポットテーブルから対象の関数を" +"省略します(生の監査ビューが必要な場合は `bca report --no-suppress` を渡して" +"ください — [report](report.md) を参照)。" #: src/commands/suppression.md:14 msgid "" "Markers exist for the cases editing the code is not an option: generated-" -"style legacy modules awaiting rewrite, accepted exceptions documented in the " -"comment, and migration from [Lizard](https://github.com/terryyin/lizard)'s " -"`#lizard forgives` convention." +"style legacy modules awaiting rewrite, accepted exceptions documented in " +"the comment, and migration from [Lizard](https://github.com/terryyin/" +"lizard)'s `#lizard forgives` convention." msgstr "" "マーカーは、コードの編集が選択肢にならないケースのために存在します: 書き直し" "待ちの生成コード的なレガシーモジュール、コメントに文書化された承認済みの例" @@ -9286,8 +9668,8 @@ msgid "" "(`SuppressionPolicy`, `FuncSpace::suppressed`, `--no-suppress`). Four forms:" msgstr "" "ネイティブ方言は `bca:` 名前空間と `suppress` 動詞を使用し、プロジェクト内部" -"の「suppression(抑制)」語彙(`SuppressionPolicy`、`FuncSpace::suppressed`、" -"`--no-suppress`)と一致しています。形式は 4 つあります:" +"の「suppression(抑制)」語彙(`SuppressionPolicy`、`FuncSpace::" +"suppressed`、`--no-suppress`)と一致しています。形式は 4 つあります:" #: src/commands/suppression.md:27 msgid "Marker" @@ -9336,9 +9718,9 @@ msgstr "" "`FuncSpace`([`FuncSpace` の rustdoc](https://docs.rs/big-code-analysis/*/" "big_code_analysis/spaces/struct.FuncSpace.html) を参照)に付与されます。どの" "関数本体にも含まれない関数スコープのマーカーは黙って無視されます。ファイル全" -"体を沈黙させるには、明示的な `suppress-file` 動詞を使用してください。ファイル" -"スコープのマーカーはソース内のどこに書いても構いません — 「先頭 N 行以内に書" -"かなければならない」といった規則はありません。" +"体を沈黙させるには、明示的な `suppress-file` 動詞を使用してください。ファイ" +"ルスコープのマーカーはソース内のどこに書いても構いません — 「先頭 N 行以内に" +"書かなければならない」といった規則はありません。" #: src/commands/suppression.md:42 msgid "`bca: suppress` — function-scoped, all metrics (Rust)" @@ -9358,7 +9740,8 @@ msgid "/* ... */" msgstr "/* ... */" #: src/commands/suppression.md:52 -msgid "`bca: suppress(metric, ...)` — function-scoped, listed metrics (Python)" +msgid "" +"`bca: suppress(metric, ...)` — function-scoped, listed metrics (Python)" msgstr "" "`bca: suppress(metric, ...)` — 関数スコープ、列挙したメトリクス(Python)" @@ -9387,8 +9770,8 @@ msgid "" "// Hand-tuned hot path; do not rewrite to satisfy thresholds.\n" msgstr "" "// bca: suppress-file\n" -"// 手動チューニングされたホットパス。しきい値を満たすための書き換えはしないこ" -"と。\n" +"// 手動チューニングされたホットパス。しきい値を満たすための書き換えはしない" +"こと。\n" #: src/commands/suppression.md:73 msgid "`bca: suppress-file(metric, ...)` — file-scoped, listed metrics (C++)" @@ -9425,14 +9808,14 @@ msgstr "" "**まずはより狭いツールを検討してください。** [しきい値スコープ](./check." "md#threshold-scope)(#969)以降、メトリクスのファイル全体または `impl` 全体" "の _集計値_ が関数ごとの制限として発火することはなくなったため、`suppress-" -"file` に手が伸びる最も一般的な理由 — ファイルレベルの `halstead` / `nargs` / " -"`nexits` / `nom` の合計を黙らせること — はなくなりました。`suppress-file` " -"は、ファイル内の _すべての_ 関数についてそのメトリクスを本当に沈黙させたい場" -"合にのみ使ってください。どうしても複雑にならざるを得ない関数を 1 つだけ除外す" -"るには、その内部に関数スコープの `bca: suppress(...)` を書きます。将来の悪化" -"に対してゲートを盲目にせずに既存の違反を容認するには、[ベースライン](./check." -"md)エントリを推奨します。ベースラインは、関数が記録された値より _悪化_ した時" -"点で再び発火します。" +"file` に手が伸びる最も一般的な理由 — ファイルレベルの `halstead` / " +"`nargs` / `nexits` / `nom` の合計を黙らせること — はなくなりました。" +"`suppress-file` は、ファイル内の _すべての_ 関数についてそのメトリクスを本当" +"に沈黙させたい場合にのみ使ってください。どうしても複雑にならざるを得ない関数" +"を 1 つだけ除外するには、その内部に関数スコープの `bca: suppress(...)` を書" +"きます。将来の悪化に対してゲートを盲目にせずに既存の違反を容認するには、" +"[ベースライン](./check.md)エントリを推奨します。ベースラインは、関数が記録さ" +"れた値より _悪化_ した時点で再び発火します。" #: src/commands/suppression.md:92 msgid "Lizard compatibility markers" @@ -9470,11 +9853,11 @@ msgid "" "list has no Lizard analogue — every Lizard-style marker silences every " "metric." msgstr "" -"互換レイヤーは意図的に狭くしてあります: 受け付けるのはこの 2 つの形だけです。" -"その他の Lizard ディレクティブは通常のコメントとして解釈されます。Lizard には" -"メトリクス単位のスコープ指定がないため、ネイティブ形式の `bca: " -"suppress(metric, ...)` リストに相当するものは Lizard にはありません — Lizard " -"形式のマーカーはすべてのメトリクスを沈黙させます。" +"互換レイヤーは意図的に狭くしてあります: 受け付けるのはこの 2 つの形だけで" +"す。その他の Lizard ディレクティブは通常のコメントとして解釈されます。" +"Lizard にはメトリクス単位のスコープ指定がないため、ネイティブ形式の `bca: " +"suppress(metric, ...)` リストに相当するものは Lizard にはありません — " +"Lizard 形式のマーカーはすべてのメトリクスを沈黙させます。" #: src/commands/suppression.md:108 msgid "" @@ -9482,8 +9865,8 @@ msgid "" "generated-code auto-skip mechanism (see [Skipping generated code](index." "html#skipping-generated-code) and the `--no-skip-generated` flag)." msgstr "" -"Lizard の `GENERATED CODE` マーカーはここでは扱い**ません**。これは生成コード" -"の自動スキップ機構の一部です([生成コードのスキップ](index.html#skipping-" +"Lizard の `GENERATED CODE` マーカーはここでは扱い**ません**。これは生成コー" +"ドの自動スキップ機構の一部です([生成コードのスキップ](index.html#skipping-" "generated-code)と `--no-skip-generated` フラグを参照)。" #: src/commands/suppression.md:113 @@ -9567,8 +9950,8 @@ msgid "" "These match the threshold names and the JSON field names emitted on " "`CodeMetrics`, with one deliberate exclusion:" msgstr "" -"これらは、しきい値名および `CodeMetrics` に出力される JSON フィールド名と一致" -"しますが、意図的な除外が 1 つあります:" +"これらは、しきい値名および `CodeMetrics` に出力される JSON フィールド名と一" +"致しますが、意図的な除外が 1 つあります:" #: src/commands/suppression.md:133 msgid "" @@ -9579,8 +9962,8 @@ msgid "" msgstr "" "`nexits` が正規の綴りです — `bca: suppress(nexits)` は `nexits` のしきい値違" "反を沈黙させます。レガシーの `exit` エイリアスは #555 で廃止され、もう受け付" -"けられません。`exit` と綴ると未知の識別子となり、警告が出た上で _マーカー全体" -"が無効になります_(下記参照)。" +"けられません。`exit` と綴ると未知の識別子となり、警告が出た上で _マーカー全" +"体が無効になります_(下記参照)。" #: src/commands/suppression.md:137 msgid "" @@ -9591,8 +9974,8 @@ msgid "" msgstr "" "`tokens` はしきい値チェック可能なメトリクス(かつ `CodeMetrics` の JSON " "フィールド)ですが、意図的に抑制リストから外されています: マーカーで無効化す" -"ることはできません。`tokens` は保守性のヒューリスティックではなく、ハードなリ" -"ソース上限として扱ってください。" +"ることはできません。`tokens` は保守性のヒューリスティックではなく、ハードな" +"リソース上限として扱ってください。" #: src/commands/suppression.md:142 msgid "" @@ -9600,31 +9983,31 @@ msgid "" "threshold under it (`halstead.volume`, `halstead.effort`, ...); suppression " "vocabulary has no dotted form." msgstr "" -"ファミリー(例えば `halstead`)を沈黙させると、その配下のすべてのサブメトリク" -"スしきい値(`halstead.volume`、`halstead.effort` など)が対象になります。抑制" -"の語彙にドット付きの形式はありません。" +"ファミリー(例えば `halstead`)を沈黙させると、その配下のすべてのサブメトリ" +"クスしきい値(`halstead.volume`、`halstead.effort` など)が対象になります。" +"抑制の語彙にドット付きの形式はありません。" #: src/commands/suppression.md:146 msgid "" "Unknown identifiers in a `bca: suppress(...)` list emit a stderr warning of " "the form" msgstr "" -"`bca: suppress(...)` リスト内の未知の識別子は、次の形式の stderr 警告を出力し" -"ます" +"`bca: suppress(...)` リスト内の未知の識別子は、次の形式の stderr 警告を出力" +"します" #: src/commands/suppression.md:153 msgid "" -"The marker is dropped — a typo never silently widens scope to other metrics. " -"Unknown verbs (anything other than `suppress` / `suppress-file`) and " -"malformed bodies (unbalanced parentheses, trailing garbage) produce the same " -"shape of warning and are similarly dropped. None of these are fatal: a typo " -"in one file does not derail a workspace walk." +"The marker is dropped — a typo never silently widens scope to other " +"metrics. Unknown verbs (anything other than `suppress` / `suppress-file`) " +"and malformed bodies (unbalanced parentheses, trailing garbage) produce the " +"same shape of warning and are similarly dropped. None of these are fatal: a " +"typo in one file does not derail a workspace walk." msgstr "" -"マーカーは破棄されます — タイプミスが他のメトリクスへ黙ってスコープを広げるこ" -"とは決してありません。未知の動詞(`suppress` / `suppress-file` 以外のもの)や" -"不正な形の本体(括弧の不整合、末尾の余計な文字列)も同じ形式の警告を出し、同" -"様に破棄されます。いずれも致命的ではありません: 1 つのファイルのタイプミスが" -"ワークスペースの走査を止めることはありません。" +"マーカーは破棄されます — タイプミスが他のメトリクスへ黙ってスコープを広げる" +"ことは決してありません。未知の動詞(`suppress` / `suppress-file` 以外のも" +"の)や不正な形の本体(括弧の不整合、末尾の余計な文字列)も同じ形式の警告を出" +"し、同様に破棄されます。いずれも致命的ではありません: 1 つのファイルのタイプ" +"ミスがワークスペースの走査を止めることはありません。" #: src/commands/suppression.md:159 msgid "Where markers may appear" @@ -9651,10 +10034,11 @@ msgid "C-family block comments: `/* bca: suppress */`" msgstr "C 系のブロックコメント: `/* bca: suppress */`" #: src/commands/suppression.md:168 -msgid "Rust inner doc comments: `//! bca: suppress` and `/*! bca: suppress */`" +msgid "" +"Rust inner doc comments: `//! bca: suppress` and `/*! bca: suppress */`" msgstr "" -"Rust の内部ドキュメントコメント: `//! bca: suppress` と `/*! bca: suppress */" -"`" +"Rust の内部ドキュメントコメント: `//! bca: suppress` と `/*! bca: suppress " +"*/`" #: src/commands/suppression.md:169 msgid "Python / shell / Ruby / Perl `#` comments: `# bca: suppress`" @@ -9666,17 +10050,17 @@ msgstr "Lisp / Lua / SQL の行コメント: `;; bca: suppress`、`-- bca: suppr #: src/commands/suppression.md:172 msgid "" -"Function-scope markers attach to the innermost `Function`\\-kind `FuncSpace` " -"whose `(start_line..=end_line)` range contains the comment's line. Markers " -"buried in a class or struct body but outside every method are silently " -"ignored — for class-wide silencing use `bca: suppress-file` or repeat the " -"marker on each method." +"Function-scope markers attach to the innermost `Function`\\-kind " +"`FuncSpace` whose `(start_line..=end_line)` range contains the comment's " +"line. Markers buried in a class or struct body but outside every method are " +"silently ignored — for class-wide silencing use `bca: suppress-file` or " +"repeat the marker on each method." msgstr "" -"関数スコープのマーカーは、コメントの行を `(start_line..=end_line)` 範囲に含む" -"最も内側の `Function` 種別の `FuncSpace` に付与されます。クラスや構造体の本体" -"内にあってもどのメソッドにも含まれないマーカーは黙って無視されます — クラス全" -"体を沈黙させるには `bca: suppress-file` を使うか、各メソッドでマーカーを繰り" -"返してください。" +"関数スコープのマーカーは、コメントの行を `(start_line..=end_line)` 範囲に含" +"む最も内側の `Function` 種別の `FuncSpace` に付与されます。クラスや構造体の" +"本体内にあってもどのメソッドにも含まれないマーカーは黙って無視されます — ク" +"ラス全体を沈黙させるには `bca: suppress-file` を使うか、各メソッドでマーカー" +"を繰り返してください。" #: src/commands/suppression.md:178 msgid "" @@ -9694,8 +10078,8 @@ msgid "" "not be recognized." msgstr "" "マーカーはコメントの先頭近くに配置してください。スキャナーは両端の区切り文字" -"を取り除いた後、先頭に `bca:`(または `#lizard`)が来ることを期待します。複数" -"行ブロックコメントの奥深くに埋もれたマーカーは認識されません。" +"を取り除いた後、先頭に `bca:`(または `#lizard`)が来ることを期待します。複" +"数行ブロックコメントの奥深くに埋もれたマーカーは認識されません。" #: src/commands/suppression.md:186 msgid "`--no-suppress` (CI auditing)" @@ -9713,15 +10097,15 @@ msgstr "" #: src/commands/suppression.md:197 msgid "" -"The flag has no effect on metric values themselves: raw `bca metrics` output " -"always reports every number. `bca report markdown|html` honours markers in " -"its hotspot tables by default and accepts its own [`--no-suppress`](report." -"md) flag for the same raw audit view." +"The flag has no effect on metric values themselves: raw `bca metrics` " +"output always reports every number. `bca report markdown|html` honours " +"markers in its hotspot tables by default and accepts its own [`--no-" +"suppress`](report.md) flag for the same raw audit view." msgstr "" -"このフラグはメトリクスの値自体には影響しません: 生の `bca metrics` 出力は常に" -"すべての数値を報告します。`bca report markdown|html` はデフォルトでホットス" -"ポットテーブルにおいてマーカーを尊重し、同じ生の監査ビューのために独自の [`--" -"no-suppress`](report.md) フラグを受け付けます。" +"このフラグはメトリクスの値自体には影響しません: 生の `bca metrics` 出力は常" +"にすべての数値を報告します。`bca report markdown|html` はデフォルトでホット" +"スポットテーブルにおいてマーカーを尊重し、同じ生の監査ビューのために独自の " +"[`--no-suppress`](report.md) フラグを受け付けます。" #: src/commands/suppression.md:202 msgid "Surfacing suppressed debt (`--report-suppressed`)" @@ -9735,9 +10119,9 @@ msgid "" "_suppressed_ rather than active:" msgstr "" "抑制は違反をゲートから外しますが、同時に `--format` ドキュメントからも外れま" -"す — そのため抑制されたモジュールはコードスキャンレポートから完全に消えます。" -"`bca check --report-suppressed` は、それをアクティブではなく _抑制済み_ とし" -"て書き戻します:" +"す — そのため抑制されたモジュールはコードスキャンレポートから完全に消えま" +"す。`bca check --report-suppressed` は、それをアクティブではなく _抑制済み_ " +"として書き戻します:" #: src/commands/suppression.md:214 msgid "" @@ -9750,10 +10134,10 @@ msgid "" msgstr "" "ソース内マーカーで沈黙させられた違反、またはベースラインでカバーされた違反" "は、SARIF の `suppressions` エントリ付きで SARIF ドキュメントに出力されます " -"— マーカーは `kind: \"inSource\"`、ベースラインは `kind: \"external\"` です。" -"抑制がゲートを失敗させることはありません(終了コードと人間向けの stderr スト" -"リームは影響を受けません)。`suppressions` エントリにより、下流のツールは抑制" -"された負債とアクティブな違反を区別できます。" +"— マーカーは `kind: \"inSource\"`、ベースラインは `kind: \"external\"` で" +"す。抑制がゲートを失敗させることはありません(終了コードと人間向けの stderr " +"ストリームは影響を受けません)。`suppressions` エントリにより、下流のツール" +"は抑制された負債とアクティブな違反を区別できます。" #: src/commands/suppression.md:221 msgid "" @@ -9763,17 +10147,18 @@ msgid "" "follow-up step such as the [`advanced-security/dismiss-alerts`](https://" "github.com/advanced-security/dismiss-alerts) action, which reads " "`suppressions[]` and dismisses the matching alerts. If you only want active " -"offenders to appear, omit `--report-suppressed` from the upload (this repo's " -"own Pages workflow does exactly that)." +"offenders to appear, omit `--report-suppressed` from the upload (this " +"repo's own Pages workflow does exactly that)." msgstr "" "**GitHub Code Scanning に関する注意。** GitHub は SARIF の `suppressions` プ" -"ロパティをネイティブには尊重**しません** — 抑制された結果はクローズ済みではな" -"く _オープン_ なアラートとして取り込まれます。Security タブでそれらを却下する" -"には、[`advanced-security/dismiss-alerts`](https://github.com/advanced-" +"ロパティをネイティブには尊重**しません** — 抑制された結果はクローズ済みでは" +"なく _オープン_ なアラートとして取り込まれます。Security タブでそれらを却下" +"するには、[`advanced-security/dismiss-alerts`](https://github.com/advanced-" "security/dismiss-alerts) アクションのような後続ステップが必要です。このアク" "ションは `suppressions[]` を読み取り、一致するアラートを却下します。アクティ" -"ブな違反だけを表示したい場合は、アップロードから `--report-suppressed` を外し" -"てください(本リポジトリ自身の Pages ワークフローがまさにそうしています)。" +"ブな違反だけを表示したい場合は、アップロードから `--report-suppressed` を外" +"してください(本リポジトリ自身の Pages ワークフローがまさにそうしていま" +"す)。" #: src/commands/suppression.md:230 msgid "Notes:" @@ -9781,11 +10166,11 @@ msgstr "注記:" #: src/commands/suppression.md:232 msgid "" -"Only the SARIF format represents suppression; other `--format` values ignore " -"the flag and emit the active offenders alone." +"Only the SARIF format represents suppression; other `--format` values " +"ignore the flag and emit the active offenders alone." msgstr "" -"抑制を表現できるのは SARIF フォーマットだけです。他の `--format` 値はこのフラ" -"グを無視し、アクティブな違反のみを出力します。" +"抑制を表現できるのは SARIF フォーマットだけです。他の `--format` 値はこのフ" +"ラグを無視し、アクティブな違反のみを出力します。" #: src/commands/suppression.md:234 msgid "" @@ -9817,10 +10202,11 @@ msgid "" "across all three exemption tiers, in one report:" msgstr "" "`--no-suppress` はマーカーが _沈黙させている_ 違反を表示しますが、マーカーそ" -"のものは表示しません。従来は、すべての抑制箇所を見つけるには `--no-suppress` " -"付きの実行結果と通常の実行結果を diff する必要がありました。`bca exemptions` " -"はこの回避策に代わり、`bca check` ゲートがスキップするすべての項目を、3 つの" -"適用除外ティアすべてにわたって 1 つのレポートで直接一覧表示します:" +"のものは表示しません。従来は、すべての抑制箇所を見つけるには `--no-" +"suppress` 付きの実行結果と通常の実行結果を diff する必要がありました。`bca " +"exemptions` はこの回避策に代わり、`bca check` ゲートがスキップするすべての項" +"目を、3 つの適用除外ティアすべてにわたって 1 つのレポートで直接一覧表示しま" +"す:" #: src/commands/suppression.md:249 src/recipes/local-gates.md:62 msgid "Tier" @@ -9882,13 +10268,13 @@ msgstr "" msgid "" "The surrounding function (for function-scoped markers) gives scope context; " "file-scoped markers read `(whole file)`, and a function-scoped marker " -"written outside any function — which silences nothing — reads `(no enclosing " -"fn)` so dead markers are visible." +"written outside any function — which silences nothing — reads `(no " +"enclosing fn)` so dead markers are visible." msgstr "" "(関数スコープのマーカーの場合)囲んでいる関数がスコープの文脈を示します。" "ファイルスコープのマーカーは `(whole file)` と表示されます。また、関数の外に" -"書かれた関数スコープのマーカー(何も抑制しません)は `(no enclosing fn)` と表" -"示されるため、無効なマーカーも可視化されます。" +"書かれた関数スコープのマーカー(何も抑制しません)は `(no enclosing fn)` と" +"表示されるため、無効なマーカーも可視化されます。" #: src/commands/suppression.md:278 msgid "Formats and section filters" @@ -9911,8 +10297,8 @@ msgstr "'.suppressions.markers[] | select(.dialect == \"lizard\")'" #: src/commands/suppression.md:288 msgid "" "In the JSON form an omitted section is `null` (not requested via a `--*-" -"only` flag) while a requested-but-empty section is `[]`, so filters can tell " -"the two apart." +"only` flag) while a requested-but-empty section is `[]`, so filters can " +"tell the two apart." msgstr "" "JSON 形式では、省略されたセクション(`--*-only` フラグで要求されなかったも" "の)は `null` になり、要求されたが空だったセクションは `[]` になるため、フィ" @@ -9929,19 +10315,19 @@ msgid "" "`." msgstr "" "相互排他的な `--markers-only` / `--excludes-only` / `--baseline-only` フラグ" -"は、PR ボットの特化(例:新規追加されたソース内マーカーにのみコメントするボッ" -"ト)のために、レポートを単一のティアに絞り込みます。ベースライン(`bca.toml` " -"トップレベルの `baseline`)と `[check.exclude]`(`[check] exclude`)の入力" -"は、`bca check` が読み取るのと同じソースをデフォルトとするため、監査はゲート" -"がスキップする内容を正確に反映します。ベースラインは `--baseline ` で上" -"書きできます。" +"は、PR ボットの特化(例:新規追加されたソース内マーカーにのみコメントする" +"ボット)のために、レポートを単一のティアに絞り込みます。ベースライン(`bca." +"toml` トップレベルの `baseline`)と `[check.exclude]`(`[check] exclude`)の" +"入力は、`bca check` が読み取るのと同じソースをデフォルトとするため、監査は" +"ゲートがスキップする内容を正確に反映します。ベースラインは `--baseline " +"` で上書きできます。" #: src/commands/suppression.md:300 msgid "" "The earlier `--only-markers` / `--only-excludes` / `--only-baseline` " -"spellings remain as hidden aliases for one release cycle to keep existing PR-" -"bot invocations working; prefer the `--
-only` forms, which match " -"the `diff-baseline` section filters." +"spellings remain as hidden aliases for one release cycle to keep existing " +"PR-bot invocations working; prefer the `--
-only` forms, which " +"match the `diff-baseline` section filters." msgstr "" "以前の `--only-markers` / `--only-excludes` / `--only-baseline` の綴りは、既" "存の PR ボットの呼び出しを動かし続けるため、1 リリースサイクルの間は非表示の" @@ -9954,8 +10340,8 @@ msgid "" "success — it is a review surface, not a gate." msgstr "" "`bca check` と異なり、`bca exemptions` は情報提供用であり、成功時は常に終了" -"コード 0 で終了します。これはレビューのための表示面であって、ゲートではありま" -"せん。" +"コード 0 で終了します。これはレビューのための表示面であって、ゲートではあり" +"ません。" #: src/commands/suppression.md:308 msgid "" @@ -9972,9 +10358,9 @@ msgstr "JSON 出力" #: src/commands/suppression.md:313 msgid "" "`FuncSpace` exposes the merged suppression scope as the optional " -"`suppressed` field in its JSON output. When no marker applies to a space the " -"field is elided so existing snapshot consumers see no change. When a marker " -"fires the field carries one of two shapes:" +"`suppressed` field in its JSON output. When no marker applies to a space " +"the field is elided so existing snapshot consumers see no change. When a " +"marker fires the field carries one of two shapes:" msgstr "" "`FuncSpace` は、マージされた抑制スコープを JSON 出力のオプションフィールド " "`suppressed` として公開します。スペースに適用されるマーカーがない場合、この" @@ -9987,7 +10373,7 @@ msgid "\"suppressed\"" msgstr "\"suppressed\"" #: src/commands/suppression.md:319 src/commands/suppression.md:323 -#: src/commands/rest.md:465 src/commands/rest.md:471 +#: src/commands/rest.md:489 src/commands/rest.md:495 #: src/python/flat-records.md:109 msgid "\"kind\"" msgstr "\"kind\"" @@ -10000,10 +10386,11 @@ msgstr "\"all\"" msgid "\"some\"" msgstr "\"some\"" -#: src/commands/suppression.md:323 src/commands/rest.md:473 -#: src/commands/rest.md:480 src/python/index.md:13 src/python/quick-start.md:46 -#: src/python/quick-start.md:85 src/python/batch.md:37 src/python/metrics.md:25 -#: src/python/metrics.md:37 src/python/errors.md:229 src/python/async.md:91 +#: src/commands/suppression.md:323 src/commands/rest.md:497 +#: src/commands/rest.md:504 src/python/index.md:13 +#: src/python/quick-start.md:46 src/python/quick-start.md:85 +#: src/python/batch.md:37 src/python/metrics.md:25 src/python/metrics.md:37 +#: src/python/errors.md:229 src/python/async.md:91 msgid "\"metrics\"" msgstr "\"metrics\"" @@ -10011,24 +10398,25 @@ msgstr "\"metrics\"" msgid "\"cognitive\"" msgstr "\"cognitive\"" -#: src/commands/suppression.md:323 src/commands/rest.md:475 -#: src/python/quick-start.md:85 src/python/batch.md:37 src/python/metrics.md:20 -#: src/python/errors.md:229 +#: src/commands/suppression.md:323 src/commands/rest.md:499 +#: src/python/quick-start.md:85 src/python/batch.md:37 +#: src/python/metrics.md:20 src/python/errors.md:229 msgid "\"loc\"" msgstr "\"loc\"" #: src/commands/suppression.md:326 msgid "" "`kind: all` corresponds to a bare marker (`bca: suppress`, `bca: suppress-" -"file`, or any Lizard-style marker). `kind: some` carries the explicit metric " -"list from `bca: suppress(...)` / `bca: suppress-file(...)`. Both shapes are " -"stable serialization output suitable for dashboards and audit logs." +"file`, or any Lizard-style marker). `kind: some` carries the explicit " +"metric list from `bca: suppress(...)` / `bca: suppress-file(...)`. Both " +"shapes are stable serialization output suitable for dashboards and audit " +"logs." msgstr "" -"`kind: all` は素のマーカー(`bca: suppress`、`bca: suppress-file`、または任意" -"の Lizard 形式のマーカー)に対応します。`kind: some` は `bca: " -"suppress(...)` / `bca: suppress-file(...)` で指定された明示的なメトリクスのリ" -"ストを保持します。どちらの形も、ダッシュボードや監査ログに適した安定したシリ" -"アライズ出力です。" +"`kind: all` は素のマーカー(`bca: suppress`、`bca: suppress-file`、または任" +"意の Lizard 形式のマーカー)に対応します。`kind: some` は `bca: " +"suppress(...)` / `bca: suppress-file(...)` で指定された明示的なメトリクスの" +"リストを保持します。どちらの形も、ダッシュボードや監査ログに適した安定したシ" +"リアライズ出力です。" #: src/commands/suppression.md:332 msgid "Migrating from Lizard" @@ -10040,21 +10428,21 @@ msgstr "互換レイヤーがあるため、移行は段階的に行えます: #: src/commands/suppression.md:336 msgid "" -"Existing `#lizard forgives` and `#lizard forgive global` markers continue to " -"work with no change. `bca check` honors them out of the box." +"Existing `#lizard forgives` and `#lizard forgive global` markers continue " +"to work with no change. `bca check` honors them out of the box." msgstr "" "既存の `#lizard forgives` と `#lizard forgive global` のマーカーは変更なしで" "そのまま機能します。`bca check` は追加設定なしにそれらを尊重します。" #: src/commands/suppression.md:339 msgid "" -"Rewrite to the native form opportunistically. `bca: suppress(...)` gives per-" -"metric scoping (the Lizard form silences everything) and is the form future " -"audit-trail features will extend." +"Rewrite to the native form opportunistically. `bca: suppress(...)` gives " +"per-metric scoping (the Lizard form silences everything) and is the form " +"future audit-trail features will extend." msgstr "" -"機会を見てネイティブ形式に書き換えてください。`bca: suppress(...)` はメトリク" -"ス単位のスコープ指定が可能で(Lizard 形式はすべてを抑制します)、将来の監査証" -"跡機能が拡張していく形式です。" +"機会を見てネイティブ形式に書き換えてください。`bca: suppress(...)` はメトリ" +"クス単位のスコープ指定が可能で(Lizard 形式はすべてを抑制します)、将来の監" +"査証跡機能が拡張していく形式です。" #: src/commands/suppression.md:343 msgid "" @@ -10096,16 +10484,18 @@ msgid "" "Both will be promoted to first-class behavior in a future release without " "breaking existing markers." msgstr "" -"現時点ではどちらの形式も使用しないでください。`reason = \"...\"` 引数は現在、" -"未知のメトリクス識別子としてパースされ、stderr への警告とともに破棄されます。" -"また `bca: suppress-next` は未知の動詞として拒否されます。どちらも将来のリ" -"リースで、既存のマーカーを壊すことなく第一級の動作に昇格される予定です。" +"現時点ではどちらの形式も使用しないでください。`reason = \"...\"` 引数は現" +"在、未知のメトリクス識別子としてパースされ、stderr への警告とともに破棄され" +"ます。また `bca: suppress-next` は未知の動詞として拒否されます。どちらも将来" +"のリリースで、既存のマーカーを壊すことなく第一級の動作に昇格される予定です。" #: src/commands/nodes.md:3 msgid "" "`bca` provides commands to analyze and extract information about nodes in " "the **Abstract Syntax Tree (AST)** of a source file." -msgstr "`bca` は、ソースファイルの**抽象構文木(AST)** のノードに関する情報を分析・抽出するコマンドを提供します。" +msgstr "" +"`bca` は、ソースファイルの**抽象構文木(AST)** のノードに関する情報を分析・" +"抽出するコマンドを提供します。" #: src/commands/nodes.md:7 msgid "" @@ -10141,26 +10531,26 @@ msgstr "" #: src/commands/nodes.md:22 msgid "" -"`-t, --type`: the node type to match. Repeat the flag for several types (`-t " -"function_item -t struct_item`); at least one is required. A _string_ value " -"matches the node-type name exactly (for example `function_item`). A purely " -"_numeric_ value is instead interpreted as a raw tree-sitter `kind_id` and " -"matches nodes whose internal symbol id equals that number (so `-t 0` matches " -"the end/`ERROR` sentinel). The numeric form is an escape hatch for grammar " -"inspection and is unstable: a `kind_id` is an index into the grammar's " -"symbol table, so the same number names a different node after a grammar-" -"version bump. Prefer the string form unless you specifically need a kind " -"that has no stable name." +"`-t, --type`: the node type to match. Repeat the flag for several types (`-" +"t function_item -t struct_item`); at least one is required. A _string_ " +"value matches the node-type name exactly (for example `function_item`). A " +"purely _numeric_ value is instead interpreted as a raw tree-sitter " +"`kind_id` and matches nodes whose internal symbol id equals that number (so " +"`-t 0` matches the end/`ERROR` sentinel). The numeric form is an escape " +"hatch for grammar inspection and is unstable: a `kind_id` is an index into " +"the grammar's symbol table, so the same number names a different node after " +"a grammar-version bump. Prefer the string form unless you specifically need " +"a kind that has no stable name." msgstr "" "`-t, --type`:マッチさせるノード種別。複数の種別を指定するにはフラグを繰り返" -"します(`-t function_item -t struct_item`)。少なくとも 1 つが必須です。_文字" -"列_ 値はノード種別名に正確にマッチします(例えば `function_item`)。純粋な _" -"数値_ は代わりに生の tree-sitter `kind_id` として解釈され、内部シンボル ID が" -"その数値に等しいノードにマッチします(したがって `-t 0` は末尾 / `ERROR` セン" -"チネルにマッチします)。数値形式は文法検査のための緊急避難口であり、不安定で" -"す。`kind_id` は文法のシンボルテーブルへのインデックスであるため、文法バー" -"ジョンのバンプ後には同じ数値が別のノードを指します。安定した名前を持たない種" -"別がどうしても必要な場合を除き、文字列形式を優先してください。" +"します(`-t function_item -t struct_item`)。少なくとも 1 つが必須です。_文" +"字列_ 値はノード種別名に正確にマッチします(例えば `function_item`)。純粋" +"な _数値_ は代わりに生の tree-sitter `kind_id` として解釈され、内部シンボル " +"ID がその数値に等しいノードにマッチします(したがって `-t 0` は末尾 / " +"`ERROR` センチネルにマッチします)。数値形式は文法検査のための緊急避難口であ" +"り、不安定です。`kind_id` は文法のシンボルテーブルへのインデックスであるた" +"め、文法バージョンのバンプ後には同じ数値が別のノードを指します。安定した名前" +"を持たない種別がどうしても必要な場合を除き、文字列形式を優先してください。" #: src/commands/nodes.md:32 msgid "" @@ -10213,8 +10603,8 @@ msgid "" "aliases but are slated for removal in the next major." msgstr "" "これらのフラグは `dump` と `find` に固有のものであるため、サブコマンドの後に" -"置く必要があります。短い綴りの `--ls` / `--le` は非推奨のエイリアスとして引き" -"続き機能しますが、次のメジャーバージョンで削除される予定です。" +"置く必要があります。短い綴りの `--ls` / `--le` は非推奨のエイリアスとして引" +"き続き機能しますが、次のメジャーバージョンで削除される予定です。" #: src/commands/nodes.md:68 msgid "Listing functions" @@ -10227,9 +10617,9 @@ msgstr "" #: src/commands/rest.md:3 msgid "" -"**bca-web** is a web server that allows users to analyze source code through " -"a REST API. This service is useful for anyone looking to perform code " -"analysis over HTTP." +"**bca-web** is a web server that allows users to analyze source code " +"through a REST API. This service is useful for anyone looking to perform " +"code analysis over HTTP." msgstr "" "**bca-web** は、REST API を通じてソースコードを分析できる Web サーバーです。" "このサービスは、HTTP 経由でコード分析を行いたいすべての人に役立ちます。" @@ -10290,9 +10680,9 @@ msgstr "" #: src/commands/rest.md:27 msgid "" -"For the full flag set, environment variables, resource limits, and the trust " -"boundaries to respect before exposing the daemon, see [Operating bca-web]" -"(web-server.md)." +"For the full flag set, environment variables, resource limits, and the " +"trust boundaries to respect before exposing the daemon, see [Operating bca-" +"web](web-server.md)." msgstr "" "フラグの全一覧、環境変数、リソース制限、およびデーモンを公開する前に守るべき" "信頼境界については、[bca-web の運用](web-server.md) を参照してください。" @@ -10303,25 +10693,25 @@ msgstr "CORS" #: src/commands/rest.md:33 msgid "" -"By default **bca-web emits no CORS headers**: a browser script served from a " -"different origin cannot read the API's responses. This keeps a local `bca-" +"By default **bca-web emits no CORS headers**: a browser script served from " +"a different origin cannot read the API's responses. This keeps a local `bca-" "web` (the default `127.0.0.1` bind) from exposing its repository paths and " "metrics to any website the operator happens to be visiting." msgstr "" -"デフォルトでは **bca-web は CORS ヘッダーを一切送出しません**。別のオリジンか" -"ら配信されたブラウザスクリプトは、この API のレスポンスを読み取れません。これ" -"により、ローカルの `bca-web`(デフォルトの `127.0.0.1` バインド)が、運用者が" -"たまたま閲覧している任意の Web サイトにリポジトリのパスやメトリクスを晒すこと" -"を防ぎます。" +"デフォルトでは **bca-web は CORS ヘッダーを一切送出しません**。別のオリジン" +"から配信されたブラウザスクリプトは、この API のレスポンスを読み取れません。" +"これにより、ローカルの `bca-web`(デフォルトの `127.0.0.1` バインド)が、運" +"用者がたまたま閲覧している任意の Web サイトにリポジトリのパスやメトリクスを" +"晒すことを防ぎます。" #: src/commands/rest.md:38 msgid "" "Pass `--cors` to opt in. The argument is an explicit, comma-separated allow-" -"list of [origins](https://developer.mozilla.org/en-US/docs/Glossary/Origin); " -"only those origins receive an [`Access-Control-Allow-Origin`](https://" -"developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-" -"Origin) header, and the matched origin is echoed back verbatim (a request " -"from any other origin gets no header and is blocked by the browser):" +"list of [origins](https://developer.mozilla.org/en-US/docs/Glossary/" +"Origin); only those origins receive an [`Access-Control-Allow-Origin`]" +"(https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-" +"Allow-Origin) header, and the matched origin is echoed back verbatim (a " +"request from any other origin gets no header and is blocked by the browser):" msgstr "" "オプトインするには `--cors` を渡します。引数は [オリジン](https://developer." "mozilla.org/en-US/docs/Glossary/Origin) の明示的なカンマ区切り許可リストで" @@ -10348,8 +10738,8 @@ msgid "" "A wide-open `*` exposes the server's metrics and repository paths to any " "origin, so use it only on trusted networks." msgstr "" -"全開放の `*` は、サーバーのメトリクスとリポジトリのパスをあらゆるオリジンに公" -"開するため、信頼できるネットワークでのみ使用してください。" +"全開放の `*` は、サーバーのメトリクスとリポジトリのパスをあらゆるオリジンに" +"公開するため、信頼できるネットワークでのみ使用してください。" #: src/commands/rest.md:59 msgid "" @@ -10364,9 +10754,9 @@ msgid "" msgstr "" "CORS が有効な場合、プリフライトの [`OPTIONS`](https://developer.mozilla.org/" "en-US/docs/Web/HTTP/Methods/OPTIONS) リクエストには `204 No Content` で応答" -"し、`Access-Control-Allow-Origin`、`Access-Control-Allow-Methods`(そのリソー" -"ス自身が受け付けるメソッド。`Allow` ヘッダーが広告するのと同じ集合)、および " -"`Access-Control-Allow-Headers`(リクエストの `Access-Control-Request-" +"し、`Access-Control-Allow-Origin`、`Access-Control-Allow-Methods`(そのリ" +"ソース自身が受け付けるメソッド。`Allow` ヘッダーが広告するのと同じ集合)、お" +"よび `Access-Control-Allow-Headers`(リクエストの `Access-Control-Request-" "Headers` をエコーし、素のプローブに対しては `Content-Type, Accept`)を付与し" "ます。この API には認証も Cookie もないため、`Access-Control-Allow-" "Credentials` は**決して**送信されません。" @@ -10378,16 +10768,16 @@ msgstr "API バージョニング" #: src/commands/rest.md:70 msgid "" "All endpoints are mounted under a `/v1` prefix (for example `/v1/metrics`). " -"The full route set is `/v1/ping`, `/v1/version`, `/v1/languages`, `/v1/ast`, " -"`/v1/comment`, `/v1/function`, `/v1/metrics`, `/v1/vcs`, `/v1/vcs/trend`, `/" -"v1/vcs/jit`, and the route index `/v1`. To discover them programmatically, " -"`GET /v1` (see [Route index](#8-route-index))." +"The full route set is `/v1/ping`, `/v1/version`, `/v1/languages`, `/v1/" +"ast`, `/v1/comment`, `/v1/function`, `/v1/metrics`, `/v1/vcs`, `/v1/vcs/" +"trend`, `/v1/vcs/jit`, and the route index `/v1`. To discover them " +"programmatically, `GET /v1` (see [Route index](#8-route-index))." msgstr "" "すべてのエンドポイントは `/v1` プレフィックスの下にマウントされます(例えば " "`/v1/metrics`)。ルートの全集合は `/v1/ping`、`/v1/version`、`/v1/" "languages`、`/v1/ast`、`/v1/comment`、`/v1/function`、`/v1/metrics`、`/v1/" -"vcs`、`/v1/vcs/trend`、`/v1/vcs/jit`、およびルートインデックス `/v1` です。プ" -"ログラムから発見するには `GET /v1` を使用します([ルートインデックス](#8-" +"vcs`、`/v1/vcs/trend`、`/v1/vcs/jit`、およびルートインデックス `/v1` です。" +"プログラムから発見するには `GET /v1` を使用します([ルートインデックス](#8-" "route-index) を参照)。" #: src/commands/rest.md:77 @@ -10396,10 +10786,10 @@ msgid "" "`1.x` releases served as deprecated aliases were **removed in 2.0**; " "requesting one now returns `404`. Use the `/v1` form everywhere." msgstr "" -"以前の `1.x` リリースが非推奨エイリアスとして提供していたプレフィックスなしの" -"パス(`/metrics`、`/comment`、`/ast`、`/`、…)は **2.0 で削除されました**。現" -"在それらをリクエストすると `404` が返ります。どこでも `/v1` 形式を使用してく" -"ださい。" +"以前の `1.x` リリースが非推奨エイリアスとして提供していたプレフィックスなし" +"のパス(`/metrics`、`/comment`、`/ast`、`/`、…)は **2.0 で削除されました" +"**。現在それらをリクエストすると `404` が返ります。どこでも `/v1` 形式を使用" +"してください。" #: src/commands/rest.md:81 msgid "Error responses" @@ -10408,16 +10798,16 @@ msgstr "エラーレスポンス" #: src/commands/rest.md:83 msgid "" "Errors are reported with an HTTP status code, not inside a `200` body. " -"**Every** error — on the JSON endpoints, the raw/octet-stream endpoints, and " -"the `415`/`405`/`404` fallbacks alike — returns one uniform machine-readable " -"JSON body so clients parse a single error shape regardless of the success " -"content-type:" +"**Every** error — on the JSON endpoints, the raw/octet-stream endpoints, " +"and the `415`/`405`/`404` fallbacks alike — returns one uniform machine-" +"readable JSON body so clients parse a single error shape regardless of the " +"success content-type:" msgstr "" "エラーは `200` のボディ内ではなく、HTTP ステータスコードで報告されます。**す" "べての**エラー(JSON エンドポイント、raw/octet-stream エンドポイント、`415`/" -"`405`/`404` フォールバックのいずれでも)は統一された機械可読の JSON ボディを " -"1 つ返すため、クライアントは成功時のコンテンツタイプに関わらず単一のエラー形" -"式をパースすれば済みます:" +"`405`/`404` フォールバックのいずれでも)は統一された機械可読の JSON ボディ" +"を 1 つ返すため、クライアントは成功時のコンテンツタイプに関わらず単一のエ" +"ラー形式をパースすれば済みます:" #: src/commands/rest.md:91 msgid "\"error\"" @@ -10435,12 +10825,12 @@ msgstr "\"error_kind\"" msgid "\"stable_machine_token\"" msgstr "\"stable_machine_token\"" -#: src/commands/rest.md:93 src/commands/rest.md:235 src/commands/rest.md:251 -#: src/commands/rest.md:290 src/commands/rest.md:306 src/commands/rest.md:338 -#: src/commands/rest.md:363 src/commands/rest.md:426 src/commands/rest.md:459 -#: src/commands/rest.md:638 src/commands/rest.md:679 src/commands/rest.md:742 -#: src/commands/rest.md:776 src/commands/rest.md:790 src/commands/rest.md:797 -#: src/commands/rest.md:807 src/commands/rest.md:820 +#: src/commands/rest.md:93 src/commands/rest.md:259 src/commands/rest.md:275 +#: src/commands/rest.md:314 src/commands/rest.md:330 src/commands/rest.md:362 +#: src/commands/rest.md:387 src/commands/rest.md:450 src/commands/rest.md:483 +#: src/commands/rest.md:662 src/commands/rest.md:703 src/commands/rest.md:766 +#: src/commands/rest.md:800 src/commands/rest.md:814 src/commands/rest.md:821 +#: src/commands/rest.md:831 src/commands/rest.md:844 msgid "\"id\"" msgstr "\"id\"" @@ -10457,12 +10847,12 @@ msgid "" "governed by [`STABILITY.md`](https://github.com/dekobon/big-code-analysis/" "blob/main/STABILITY.md)." msgstr "" -"`error` は具体的な人間可読の原因で、`error_kind` は安定した `snake_case` の機" -"械向けトークン(例:`unknown_field`、`unsupported_language`、`bad_request`、" -"`parse_timeout`)です。これによりクライアントは説明文の文字列マッチングをせず" -"に原因で分岐できます(issue #631)。トークンの語彙は閉じており、[`STABILITY." -"md`](https://github.com/dekobon/big-code-analysis/blob/main/STABILITY.md) に" -"よって管理されています。" +"`error` は具体的な人間可読の原因で、`error_kind` は安定した `snake_case` の" +"機械向けトークン(例:`unknown_field`、`unsupported_language`、" +"`bad_request`、`parse_timeout`)です。これによりクライアントは説明文の文字列" +"マッチングをせずに原因で分岐できます(issue #631)。トークンの語彙は閉じてお" +"り、[`STABILITY.md`](https://github.com/dekobon/big-code-analysis/blob/main/" +"STABILITY.md) によって管理されています。" #: src/commands/rest.md:103 msgid "" @@ -10472,11 +10862,12 @@ msgid "" "content-type / method / not-found fallbacks — and any request whose body " "failed to parse before the id was read — have no parsed id to echo)." msgstr "" -"`id` キーは**常に存在します**。リクエストにクライアント指定の相関 ID があった" -"場合(JSON エンドポイント)はそれを保持し、それ以外の場合は空文字列になります" -"(octet-stream / クエリのエンドポイントは ID を持たず、コンテンツタイプ / メ" -"ソッド / not-found のフォールバック、および ID が読み取られる前にボディのパー" -"スに失敗したリクエストには、エコーすべきパース済み ID が存在しません)。" +"`id` キーは**常に存在します**。リクエストにクライアント指定の相関 ID があっ" +"た場合(JSON エンドポイント)はそれを保持し、それ以外の場合は空文字列になり" +"ます(octet-stream / クエリのエンドポイントは ID を持たず、コンテンツタイ" +"プ / メソッド / not-found のフォールバック、および ID が読み取られる前にボ" +"ディのパースに失敗したリクエストには、エコーすべきパース済み ID が存在しませ" +"ん)。" #: src/commands/rest.md:110 msgid "Status codes:" @@ -10490,9 +10881,9 @@ msgid "" "_Compute Metrics_ below), or a `scope` value that is not `full` / `file`." msgstr "" "`400 Bad Request` — 不正なボディまたはクエリパラメータ。無効な JSON、必須" -"フィールドの欠落、認識されないキー(厳格な `deny_unknown_fields` パース。削除" -"された `unit` フラグを含みます — 後述の _Compute Metrics_ を参照)、または " -"`full` / `file` 以外の `scope` 値。" +"フィールドの欠落、認識されないキー(厳格な `deny_unknown_fields` パース。削" +"除された `unit` フラグを含みます — 後述の _Compute Metrics_ を参照)、また" +"は `full` / `file` 以外の `scope` 値。" #: src/commands/rest.md:117 msgid "" @@ -10503,12 +10894,12 @@ msgid "" "v1/languages` for the supported set. (Before 2.0 this was a `404`, " "indistinguishable from an unknown URL — see issue #634.)" msgstr "" -"`422 Unprocessable Entity` — `file_name` の拡張子(およびコンテンツスニッフィ" -"ング)が対応言語のいずれにもマップされない場合。ルートはマッチしボディはパー" -"スされており、送信されたエンティティだけが処理できません。レスポンスは安定し" -"た機械向けトークン `\"error\": \"unsupported_language\"` を含みます。対応言語" -"の集合は `GET /v1/languages` で照会してください。(2.0 より前はこれが `404` " -"であり、未知の URL と区別できませんでした — issue #634 を参照。)" +"`422 Unprocessable Entity` — `file_name` の拡張子(およびコンテンツスニッ" +"フィング)が対応言語のいずれにもマップされない場合。ルートはマッチしボディは" +"パースされており、送信されたエンティティだけが処理できません。レスポンスは安" +"定した機械向けトークン `\"error\": \"unsupported_language\"` を含みます。対" +"応言語の集合は `GET /v1/languages` で照会してください。(2.0 より前はこれが " +"`404` であり、未知の URL と区別できませんでした — issue #634 を参照。)" #: src/commands/rest.md:124 msgid "`404 Not Found` — the URL matches no endpoint." @@ -10527,12 +10918,12 @@ msgstr "" #: src/commands/rest.md:128 msgid "" "`405 Method Not Allowed` — a known endpoint was called with the wrong HTTP " -"method (the analysis endpoints are `POST`\\-only; `/ping`, `/version`, and `/" -"languages` are `GET`\\-only)." +"method (the analysis endpoints are `POST`\\-only; `/ping`, `/version`, and " +"`/languages` are `GET`\\-only)." msgstr "" -"`405 Method Not Allowed` — 既知のエンドポイントが誤った HTTP メソッドで呼ばれ" -"た場合(分析エンドポイントは `POST` 専用、`/ping`、`/version`、`/languages` " -"は `GET` 専用です)。" +"`405 Method Not Allowed` — 既知のエンドポイントが誤った HTTP メソッドで呼ば" +"れた場合(分析エンドポイントは `POST` 専用、`/ping`、`/version`、`/" +"languages` は `GET` 専用です)。" #: src/commands/rest.md:131 msgid "" @@ -10542,12 +10933,12 @@ msgid "" "concrete type (e.g. `application/xml`) is a `406` carrying the " "`not_acceptable` token. See [Content negotiation](#content-negotiation)." msgstr "" -"`406 Not Acceptable` — リクエストの `Accept` ヘッダーが、サーバーが生成できな" -"いメディアタイプのみを指定していた場合。構造化分析エンドポイントは " -"`application/json`、`application/yaml`、`application/cbor` を提供します。それ" -"以外の具体的なタイプ(例:`application/xml`)は `not_acceptable` トークンを伴" -"う `406` になります。[コンテンツネゴシエーション](#content-negotiation) を参" -"照してください。" +"`406 Not Acceptable` — リクエストの `Accept` ヘッダーが、サーバーが生成でき" +"ないメディアタイプのみを指定していた場合。構造化分析エンドポイントは " +"`application/json`、`application/yaml`、`application/cbor` を提供します。そ" +"れ以外の具体的なタイプ(例:`application/xml`)は `not_acceptable` トークン" +"を伴う `406` になります。[コンテンツネゴシエーション](#content-negotiation) " +"を参照してください。" #: src/commands/rest.md:136 msgid "`413 Payload Too Large` — the request body exceeded the server limit." @@ -10558,13 +10949,16 @@ msgstr "" msgid "" "`500 Internal Server Error` — metric computation or AST construction failed " "for an otherwise-valid request, or a `/vcs` history walk failed on the " -"server side." +"server side. This also covers a response too deeply nested to serialize " +"(`serialize_failed`) — see [Nesting limits](#nesting-limits) below." msgstr "" "`500 Internal Server Error` — それ以外は有効なリクエストに対してメトリクス計" -"算または AST 構築が失敗した場合、あるいは `/vcs` の履歴ウォークがサーバー側で" -"失敗した場合。" +"算または AST 構築が失敗した場合、あるいは `/vcs` の履歴ウォークがサーバー側" +"で失敗した場合。ネストが深すぎてシリアライズできないレスポンス" +"(`serialize_failed`)もこれに含まれます — 下記の[ネストの上限](#nesting-" +"limits)を参照してください。" -#: src/commands/rest.md:140 +#: src/commands/rest.md:142 msgid "" "`503 Service Unavailable` — the parse pool is saturated by orphaned (timed-" "out) tasks; retry later." @@ -10572,7 +10966,7 @@ msgstr "" "`503 Service Unavailable` — パースプールが孤立した(タイムアウトした)タスク" "で飽和している場合。後で再試行してください。" -#: src/commands/rest.md:142 +#: src/commands/rest.md:144 msgid "" "`504 Gateway Timeout` — the parse (or history walk) exceeded the server's " "configured deadline." @@ -10580,65 +10974,137 @@ msgstr "" "`504 Gateway Timeout` — パース(または履歴ウォーク)がサーバーに設定された期" "限を超過した場合。" -#: src/commands/rest.md:145 +#: src/commands/rest.md:147 +msgid "Nesting limits" +msgstr "ネストの上限" + +#: src/commands/rest.md:149 +msgid "" +"Responses are trees, and no serializer can emit a tree without one native " +"stack frame per level. Rather than let a deeply nested response overflow " +"the stack — which aborts the whole process, taking every in-flight request " +"with it — the server refuses to serialize past a fixed depth and answers " +"`500` with the `serialize_failed` token:" +msgstr "" +"レスポンスはツリーであり、どのシリアライザもレベルごとに 1 つのネイティブス" +"タックフレームを使わずにツリーを出力することはできません。深くネストしたレス" +"ポンスにスタックを溢れさせ、プロセス全体を — 実行中のすべてのリクエストもろ" +"とも — 落としてしまうのを避けるため、サーバーは固定の深さを超えるシリアライ" +"ズを拒否し、`serialize_failed` トークンとともに `500` を返します。" + +#: src/commands/rest.md:155 +msgid "Response" +msgstr "レスポンス" + +#: src/commands/rest.md:155 +msgid "Limit" +msgstr "上限" + +#: src/commands/rest.md:155 +msgid "What counts as a level" +msgstr "1 レベルとみなされるもの" + +#: src/commands/rest.md:157 +msgid "`/metrics`" +msgstr "`/metrics`" + +#: src/commands/rest.md:157 +msgid "128" +msgstr "128" + +#: src/commands/rest.md:157 +msgid "one nested function space (a function inside a function inside a …)" +msgstr "ネストした関数スペース 1 つ(関数の中の関数の中の…)" + +#: src/commands/rest.md:158 +msgid "`/ast`" +msgstr "`/ast`" + +#: src/commands/rest.md:158 +msgid "512" +msgstr "512" + +#: src/commands/rest.md:158 +msgid "one AST node" +msgstr "AST ノード 1 つ" + +#: src/commands/rest.md:160 +msgid "" +"Both limits sit far above anything real source reaches. Across the 14 450-" +"file corpus this project tests against (TensorFlow, DeepSpeech, serde, …) " +"the deepest AST is 188 nodes and the deepest function-space nesting is 10. " +"The `/metrics` limit is also more generous than the read side — a JSON " +"document of nested spaces cannot be parsed back past ~61 levels, because " +"`serde_json`'s own 128-level recursion limit charges two levels per space." +msgstr "" +"どちらの上限も、実在のソースが到達する水準をはるかに上回っています。本プロ" +"ジェクトがテスト対象とする 14,450 ファイルのコーパス(TensorFlow、" +"DeepSpeech、serde など)全体で、最も深い AST は 188 ノード、最も深い関数ス" +"ペースのネストは 10 です。`/metrics` の上限は読み取り側よりも余裕があります " +"— ネストしたスペースの JSON ドキュメントは約 61 レベルを超えると読み戻せませ" +"ん。`serde_json` 自身の 128 レベルの再帰上限が、スペース 1 つあたり 2 レベル" +"を消費するためです。" + +#: src/commands/rest.md:169 msgid "Content negotiation" msgstr "コンテンツネゴシエーション" -#: src/commands/rest.md:147 +#: src/commands/rest.md:171 msgid "" -"The structured analysis endpoints — `/v1/ast`, `/v1/comment` (JSON variant), " -"`/v1/function`, `/v1/metrics`, `/v1/vcs`, `/v1/vcs/trend`, and `/v1/vcs/jit` " -"— choose their response serialization from the request `Accept` header, " -"mirroring the CLI's `-O json|yaml|cbor` outputs. The same value serializes " -"byte-for-byte identically whether it comes from the CLI or the server." +"The structured analysis endpoints — `/v1/ast`, `/v1/comment` (JSON " +"variant), `/v1/function`, `/v1/metrics`, `/v1/vcs`, `/v1/vcs/trend`, and `/" +"v1/vcs/jit` — choose their response serialization from the request `Accept` " +"header, mirroring the CLI's `-O json|yaml|cbor` outputs. The same value " +"serializes byte-for-byte identically whether it comes from the CLI or the " +"server." msgstr "" "構造化分析エンドポイント(`/v1/ast`、`/v1/comment`(JSON バリアント)、`/v1/" -"function`、`/v1/metrics`、`/v1/vcs`、`/v1/vcs/trend`、`/v1/vcs/jit`)は、CLI " -"の `-O json|yaml|cbor` 出力を反映して、リクエストの `Accept` ヘッダーからレス" -"ポンスのシリアライズ形式を選択します。同じ値は、CLI 由来でもサーバー由来で" -"も、バイト単位で同一にシリアライズされます。" +"function`、`/v1/metrics`、`/v1/vcs`、`/v1/vcs/trend`、`/v1/vcs/jit`)は、" +"CLI の `-O json|yaml|cbor` 出力を反映して、リクエストの `Accept` ヘッダーか" +"らレスポンスのシリアライズ形式を選択します。同じ値は、CLI 由来でもサーバー由" +"来でも、バイト単位で同一にシリアライズされます。" -#: src/commands/rest.md:154 +#: src/commands/rest.md:178 msgid "`Accept` value" msgstr "`Accept` の値" -#: src/commands/rest.md:154 +#: src/commands/rest.md:178 msgid "Response `Content-Type`" msgstr "レスポンスの `Content-Type`" -#: src/commands/rest.md:156 +#: src/commands/rest.md:180 msgid "absent, `*/*`, `application/*`, `application/json`" msgstr "なし、`*/*`、`application/*`、`application/json`" -#: src/commands/rest.md:156 +#: src/commands/rest.md:180 msgid "`application/json`" msgstr "`application/json`" -#: src/commands/rest.md:157 +#: src/commands/rest.md:181 msgid "`application/yaml` (or `text/yaml`, `application/x-yaml`)" msgstr "`application/yaml`(または `text/yaml`、`application/x-yaml`)" -#: src/commands/rest.md:157 +#: src/commands/rest.md:181 msgid "`application/yaml`" msgstr "`application/yaml`" -#: src/commands/rest.md:158 +#: src/commands/rest.md:182 msgid "`application/cbor`" msgstr "`application/cbor`" -#: src/commands/rest.md:159 +#: src/commands/rest.md:183 msgid "any other concrete type" msgstr "その他の任意の具体的なタイプ" -#: src/commands/rest.md:159 +#: src/commands/rest.md:183 msgid "**`406 Not Acceptable`**" msgstr "**`406 Not Acceptable`**" -#: src/commands/rest.md:161 +#: src/commands/rest.md:185 msgid "Rules:" msgstr "ルール:" -#: src/commands/rest.md:163 +#: src/commands/rest.md:187 msgid "" "**JSON is the default.** A request with no `Accept` header, or one that " "includes `*/*` / `application/*` / `application/json`, gets JSON — the same " @@ -10650,93 +11116,94 @@ msgstr "" "す。これは以前のリリースが常に返していたのと同じボディと `Content-Type` であ" "り、既存のクライアントに変更は不要です。" -#: src/commands/rest.md:167 +#: src/commands/rest.md:191 msgid "" "**`q` weights are honored.** Among the supported types the highest `q`\\-" "weighted entry wins (`Accept: application/json;q=0.5, application/yaml;" -"q=0.9` returns YAML); `q=0` refuses a type. Ties keep the first-listed entry." +"q=0.9` returns YAML); `q=0` refuses a type. Ties keep the first-listed " +"entry." msgstr "" "**`q` 重みは尊重されます。** サポートされるタイプの中で `q` 重みが最も高いエ" -"ントリが選ばれます(`Accept: application/json;q=0.5, application/yaml;q=0.9` " -"は YAML を返します)。`q=0` はそのタイプを拒否します。同点の場合は先に列挙さ" -"れたエントリが維持されます。" +"ントリが選ばれます(`Accept: application/json;q=0.5, application/yaml;" +"q=0.9` は YAML を返します)。`q=0` はそのタイプを拒否します。同点の場合は先" +"に列挙されたエントリが維持されます。" -#: src/commands/rest.md:171 +#: src/commands/rest.md:195 msgid "" "**Unsupported types are a `406`,** not a silent JSON fallback. The body is " "the uniform `{error, error_kind, id}` envelope with `error_kind: " "\"not_acceptable\"`, and the message lists the supported media types." msgstr "" -"**サポートされないタイプは `406` になり、** 暗黙の JSON フォールバックは行われ" -"ません。ボディは `error_kind: \"not_acceptable\"` を持つ統一の `{error, " -"error_kind, id}` エンベロープで、メッセージにはサポートされるメディアタイプが" -"列挙されます。" +"**サポートされないタイプは `406` になり、** 暗黙の JSON フォールバックは行わ" +"れません。ボディは `error_kind: \"not_acceptable\"` を持つ統一の `{error, " +"error_kind, id}` エンベロープで、メッセージにはサポートされるメディアタイプ" +"が列挙されます。" -#: src/commands/rest.md:175 +#: src/commands/rest.md:199 msgid "" "**Only structured serializations are offered.** TOML and CSV are excluded: " "TOML is awkward for the deeply nested space tree and CSV is flat/tabular. " -"The error-envelope body and the `/v1/comment` octet-stream variant (raw byte-" -"in / byte-out) are always JSON / raw bytes respectively and do not " +"The error-envelope body and the `/v1/comment` octet-stream variant (raw " +"byte-in / byte-out) are always JSON / raw bytes respectively and do not " "negotiate. The introspection routes (`/v1`, `/v1/version`, `/v1/languages`) " "return JSON metadata only." msgstr "" "**構造化シリアライズのみが提供されます。** TOML と CSV は除外されています。" -"TOML は深くネストしたスペースツリーには不向きで、CSV はフラットな表形式だから" -"です。エラーエンベロープのボディと `/v1/comment` の octet-stream バリアント" -"(生バイト入力 / 生バイト出力)は、それぞれ常に JSON / 生バイトであり、ネゴシ" -"エーションを行いません。イントロスペクションルート(`/v1`、`/v1/version`、`/" -"v1/languages`)は JSON メタデータのみを返します。" +"TOML は深くネストしたスペースツリーには不向きで、CSV はフラットな表形式だか" +"らです。エラーエンベロープのボディと `/v1/comment` の octet-stream バリアン" +"ト(生バイト入力 / 生バイト出力)は、それぞれ常に JSON / 生バイトであり、ネ" +"ゴシエーションを行いません。イントロスペクションルート(`/v1`、`/v1/" +"version`、`/v1/languages`)は JSON メタデータのみを返します。" -#: src/commands/rest.md:183 +#: src/commands/rest.md:207 msgid "# YAML metrics\n" msgstr "# YAML メトリクス\n" -#: src/commands/rest.md:185 src/commands/rest.md:192 src/recipes/rest-api.md:37 -#: src/recipes/rest-api.md:63 src/recipes/rest-api.md:98 -#: src/recipes/rest-api.md:116 src/recipes/rest-api.md:146 -#: src/recipes/rest-api.md:176 src/recipes/rest-api.md:201 -#: src/recipes/rest-api.md:216 +#: src/commands/rest.md:209 src/commands/rest.md:216 +#: src/recipes/rest-api.md:37 src/recipes/rest-api.md:63 +#: src/recipes/rest-api.md:98 src/recipes/rest-api.md:116 +#: src/recipes/rest-api.md:146 src/recipes/rest-api.md:176 +#: src/recipes/rest-api.md:201 src/recipes/rest-api.md:216 msgid "'Content-Type: application/json'" msgstr "'Content-Type: application/json'" -#: src/commands/rest.md:186 +#: src/commands/rest.md:210 msgid "'Accept: application/yaml'" msgstr "'Accept: application/yaml'" -#: src/commands/rest.md:187 src/commands/rest.md:194 +#: src/commands/rest.md:211 src/commands/rest.md:218 msgid "'{\"file_name\": \"foo.py\", \"code\": \"def f():\\n pass\\n\"}'" msgstr "'{\"file_name\": \"foo.py\", \"code\": \"def f():\\n pass\\n\"}'" -#: src/commands/rest.md:189 +#: src/commands/rest.md:213 msgid "# CBOR metrics (binary; pipe to a decoder)\n" msgstr "# CBOR メトリクス(バイナリ。デコーダーにパイプしてください)\n" -#: src/commands/rest.md:193 +#: src/commands/rest.md:217 msgid "'Accept: application/cbor'" msgstr "'Accept: application/cbor'" -#: src/commands/rest.md:198 +#: src/commands/rest.md:222 msgid "Endpoints" msgstr "エンドポイント" -#: src/commands/rest.md:200 +#: src/commands/rest.md:224 msgid "1. Ping the Server" msgstr "1. サーバーの Ping" -#: src/commands/rest.md:202 +#: src/commands/rest.md:226 msgid "Use this endpoint to check if the server is running." msgstr "" "このエンドポイントは、サーバーが稼働しているかどうかの確認に使用します。" -#: src/commands/rest.md:204 src/commands/rest.md:225 src/commands/rest.md:280 -#: src/commands/rest.md:328 src/commands/rest.md:416 src/commands/rest.md:507 -#: src/commands/rest.md:528 src/commands/rest.md:557 src/commands/rest.md:628 -#: src/commands/rest.md:721 +#: src/commands/rest.md:228 src/commands/rest.md:249 src/commands/rest.md:304 +#: src/commands/rest.md:352 src/commands/rest.md:440 src/commands/rest.md:531 +#: src/commands/rest.md:552 src/commands/rest.md:581 src/commands/rest.md:652 +#: src/commands/rest.md:745 msgid "**Request:**" msgstr "**リクエスト:**" -#: src/commands/rest.md:206 +#: src/commands/rest.md:230 msgid "" "```http\n" "GET http://127.0.0.1:8080/v1/ping\n" @@ -10746,45 +11213,45 @@ msgstr "" "GET http://127.0.0.1:8080/v1/ping\n" "```" -#: src/commands/rest.md:210 src/commands/rest.md:302 src/commands/rest.md:359 -#: src/commands/rest.md:455 src/commands/rest.md:513 src/commands/rest.md:534 -#: src/commands/rest.md:563 src/commands/rest.md:675 src/commands/rest.md:738 +#: src/commands/rest.md:234 src/commands/rest.md:326 src/commands/rest.md:383 +#: src/commands/rest.md:479 src/commands/rest.md:537 src/commands/rest.md:558 +#: src/commands/rest.md:587 src/commands/rest.md:699 src/commands/rest.md:762 msgid "**Response:**" msgstr "**レスポンス:**" -#: src/commands/rest.md:212 +#: src/commands/rest.md:236 msgid "Status Code: `200 OK`" msgstr "ステータスコード:`200 OK`" -#: src/commands/rest.md:213 +#: src/commands/rest.md:237 msgid "Body: empty." msgstr "ボディ:空。" -#: src/commands/rest.md:215 +#: src/commands/rest.md:239 msgid "" -"Use `curl -sf http://127.0.0.1:8080/v1/ping && echo ok` to script a liveness " -"check — `-f` makes curl exit non-zero on any HTTP error." +"Use `curl -sf http://127.0.0.1:8080/v1/ping && echo ok` to script a " +"liveness check — `-f` makes curl exit non-zero on any HTTP error." msgstr "" "`curl -sf http://127.0.0.1:8080/v1/ping && echo ok` を使うと死活チェックをス" "クリプト化できます。`-f` により、curl は HTTP エラー時に非ゼロの終了コードで" "終了します。" -#: src/commands/rest.md:218 +#: src/commands/rest.md:242 msgid "2. Remove Comments" msgstr "2. コメントの除去" -#: src/commands/rest.md:220 +#: src/commands/rest.md:244 msgid "" -"This endpoint removes comments from the provided source code. It accepts two " -"`Content-Type` variants. Use `application/octet-stream` for raw byte-in / " -"byte-out, and `application/json` for a JSON envelope." +"This endpoint removes comments from the provided source code. It accepts " +"two `Content-Type` variants. Use `application/octet-stream` for raw byte-" +"in / byte-out, and `application/json` for a JSON envelope." msgstr "" -"このエンドポイントは、提供されたソースコードからコメントを除去します。2 つの " -"`Content-Type` バリアントを受け付けます。生バイト入力 / 生バイト出力には " +"このエンドポイントは、提供されたソースコードからコメントを除去します。2 つ" +"の `Content-Type` バリアントを受け付けます。生バイト入力 / 生バイト出力には " "`application/octet-stream` を、JSON エンベロープには `application/json` を使" "用します。" -#: src/commands/rest.md:227 +#: src/commands/rest.md:251 msgid "" "```http\n" "POST http://127.0.0.1:8080/v1/comment\n" @@ -10794,39 +11261,39 @@ msgstr "" "POST http://127.0.0.1:8080/v1/comment\n" "```" -#: src/commands/rest.md:231 src/commands/rest.md:286 src/commands/rest.md:334 -#: src/commands/rest.md:422 src/commands/rest.md:634 +#: src/commands/rest.md:255 src/commands/rest.md:310 src/commands/rest.md:358 +#: src/commands/rest.md:446 src/commands/rest.md:658 msgid "**Payload:**" msgstr "**ペイロード:**" -#: src/commands/rest.md:235 src/commands/rest.md:251 src/commands/rest.md:290 -#: src/commands/rest.md:306 src/commands/rest.md:338 src/commands/rest.md:363 -#: src/commands/rest.md:426 src/commands/rest.md:459 src/commands/rest.md:638 -#: src/commands/rest.md:679 src/commands/rest.md:742 src/commands/rest.md:776 -#: src/commands/rest.md:790 src/commands/rest.md:807 src/commands/rest.md:820 +#: src/commands/rest.md:259 src/commands/rest.md:275 src/commands/rest.md:314 +#: src/commands/rest.md:330 src/commands/rest.md:362 src/commands/rest.md:387 +#: src/commands/rest.md:450 src/commands/rest.md:483 src/commands/rest.md:662 +#: src/commands/rest.md:703 src/commands/rest.md:766 src/commands/rest.md:800 +#: src/commands/rest.md:814 src/commands/rest.md:831 src/commands/rest.md:844 msgid "\"unique-id\"" msgstr "\"unique-id\"" -#: src/commands/rest.md:236 src/commands/rest.md:291 src/commands/rest.md:339 -#: src/commands/rest.md:427 +#: src/commands/rest.md:260 src/commands/rest.md:315 src/commands/rest.md:363 +#: src/commands/rest.md:451 msgid "\"file_name\"" msgstr "\"file_name\"" -#: src/commands/rest.md:236 src/commands/rest.md:291 src/commands/rest.md:339 -#: src/commands/rest.md:427 +#: src/commands/rest.md:260 src/commands/rest.md:315 src/commands/rest.md:363 +#: src/commands/rest.md:451 msgid "\"filename.ext\"" msgstr "\"filename.ext\"" -#: src/commands/rest.md:237 src/commands/rest.md:253 src/commands/rest.md:292 -#: src/commands/rest.md:340 src/commands/rest.md:428 +#: src/commands/rest.md:261 src/commands/rest.md:277 src/commands/rest.md:316 +#: src/commands/rest.md:364 src/commands/rest.md:452 msgid "\"code\"" msgstr "\"code\"" -#: src/commands/rest.md:237 +#: src/commands/rest.md:261 msgid "\"source code with comments\"" msgstr "\"source code with comments\"" -#: src/commands/rest.md:241 src/commands/rest.md:296 +#: src/commands/rest.md:265 src/commands/rest.md:320 msgid "" "`id`: A unique identifier for the request. Optional (issue #645); omitting " "it defaults to an empty string (treated as \"no correlation id\")." @@ -10834,32 +11301,32 @@ msgstr "" "`id`: リクエストの一意な識別子です。省略可能です(issue #645)。省略すると空" "文字列にデフォルトされ、「相関 ID なし」として扱われます。" -#: src/commands/rest.md:244 src/commands/rest.md:299 src/commands/rest.md:348 +#: src/commands/rest.md:268 src/commands/rest.md:323 src/commands/rest.md:372 msgid "`file_name`: The name of the file being analyzed." msgstr "`file_name`: 解析対象のファイル名です。" -#: src/commands/rest.md:245 +#: src/commands/rest.md:269 msgid "`code`: The source code with comments." msgstr "`code`: コメントを含むソースコードです。" -#: src/commands/rest.md:247 +#: src/commands/rest.md:271 msgid "**Response (JSON variant):**" msgstr "**レスポンス(JSON バリアント):**" -#: src/commands/rest.md:252 src/commands/rest.md:307 src/commands/rest.md:364 -#: src/commands/rest.md:460 +#: src/commands/rest.md:276 src/commands/rest.md:331 src/commands/rest.md:388 +#: src/commands/rest.md:484 msgid "\"language\"" msgstr "\"language\"" -#: src/commands/rest.md:252 src/commands/rest.md:307 src/commands/rest.md:539 +#: src/commands/rest.md:276 src/commands/rest.md:331 src/commands/rest.md:563 msgid "\"cpp\"" msgstr "\"cpp\"" -#: src/commands/rest.md:253 +#: src/commands/rest.md:277 msgid "\"print\"" msgstr "\"print\"" -#: src/commands/rest.md:257 +#: src/commands/rest.md:281 msgid "" "The response envelope reports `id`, the detected `language` (the canonical " "lowercase slug — see _Compute Metrics_ below), and the `code` result key. " @@ -10867,21 +11334,22 @@ msgid "" "`code` arrived as a JSON string, so the stripped output is guaranteed valid " "UTF-8 and is handed back as a string, matching the request and every other " "JSON endpoint. The `application/octet-stream` variant returns the stripped " -"source as the raw response body (no envelope), which is the correct home for " -"binary-faithful round-trips and simpler for shell pipelines; its _errors_ " -"still use the uniform JSON error body above." -msgstr "" -"レスポンスのエンベロープは `id`、検出された `language`(正規の小文字スラッグ " -"— 後述の _メトリクスの計算_ を参照)、および結果キー `code` を報告します。" -"`code` フィールドはコメント除去後のソースを保持する**文字列**です。リクエスト" -"の `code` は JSON 文字列として届くため、除去後の出力は有効な UTF-8 であること" -"が保証され、リクエストや他のすべての JSON エンドポイントと同様に文字列として" -"返されます。`application/octet-stream` バリアントは、除去後のソースをそのまま" -"(エンベロープなしの)生のレスポンスボディとして返します。これはバイナリを忠" -"実に往復させる用途に適した形であり、シェルパイプラインでも扱いやすくなりま" -"す。その _エラー_ には引き続き上記の統一 JSON エラーボディが使われます。" - -#: src/commands/rest.md:268 +"source as the raw response body (no envelope), which is the correct home " +"for binary-faithful round-trips and simpler for shell pipelines; its " +"_errors_ still use the uniform JSON error body above." +msgstr "" +"レスポンスのエンベロープは `id`、検出された `language`(正規の小文字スラッ" +"グ — 後述の _メトリクスの計算_ を参照)、および結果キー `code` を報告しま" +"す。`code` フィールドはコメント除去後のソースを保持する**文字列**です。リク" +"エストの `code` は JSON 文字列として届くため、除去後の出力は有効な UTF-8 で" +"あることが保証され、リクエストや他のすべての JSON エンドポイントと同様に文字" +"列として返されます。`application/octet-stream` バリアントは、除去後のソース" +"をそのまま(エンベロープなしの)生のレスポンスボディとして返します。これはバ" +"イナリを忠実に往復させる用途に適した形であり、シェルパイプラインでも扱いやす" +"くなります。その _エラー_ には引き続き上記の統一 JSON エラーボディが使われま" +"す。" + +#: src/commands/rest.md:292 msgid "" "When the source contains no removable comments, both variants signal the " "empty result with a `200` status and an empty payload: the JSON variant " @@ -10890,24 +11358,24 @@ msgid "" "identical regardless of the requested `Content-Type`; the octet-stream " "variant returns an empty `200` body rather than `204 No Content`." msgstr "" -"ソースに除去可能なコメントが含まれない場合、どちらのバリアントも `200` ステー" -"タスと空のペイロードで空の結果を通知します。JSON バリアントは `\"code\": " -"\"\"`(空文字列)を返し、octet-stream バリアントは空のボディを返します。した" -"がって、要求された `Content-Type` にかかわらずステータスコードとエンベロープ" -"の形は同一です。octet-stream バリアントは `204 No Content` ではなく空の " -"`200` ボディを返します。" +"ソースに除去可能なコメントが含まれない場合、どちらのバリアントも `200` ス" +"テータスと空のペイロードで空の結果を通知します。JSON バリアントは " +"`\"code\": \"\"`(空文字列)を返し、octet-stream バリアントは空のボディを返" +"します。したがって、要求された `Content-Type` にかかわらずステータスコードと" +"エンベロープの形は同一です。octet-stream バリアントは `204 No Content` では" +"なく空の `200` ボディを返します。" -#: src/commands/rest.md:276 +#: src/commands/rest.md:300 msgid "3. Retrieve Function Spans" msgstr "3. 関数スパンの取得" -#: src/commands/rest.md:278 +#: src/commands/rest.md:302 msgid "" "This endpoint retrieves the spans of functions in the provided source code." msgstr "" "このエンドポイントは、指定されたソースコード内の関数のスパンを取得します。" -#: src/commands/rest.md:282 +#: src/commands/rest.md:306 msgid "" "```http\n" "POST http://127.0.0.1:8080/v1/function\n" @@ -10917,40 +11385,40 @@ msgstr "" "POST http://127.0.0.1:8080/v1/function\n" "```" -#: src/commands/rest.md:292 +#: src/commands/rest.md:316 msgid "\"source code with functions\"" msgstr "\"source code with functions\"" -#: src/commands/rest.md:300 +#: src/commands/rest.md:324 msgid "`code`: The source code with functions." msgstr "`code`: 関数を含むソースコードです。" -#: src/commands/rest.md:308 +#: src/commands/rest.md:332 msgid "\"spans\"" msgstr "\"spans\"" -#: src/commands/rest.md:310 src/commands/rest.md:381 src/commands/rest.md:462 -#: src/commands/rest.md:468 src/commands/rest.md:539 src/commands/rest.md:540 +#: src/commands/rest.md:334 src/commands/rest.md:405 src/commands/rest.md:486 +#: src/commands/rest.md:492 src/commands/rest.md:563 src/commands/rest.md:564 #: src/library/ast-traversal.md:243 src/python/traversal.md:63 #: src/python/async.md:92 msgid "\"name\"" msgstr "\"name\"" -#: src/commands/rest.md:310 +#: src/commands/rest.md:334 msgid "\"function_name\"" msgstr "\"function_name\"" -#: src/commands/rest.md:311 src/commands/rest.md:368 src/commands/rest.md:374 -#: src/commands/rest.md:380 src/commands/rest.md:463 src/commands/rest.md:469 +#: src/commands/rest.md:335 src/commands/rest.md:392 src/commands/rest.md:398 +#: src/commands/rest.md:404 src/commands/rest.md:487 src/commands/rest.md:493 msgid "\"start_line\"" msgstr "\"start_line\"" -#: src/commands/rest.md:312 src/commands/rest.md:368 src/commands/rest.md:374 -#: src/commands/rest.md:380 src/commands/rest.md:464 src/commands/rest.md:470 +#: src/commands/rest.md:336 src/commands/rest.md:392 src/commands/rest.md:398 +#: src/commands/rest.md:404 src/commands/rest.md:488 src/commands/rest.md:494 msgid "\"end_line\"" msgstr "\"end_line\"" -#: src/commands/rest.md:318 +#: src/commands/rest.md:342 msgid "" "The envelope reports `id`, the detected `language` slug, and the `spans` " "result key. `name` is `null` when the parser could not resolve the " @@ -10958,15 +11426,15 @@ msgid "" "`null` `name` is the malformed-span signal." msgstr "" "エンベロープは `id`、検出された `language` スラッグ、および結果キー `spans` " -"を報告します。パーサーが AST から関数名を解決できなかった場合(無名の定義や不" -"正な形式の定義など)、`name` は `null` になります。`null` の `name` は不正な" -"形式のスパンを示すシグナルです。" +"を報告します。パーサーが AST から関数名を解決できなかった場合(無名の定義や" +"不正な形式の定義など)、`name` は `null` になります。`null` の `name` は不正" +"な形式のスパンを示すシグナルです。" -#: src/commands/rest.md:323 +#: src/commands/rest.md:347 msgid "4. Retrieve the AST" msgstr "4. AST の取得" -#: src/commands/rest.md:325 +#: src/commands/rest.md:349 msgid "" "This endpoint returns the full tree-sitter abstract syntax tree (AST) for " "the provided source code as a recursive JSON node tree." @@ -10974,7 +11442,7 @@ msgstr "" "このエンドポイントは、指定されたソースコードの完全な tree-sitter 抽象構文木" "(AST)を、再帰的な JSON ノードツリーとして返します。" -#: src/commands/rest.md:330 +#: src/commands/rest.md:354 msgid "" "```http\n" "POST http://127.0.0.1:8080/v1/ast\n" @@ -10984,32 +11452,32 @@ msgstr "" "POST http://127.0.0.1:8080/v1/ast\n" "```" -#: src/commands/rest.md:340 +#: src/commands/rest.md:364 msgid "\"source code to parse\"" msgstr "\"source code to parse\"" -#: src/commands/rest.md:341 +#: src/commands/rest.md:365 msgid "\"comment\"" msgstr "\"comment\"" -#: src/commands/rest.md:342 src/commands/rest.md:368 src/commands/rest.md:374 -#: src/commands/rest.md:380 +#: src/commands/rest.md:366 src/commands/rest.md:392 src/commands/rest.md:398 +#: src/commands/rest.md:404 msgid "\"span\"" msgstr "\"span\"" -#: src/commands/rest.md:346 +#: src/commands/rest.md:370 msgid "" -"`id`: A unique identifier for the request. Optional; omitting it defaults to " -"an empty string (treated as \"no correlation id\")." +"`id`: A unique identifier for the request. Optional; omitting it defaults " +"to an empty string (treated as \"no correlation id\")." msgstr "" "`id`: リクエストの一意な識別子です。省略可能です。省略すると空文字列にデフォ" "ルトされ、「相関 ID なし」として扱われます。" -#: src/commands/rest.md:349 +#: src/commands/rest.md:373 msgid "`code`: The source code to parse." msgstr "`code`: パースするソースコードです。" -#: src/commands/rest.md:350 +#: src/commands/rest.md:374 msgid "" "`comment`: When `true`, comment nodes are omitted from the tree. Optional; " "defaults to `false`." @@ -11017,7 +11485,7 @@ msgstr "" "`comment`: `true` の場合、コメントノードがツリーから省かれます。省略可能で、" "デフォルトは `false` です。" -#: src/commands/rest.md:352 +#: src/commands/rest.md:376 msgid "" "`span`: When `true`, each node carries its source `span`; when `false`, " "`span` is `null`. Optional; defaults to `false`." @@ -11025,7 +11493,7 @@ msgstr "" "`span`: `true` の場合、各ノードはソース上の `span` を持ちます。`false` の場" "合、`span` は `null` になります。省略可能で、デフォルトは `false` です。" -#: src/commands/rest.md:355 +#: src/commands/rest.md:379 msgid "" "`id`, `comment`, and `span` are optional and default as noted above (issue " "#645); `file_name` and `code` are required. Unknown keys are rejected with " @@ -11035,7 +11503,7 @@ msgstr "" "#645)。`file_name` と `code` は必須です。未知のキーは `400` で拒否されます" "(issue #633)。" -#: src/commands/rest.md:364 src/commands/rest.md:460 src/commands/rest.md:540 +#: src/commands/rest.md:388 src/commands/rest.md:484 src/commands/rest.md:564 #: src/library/ast-traversal.md:285 src/python/quick-start.md:84 #: src/python/traversal.md:21 src/python/traversal.md:107 #: src/developers/new-language.md:94 src/developers/new-language.md:97 @@ -11043,57 +11511,57 @@ msgstr "" msgid "\"rust\"" msgstr "\"rust\"" -#: src/commands/rest.md:365 src/commands/rest.md:461 +#: src/commands/rest.md:389 src/commands/rest.md:485 msgid "\"root\"" msgstr "\"root\"" -#: src/commands/rest.md:366 src/commands/rest.md:372 src/commands/rest.md:378 +#: src/commands/rest.md:390 src/commands/rest.md:396 src/commands/rest.md:402 #: src/recipes/agent-feedback.md:89 msgid "\"type\"" msgstr "\"type\"" -#: src/commands/rest.md:366 src/library/parse-once.md:83 +#: src/commands/rest.md:390 src/library/parse-once.md:83 msgid "\"source_file\"" msgstr "\"source_file\"" -#: src/commands/rest.md:367 src/commands/rest.md:373 src/commands/rest.md:379 +#: src/commands/rest.md:391 src/commands/rest.md:397 src/commands/rest.md:403 msgid "\"value\"" msgstr "\"value\"" -#: src/commands/rest.md:367 src/commands/rest.md:373 +#: src/commands/rest.md:391 src/commands/rest.md:397 msgid "\"\"" msgstr "\"\"" -#: src/commands/rest.md:368 src/commands/rest.md:374 src/commands/rest.md:380 +#: src/commands/rest.md:392 src/commands/rest.md:398 src/commands/rest.md:404 msgid "\"start_col\"" msgstr "\"start_col\"" -#: src/commands/rest.md:368 src/commands/rest.md:374 src/commands/rest.md:380 +#: src/commands/rest.md:392 src/commands/rest.md:398 src/commands/rest.md:404 msgid "\"end_col\"" msgstr "\"end_col\"" -#: src/commands/rest.md:369 src/commands/rest.md:375 src/commands/rest.md:381 +#: src/commands/rest.md:393 src/commands/rest.md:399 src/commands/rest.md:405 msgid "\"field_name\"" msgstr "\"field_name\"" -#: src/commands/rest.md:370 src/commands/rest.md:376 src/commands/rest.md:382 +#: src/commands/rest.md:394 src/commands/rest.md:400 src/commands/rest.md:406 msgid "\"children\"" msgstr "\"children\"" -#: src/commands/rest.md:372 src/library/ast-traversal.md:242 +#: src/commands/rest.md:396 src/library/ast-traversal.md:242 #: src/python/traversal.md:62 msgid "\"function_item\"" msgstr "\"function_item\"" -#: src/commands/rest.md:378 src/python/traversal.md:67 +#: src/commands/rest.md:402 src/python/traversal.md:67 msgid "\"identifier\"" msgstr "\"identifier\"" -#: src/commands/rest.md:379 +#: src/commands/rest.md:403 msgid "\"main\"" msgstr "\"main\"" -#: src/commands/rest.md:391 +#: src/commands/rest.md:415 msgid "" "The envelope reports `id`, the detected `language` slug, and `root` — the " "root AST node. Each node carries:" @@ -11101,7 +11569,7 @@ msgstr "" "エンベロープは `id`、検出された `language` スラッグ、およびルート AST ノード" "である `root` を報告します。各ノードは次の情報を持ちます。" -#: src/commands/rest.md:394 +#: src/commands/rest.md:418 msgid "" "`type`: the tree-sitter grammar node kind (grammar-specific; the `language` " "slug tells you which grammar produced it)." @@ -11109,14 +11577,14 @@ msgstr "" "`type`: tree-sitter 文法のノード種別です(文法固有です。どの文法が生成したか" "は `language` スラッグで分かります)。" -#: src/commands/rest.md:396 +#: src/commands/rest.md:420 msgid "" "`value`: the source text for leaf/named tokens (empty for interior nodes)." msgstr "" "`value`: リーフ/名前付きトークンのソーステキストです(内部ノードでは空で" "す)。" -#: src/commands/rest.md:398 +#: src/commands/rest.md:422 msgid "" "`span`: a `{ start_line, start_col, end_line, end_col }` object (all 1-" "based), or `null` when `span` was `false`. These span keys use the `*_line` " @@ -11128,42 +11596,43 @@ msgstr "" "キーは `/function` および `/metrics` と共通の `*_line` 語彙を使用します" "(issue \\#638 で旧来の `*_row` キーから改名されました)。" -#: src/commands/rest.md:402 +#: src/commands/rest.md:426 msgid "" -"`field_name`: the tree-sitter grammar field through which the parent reaches " -"this node (e.g. `name`, `left`, `body`), or `null` for the root, anonymous " -"tokens, and unfielded children." +"`field_name`: the tree-sitter grammar field through which the parent " +"reaches this node (e.g. `name`, `left`, `body`), or `null` for the root, " +"anonymous tokens, and unfielded children." msgstr "" -"`field_name`: 親がこのノードに到達する際に経由する tree-sitter 文法フィールド" -"です(例: `name`、`left`、`body`)。ルート、無名トークン、フィールドを持たな" -"い子では `null` になります。" +"`field_name`: 親がこのノードに到達する際に経由する tree-sitter 文法フィール" +"ドです(例: `name`、`left`、`body`)。ルート、無名トークン、フィールドを持た" +"ない子では `null` になります。" -#: src/commands/rest.md:405 +#: src/commands/rest.md:429 msgid "`children`: the node's child nodes, recursively." msgstr "`children`: ノードの子ノードです(再帰的に続きます)。" -#: src/commands/rest.md:407 +#: src/commands/rest.md:431 msgid "" "Unlike the metric and function endpoints, the AST endpoint reports node " "coordinates over the **exact bytes** the client submitted — the source is " -"not EOL-normalised, so spans line up with the client's own copy (issue #640)." +"not EOL-normalised, so spans line up with the client's own copy (issue " +"#640)." msgstr "" "メトリクスや関数のエンドポイントと異なり、AST エンドポイントはクライアントが" "送信した**正確なバイト列**に対するノード座標を報告します。ソースの改行コード" "は正規化されないため、スパンはクライアント側の手元のコピーと一致します" "(issue #640)。" -#: src/commands/rest.md:412 +#: src/commands/rest.md:436 msgid "5. Compute Metrics" msgstr "5. メトリクスの計算" -#: src/commands/rest.md:414 +#: src/commands/rest.md:438 msgid "This endpoint computes various metrics for the provided source code." msgstr "" "このエンドポイントは、指定されたソースコードに対して各種メトリクスを計算しま" "す。" -#: src/commands/rest.md:418 +#: src/commands/rest.md:442 msgid "" "```http\n" "POST http://127.0.0.1:8080/v1/metrics\n" @@ -11173,19 +11642,19 @@ msgstr "" "POST http://127.0.0.1:8080/v1/metrics\n" "```" -#: src/commands/rest.md:428 +#: src/commands/rest.md:452 msgid "\"source code for metrics\"" msgstr "\"source code for metrics\"" -#: src/commands/rest.md:429 +#: src/commands/rest.md:453 msgid "\"scope\"" msgstr "\"scope\"" -#: src/commands/rest.md:429 +#: src/commands/rest.md:453 msgid "\"full\"" msgstr "\"full\"" -#: src/commands/rest.md:433 +#: src/commands/rest.md:457 msgid "" "`id`: Unique identifier for the request. Optional (issue #645); omitting it " "defaults to an empty string (treated as \"no correlation id\")." @@ -11193,44 +11662,44 @@ msgstr "" "`id`: リクエストの一意な識別子です。省略可能です(issue #645)。省略すると空" "文字列にデフォルトされ、「相関 ID なし」として扱われます。" -#: src/commands/rest.md:436 +#: src/commands/rest.md:460 msgid "`file_name`: The filename of the source code file." msgstr "`file_name`: ソースコードファイルのファイル名です。" -#: src/commands/rest.md:437 +#: src/commands/rest.md:461 msgid "`code`: The source code to analyze." msgstr "`code`: 解析するソースコードです。" -#: src/commands/rest.md:438 +#: src/commands/rest.md:462 msgid "" "`scope`: How much of the space tree to return. `full` (the default) returns " "the complete nested space tree — the file-level root plus a recursive " -"`spaces` list for every function, class, and other unit. `file` returns only " -"the file-level root with its `spaces` children cleared. This field replaces " -"the pre-2.0 boolean `unit` flag (issue" -msgstr "" -"`scope`: スペースツリーをどこまで返すかを指定します。`full`(デフォルト)は完" -"全にネストされたスペースツリー、すなわちファイルレベルのルートに加えて、すべ" -"ての関数・クラス・その他のユニットの再帰的な `spaces` リストを返します。" -"`file` はファイルレベルのルートのみを返し、その `spaces` の子は空になります。" -"このフィールドは 2.0 より前のブール値 `unit` フラグを置き換えるものです" +"`spaces` list for every function, class, and other unit. `file` returns " +"only the file-level root with its `spaces` children cleared. This field " +"replaces the pre-2.0 boolean `unit` flag (issue" +msgstr "" +"`scope`: スペースツリーをどこまで返すかを指定します。`full`(デフォルト)は" +"完全にネストされたスペースツリー、すなわちファイルレベルのルートに加えて、す" +"べての関数・クラス・その他のユニットの再帰的な `spaces` リストを返します。" +"`file` はファイルレベルのルートのみを返し、その `spaces` の子は空になりま" +"す。このフィールドは 2.0 より前のブール値 `unit` フラグを置き換えるものです" "(issue" -#: src/commands/rest.md:444 +#: src/commands/rest.md:468 msgid "\\#638); sending the old `unit` key now fails with `400`." msgstr "\\#638)。旧来の `unit` キーを送信すると、現在は `400` で失敗します。" -#: src/commands/rest.md:446 +#: src/commands/rest.md:470 msgid "" "The payload is validated strictly: an unrecognised key (a typo, or the " "removed `unit`) is rejected with `400` and the uniform JSON error body, " "naming the offending field (issue #633)." msgstr "" "ペイロードは厳密に検証されます。認識されないキー(タイプミスや、削除済みの " -"`unit`)は `400` と統一 JSON エラーボディで拒否され、問題のフィールド名が示さ" -"れます(issue #633)。" +"`unit`)は `400` と統一 JSON エラーボディで拒否され、問題のフィールド名が示" +"されます(issue #633)。" -#: src/commands/rest.md:450 +#: src/commands/rest.md:474 msgid "" "On the `application/octet-stream` variant, the source is the raw request " "body and `scope` is supplied as a **query parameter** (`?file_name=…" @@ -11242,118 +11711,119 @@ msgstr "" "&scope=full`)。パラメータを省略するとデフォルトの `full` になり、認識されな" "い値は `400` で拒否されます。" -#: src/commands/rest.md:462 +#: src/commands/rest.md:486 msgid "\"sample.rs\"" msgstr "\"sample.rs\"" -#: src/commands/rest.md:465 +#: src/commands/rest.md:489 msgid "\"unit\"" msgstr "\"unit\"" -#: src/commands/rest.md:466 src/commands/rest.md:472 +#: src/commands/rest.md:490 src/commands/rest.md:496 msgid "\"spaces\"" msgstr "\"spaces\"" -#: src/commands/rest.md:468 +#: src/commands/rest.md:492 msgid "\"double\"" msgstr "\"double\"" -#: src/commands/rest.md:471 +#: src/commands/rest.md:495 msgid "\"function\"" msgstr "\"function\"" -#: src/commands/rest.md:474 src/python/index.md:13 src/python/quick-start.md:46 -#: src/python/metrics.md:20 src/python/async.md:91 +#: src/commands/rest.md:498 src/python/index.md:13 +#: src/python/quick-start.md:46 src/python/metrics.md:20 +#: src/python/async.md:91 msgid "\"cyclomatic\"" msgstr "\"cyclomatic\"" -#: src/commands/rest.md:474 src/python/index.md:13 src/python/async.md:91 +#: src/commands/rest.md:498 src/python/index.md:13 src/python/async.md:91 msgid "\"sum\"" msgstr "\"sum\"" -#: src/commands/rest.md:474 +#: src/commands/rest.md:498 msgid "\"average\"" msgstr "\"average\"" -#: src/commands/rest.md:474 +#: src/commands/rest.md:498 msgid "\"min\"" msgstr "\"min\"" -#: src/commands/rest.md:474 +#: src/commands/rest.md:498 msgid "\"max\"" msgstr "\"max\"" -#: src/commands/rest.md:475 src/python/quick-start.md:85 src/python/batch.md:37 -#: src/python/errors.md:229 +#: src/commands/rest.md:499 src/python/quick-start.md:85 +#: src/python/batch.md:37 src/python/errors.md:229 msgid "\"sloc\"" msgstr "\"sloc\"" -#: src/commands/rest.md:475 +#: src/commands/rest.md:499 msgid "\"ploc\"" msgstr "\"ploc\"" -#: src/commands/rest.md:475 +#: src/commands/rest.md:499 msgid "\"lloc\"" msgstr "\"lloc\"" -#: src/commands/rest.md:475 +#: src/commands/rest.md:499 msgid "\"cloc\"" msgstr "\"cloc\"" -#: src/commands/rest.md:475 +#: src/commands/rest.md:499 msgid "\"blank\"" msgstr "\"blank\"" -#: src/commands/rest.md:476 +#: src/commands/rest.md:500 msgid "\"nom\"" msgstr "\"nom\"" -#: src/commands/rest.md:476 +#: src/commands/rest.md:500 msgid "\"functions\"" msgstr "\"functions\"" -#: src/commands/rest.md:476 +#: src/commands/rest.md:500 msgid "\"closures\"" msgstr "\"closures\"" -#: src/commands/rest.md:476 src/python/batch.md:40 +#: src/commands/rest.md:500 src/python/batch.md:40 msgid "\"total\"" msgstr "\"total\"" -#: src/commands/rest.md:480 src/commands/rest.md:539 src/commands/rest.md:685 +#: src/commands/rest.md:504 src/commands/rest.md:563 src/commands/rest.md:709 msgid "\"...\"" msgstr "\"...\"" -#: src/commands/rest.md:480 +#: src/commands/rest.md:504 msgid "\"the same metric block, aggregated over the file\"" msgstr "\"the same metric block, aggregated over the file\"" -#: src/commands/rest.md:485 +#: src/commands/rest.md:509 msgid "" -"The response envelope reports `id`, the detected `language` slug, and `root` " -"— the **single** file-level space object (issue #638 renamed this key from " -"the misleading plural `spaces`). `root` carries `name` (the request " -"`file_name`), the `start_line` / `end_line` span, a `kind` discriminator " -"(`unit`, `function`, `class`, …), its `metrics` block, and a recursive " -"`spaces` list of child units. The example above is **trimmed**: each real " -"`metrics` block contains every metric family — `cyclomatic`, `cognitive`, " -"`halstead`, `loc`, `nom`, `nargs`, `nexits`, `tokens`, `mi`, `abc`, and " -"`wmc` — with the same nested fields the `bca` CLI emits. When `scope` is " -"`file`, `root.spaces` is an empty list." +"The response envelope reports `id`, the detected `language` slug, and " +"`root` — the **single** file-level space object (issue #638 renamed this " +"key from the misleading plural `spaces`). `root` carries `name` (the " +"request `file_name`), the `start_line` / `end_line` span, a `kind` " +"discriminator (`unit`, `function`, `class`, …), its `metrics` block, and a " +"recursive `spaces` list of child units. The example above is **trimmed**: " +"each real `metrics` block contains every metric family — `cyclomatic`, " +"`cognitive`, `halstead`, `loc`, `nom`, `nargs`, `nexits`, `tokens`, `mi`, " +"`abc`, and `wmc` — with the same nested fields the `bca` CLI emits. When " +"`scope` is `file`, `root.spaces` is an empty list." msgstr "" "レスポンスのエンベロープは `id`、検出された `language` スラッグ、および " "`root` — **単一の**ファイルレベルのスペースオブジェクト — を報告します" -"(issue #638 で、誤解を招く複数形の `spaces` からこのキーに改名されました)。" -"`root` は `name`(リクエストの `file_name`)、`start_line` / `end_line` のス" -"パン、`kind` 判別子(`unit`、`function`、`class` など)、その `metrics` ブ" -"ロック、および子ユニットの再帰的な `spaces` リストを持ちます。上の例は**省略" -"されています**。実際の各 `metrics` ブロックには、すべてのメトリクスファミ" -"リー — `cyclomatic`、`cognitive`、`halstead`、`loc`、`nom`、`nargs`、" -"`nexits`、`tokens`、`mi`、`abc`、`wmc` — が、`bca` CLI が出力するのと同じネス" -"トされたフィールドとともに含まれます。`scope` が `file` の場合、`root." -"spaces` は空のリストになります。" - -#: src/commands/rest.md:496 +"(issue #638 で、誤解を招く複数形の `spaces` からこのキーに改名されまし" +"た)。`root` は `name`(リクエストの `file_name`)、`start_line` / " +"`end_line` のスパン、`kind` 判別子(`unit`、`function`、`class` など)、そ" +"の `metrics` ブロック、および子ユニットの再帰的な `spaces` リストを持ちま" +"す。上の例は**省略されています**。実際の各 `metrics` ブロックには、すべての" +"メトリクスファミリー — `cyclomatic`、`cognitive`、`halstead`、`loc`、`nom`、" +"`nargs`、`nexits`、`tokens`、`mi`、`abc`、`wmc` — が、`bca` CLI が出力するの" +"と同じネストされたフィールドとともに含まれます。`scope` が `file` の場合、" +"`root.spaces` は空のリストになります。" + +#: src/commands/rest.md:520 msgid "" "The `language` value is the **canonical lowercase slug** (e.g. `rust`, " "`cpp`, `csharp`, `tsx`) — the same token the language vocabulary accepts — " @@ -11362,24 +11832,24 @@ msgid "" "can confirm which grammar was selected." msgstr "" "`language` の値は**正規の小文字スラッグ**(例: `rust`、`cpp`、`csharp`、" -"`tsx`)です。これは言語語彙が受け付けるトークンと同じもので、人間向けの表示名" -"ではありません。すべての解析エンドポイント(`/ast`、`/comment`、`/function`、" -"`/metrics`)がこの `language` フィールドを報告するため、クライアントはどの文" -"法が選択されたかを確認できます。" +"`tsx`)です。これは言語語彙が受け付けるトークンと同じもので、人間向けの表示" +"名ではありません。すべての解析エンドポイント(`/ast`、`/comment`、`/" +"function`、`/metrics`)がこの `language` フィールドを報告するため、クライア" +"ントはどの文法が選択されたかを確認できます。" -#: src/commands/rest.md:502 +#: src/commands/rest.md:526 msgid "6. Server and Library Version" msgstr "6. サーバーとライブラリのバージョン" -#: src/commands/rest.md:504 +#: src/commands/rest.md:528 msgid "" "Reports the running server version and the version of the `big-code-" "analysis` library it was built against." msgstr "" -"実行中のサーバーのバージョンと、そのビルドに使用された `big-code-analysis` ラ" -"イブラリのバージョンを報告します。" +"実行中のサーバーのバージョンと、そのビルドに使用された `big-code-analysis` " +"ライブラリのバージョンを報告します。" -#: src/commands/rest.md:509 +#: src/commands/rest.md:533 msgid "" "```http\n" "GET http://127.0.0.1:8080/v1/version\n" @@ -11389,34 +11859,34 @@ msgstr "" "GET http://127.0.0.1:8080/v1/version\n" "```" -#: src/commands/rest.md:517 +#: src/commands/rest.md:541 msgid "\"server\"" msgstr "\"server\"" -#: src/commands/rest.md:517 src/commands/rest.md:518 src/commands/rest.md:568 +#: src/commands/rest.md:541 src/commands/rest.md:542 src/commands/rest.md:592 #: src/recipes/ci.md:106 msgid "\"2.0.0\"" msgstr "\"2.0.0\"" -#: src/commands/rest.md:518 +#: src/commands/rest.md:542 msgid "\"library\"" msgstr "\"library\"" -#: src/commands/rest.md:522 +#: src/commands/rest.md:546 msgid "7. Supported Languages" msgstr "7. 対応言語" -#: src/commands/rest.md:524 +#: src/commands/rest.md:548 msgid "" "Lists the supported languages and their registered file extensions. The " -"names are the canonical lowercase slugs; the list and extensions are sourced " -"from the library's language table, never hardcoded." +"names are the canonical lowercase slugs; the list and extensions are " +"sourced from the library's language table, never hardcoded." msgstr "" "対応言語と、登録されているファイル拡張子の一覧を返します。名前は正規の小文字" "スラッグです。一覧と拡張子はライブラリの言語テーブルから取得され、ハードコー" "ドされることはありません。" -#: src/commands/rest.md:530 +#: src/commands/rest.md:554 msgid "" "```http\n" "GET http://127.0.0.1:8080/v1/languages\n" @@ -11426,55 +11896,55 @@ msgstr "" "GET http://127.0.0.1:8080/v1/languages\n" "```" -#: src/commands/rest.md:538 +#: src/commands/rest.md:562 msgid "\"languages\"" msgstr "\"languages\"" -#: src/commands/rest.md:539 src/commands/rest.md:540 +#: src/commands/rest.md:563 src/commands/rest.md:564 msgid "\"extensions\"" msgstr "\"extensions\"" -#: src/commands/rest.md:539 +#: src/commands/rest.md:563 msgid "\"cc\"" msgstr "\"cc\"" -#: src/commands/rest.md:539 +#: src/commands/rest.md:563 msgid "\"hpp\"" msgstr "\"hpp\"" -#: src/commands/rest.md:540 src/python/vcs.md:169 +#: src/commands/rest.md:564 src/python/vcs.md:169 msgid "\"rs\"" msgstr "\"rs\"" -#: src/commands/rest.md:545 +#: src/commands/rest.md:569 msgid "" -"Like every endpoint, `/version` and `/languages` are served only under the `/" -"v1` prefix; the unprefixed `1.x` aliases were removed in 2.0 (see [API " +"Like every endpoint, `/version` and `/languages` are served only under the " +"`/v1` prefix; the unprefixed `1.x` aliases were removed in 2.0 (see [API " "Versioning](#api-versioning))." msgstr "" "他のすべてのエンドポイントと同様に、`/version` と `/languages` は `/v1` プレ" "フィックスの下でのみ提供されます。プレフィックスなしの `1.x` エイリアスは " "2.0 で削除されました([API バージョニング](#api-versioning)を参照)。" -#: src/commands/rest.md:549 +#: src/commands/rest.md:573 msgid "8. Route index" msgstr "8. ルートインデックス" -#: src/commands/rest.md:551 +#: src/commands/rest.md:575 msgid "" "Returns a machine-readable index of every registered route — its path, the " "HTTP methods it accepts, and a one-line description — so clients can " "discover the API surface without scraping this chapter. The index is " -"generated from the same route table the server registers, so it cannot drift " -"from the live routing." +"generated from the same route table the server registers, so it cannot " +"drift from the live routing." msgstr "" -"登録されているすべてのルートの機械可読なインデックス — パス、受け付ける HTTP " -"メソッド、1 行の説明 — を返します。これによりクライアントは、本章をスクレイピ" -"ングすることなく API サーフェスを発見できます。インデックスはサーバーが登録す" -"るのと同じルートテーブルから生成されるため、実際のルーティングから乖離するこ" -"とはありません。" +"登録されているすべてのルートの機械可読なインデックス — パス、受け付ける " +"HTTP メソッド、1 行の説明 — を返します。これによりクライアントは、本章をスク" +"レイピングすることなく API サーフェスを発見できます。インデックスはサーバー" +"が登録するのと同じルートテーブルから生成されるため、実際のルーティングから乖" +"離することはありません。" -#: src/commands/rest.md:559 +#: src/commands/rest.md:583 msgid "" "```http\n" "GET http://127.0.0.1:8080/v1\n" @@ -11484,74 +11954,74 @@ msgstr "" "GET http://127.0.0.1:8080/v1\n" "```" -#: src/commands/rest.md:567 +#: src/commands/rest.md:591 msgid "\"service\"" msgstr "\"service\"" -#: src/commands/rest.md:567 +#: src/commands/rest.md:591 msgid "\"bca-web\"" msgstr "\"bca-web\"" -#: src/commands/rest.md:568 +#: src/commands/rest.md:592 msgid "\"version\"" msgstr "\"version\"" -#: src/commands/rest.md:569 +#: src/commands/rest.md:593 msgid "\"routes\"" msgstr "\"routes\"" -#: src/commands/rest.md:570 src/commands/rest.md:571 src/commands/rest.md:688 +#: src/commands/rest.md:594 src/commands/rest.md:595 src/commands/rest.md:712 msgid "\"path\"" msgstr "\"path\"" -#: src/commands/rest.md:570 +#: src/commands/rest.md:594 msgid "\"/v1\"" msgstr "\"/v1\"" -#: src/commands/rest.md:570 src/commands/rest.md:571 +#: src/commands/rest.md:594 src/commands/rest.md:595 msgid "\"methods\"" msgstr "\"methods\"" -#: src/commands/rest.md:570 +#: src/commands/rest.md:594 msgid "\"GET\"" msgstr "\"GET\"" -#: src/commands/rest.md:570 src/commands/rest.md:778 src/python/vcs.md:15 +#: src/commands/rest.md:594 src/commands/rest.md:802 src/python/vcs.md:15 #: src/python/vcs.md:81 msgid "\"HEAD\"" msgstr "\"HEAD\"" -#: src/commands/rest.md:570 src/commands/rest.md:571 +#: src/commands/rest.md:594 src/commands/rest.md:595 msgid "\"description\"" msgstr "\"description\"" -#: src/commands/rest.md:570 +#: src/commands/rest.md:594 msgid "\"This route index.\"" msgstr "\"This route index.\"" -#: src/commands/rest.md:571 +#: src/commands/rest.md:595 msgid "\"/v1/metrics\"" msgstr "\"/v1/metrics\"" -#: src/commands/rest.md:571 +#: src/commands/rest.md:595 msgid "\"POST\"" msgstr "\"POST\"" -#: src/commands/rest.md:571 +#: src/commands/rest.md:595 msgid "\"Compute maintainability metrics for the source.\"" msgstr "\"Compute maintainability metrics for the source.\"" -#: src/commands/rest.md:576 +#: src/commands/rest.md:600 msgid "" -"`service` is always `bca-web`; `version` matches the `server` field of `GET /" -"v1/version`. The unprefixed root `/` that earlier releases served as this " -"endpoint's alias was removed in 2.0." +"`service` is always `bca-web`; `version` matches the `server` field of " +"`GET /v1/version`. The unprefixed root `/` that earlier releases served as " +"this endpoint's alias was removed in 2.0." msgstr "" "`service` は常に `bca-web` です。`version` は `GET /v1/version` の `server` " "フィールドと一致します。以前のリリースでこのエンドポイントのエイリアスとして" "提供されていたプレフィックスなしのルート `/` は、2.0 で削除されました。" -#: src/commands/rest.md:582 +#: src/commands/rest.md:606 msgid "" "Three endpoints expose the change-history (version-control) metrics — the " "same numbers `bca vcs` computes from the CLI. Unlike every other endpoint, " @@ -11562,28 +12032,29 @@ msgstr "" "3 つのエンドポイントが変更履歴(バージョン管理)メトリクス — CLI の `bca " "vcs` が計算するのと同じ数値 — を公開します。他のすべてのエンドポイントと異な" "り、これらはリクエストボディで運ばれるソースコードではなく、**サーバーのファ" -"イルシステム上に既に存在する git リポジトリ**を解析します。VCS メトリクスはコ" -"ミット履歴から導出されるものであり、リクエスト内に表現を持たないためです。" +"イルシステム上に既に存在する git リポジトリ**を解析します。VCS メトリクスは" +"コミット履歴から導出されるものであり、リクエスト内に表現を持たないためです。" -#: src/commands/rest.md:589 +#: src/commands/rest.md:613 msgid "" "**Operator warning — `repo_path` is a trust boundary.** The `repo_path` " -"field is a server-side filesystem path. These endpoints make the server walk " -"_any_ git repository it can read and return that repository's relative file " -"paths, churn, and author signals. This is materially different from the " -"source-in-body endpoints, which only ever see code the client sends. The " -"optional `cache_dir` field is a second caller-supplied server-side path that " -"grants a _write_ capability: with caching enabled (the default), the server " -"creates directories and writes JSON cache files under it (`/" -"/.json`), so a caller controlling `cache_dir` can direct the " -"server to write cache files at any path the server process can write to. " -"(`cache_dir` is accepted only by `/vcs`; `/vcs/trend` and `/vcs/jit` do not " -"cache.) The endpoint's filesystem reach is therefore an arbitrary read of " -"any readable git repository _and_ an arbitrary write of cache files under " -"any writable path. **Do not expose `/vcs`, `/vcs/trend`, or `/vcs/jit` to " -"untrusted clients without an authorization layer in front of `bca-web`.** " -"The default `127.0.0.1` bind keeps them local. Each walk runs under the same " -"parse-timeout and blocking-pool guard as the analysis endpoints." +"field is a server-side filesystem path. These endpoints make the server " +"walk _any_ git repository it can read and return that repository's relative " +"file paths, churn, and author signals. This is materially different from " +"the source-in-body endpoints, which only ever see code the client sends. " +"The optional `cache_dir` field is a second caller-supplied server-side path " +"that grants a _write_ capability: with caching enabled (the default), the " +"server creates directories and writes JSON cache files under it " +"(`//.json`), so a caller controlling `cache_dir` " +"can direct the server to write cache files at any path the server process " +"can write to. (`cache_dir` is accepted only by `/vcs`; `/vcs/trend` and `/" +"vcs/jit` do not cache.) The endpoint's filesystem reach is therefore an " +"arbitrary read of any readable git repository _and_ an arbitrary write of " +"cache files under any writable path. **Do not expose `/vcs`, `/vcs/trend`, " +"or `/vcs/jit` to untrusted clients without an authorization layer in front " +"of `bca-web`.** The default `127.0.0.1` bind keeps them local. Each walk " +"runs under the same parse-timeout and blocking-pool guard as the analysis " +"endpoints." msgstr "" "**運用者向け警告 — `repo_path` は信頼境界です。** `repo_path` フィールドは" "サーバー側のファイルシステムパスです。これらのエンドポイントは、サーバーが読" @@ -11596,15 +12067,15 @@ msgstr "" "(`//.json`)ため、`cache_dir` を制御する呼び出し" "側は、サーバープロセスが書き込める任意のパスにキャッシュファイルを書かせるこ" "とができます。(`cache_dir` を受け付けるのは `/vcs` のみで、`/vcs/trend` と " -"`/vcs/jit` はキャッシュしません。)したがって、このエンドポイントのファイルシ" -"ステム到達範囲は、読み取り可能な任意の git リポジトリの任意読み取り _および_ " -"書き込み可能な任意のパス配下へのキャッシュファイルの任意書き込みです。**`bca-" -"web` の前段に認可レイヤーを置かないまま、`/vcs`、`/vcs/trend`、`/vcs/jit` を" -"信頼できないクライアントに公開しないでください。** デフォルトの `127.0.0.1` " -"バインドはこれらをローカルに留めます。各走査は、解析エンドポイントと同じパー" -"スタイムアウトとブロッキングプールのガードの下で実行されます。" +"`/vcs/jit` はキャッシュしません。)したがって、このエンドポイントのファイル" +"システム到達範囲は、読み取り可能な任意の git リポジトリの任意読み取り _およ" +"び_ 書き込み可能な任意のパス配下へのキャッシュファイルの任意書き込みです。" +"**`bca-web` の前段に認可レイヤーを置かないまま、`/vcs`、`/vcs/trend`、`/vcs/" +"jit` を信頼できないクライアントに公開しないでください。** デフォルトの " +"`127.0.0.1` バインドはこれらをローカルに留めます。各走査は、解析エンドポイン" +"トと同じパースタイムアウトとブロッキングプールのガードの下で実行されます。" -#: src/commands/rest.md:610 +#: src/commands/rest.md:634 msgid "" "All three endpoints are `POST`\\-only, accept `application/json`, echo the " "request `id`, and report errors with the uniform `{error, error_kind, id}` " @@ -11615,26 +12086,26 @@ msgid "" "diff `diff`, or a malformed window / timestamp / formula / file-type / " "threshold / trend parameter — is a `400`; a failure of the history walk " "itself is a `500`. A nonexistent `repo_path` is a typo — the most common " -"client error here — so it answers `400` like a path that exists but is not a " -"repository, not a `500` (issue 653)." -msgstr "" -"3 つのエンドポイントはいずれも `POST` 専用で、`application/json` を受け付け、" -"リクエストの `id` をエコーバックし、統一の `{error, error_kind, id}` ボディで" -"エラーを報告します(その `error_kind` トークンは `vcs_*` ファミリーです — " -"例: `vcs_not_a_repository`、`vcs_invalid_window`)。クライアント側の誤り — " -"`repo_path` が存在しない、または git 作業ツリーでない(どちらも " +"client error here — so it answers `400` like a path that exists but is not " +"a repository, not a `500` (issue 653)." +msgstr "" +"3 つのエンドポイントはいずれも `POST` 専用で、`application/json` を受け付" +"け、リクエストの `id` をエコーバックし、統一の `{error, error_kind, id}` ボ" +"ディでエラーを報告します(その `error_kind` トークンは `vcs_*` ファミリーで" +"す — 例: `vcs_not_a_repository`、`vcs_invalid_window`)。クライアント側の誤" +"り — `repo_path` が存在しない、または git 作業ツリーでない(どちらも " "`vcs_not_a_repository` を伴います)、解決できない `ref`/`commit`、不正な形式" "または diff でない `diff`、不正な形式のウィンドウ / タイムスタンプ / 式 / " "ファイルタイプ / しきい値 / トレンドのパラメータ — は `400` です。履歴走査自" -"体の失敗は `500` です。存在しない `repo_path` はタイプミス — ここで最も多いク" -"ライアントエラー — であるため、存在するもののリポジトリではないパスと同様に、" -"`500` ではなく `400` を返します(issue 653)。" +"体の失敗は `500` です。存在しない `repo_path` はタイプミス — ここで最も多い" +"クライアントエラー — であるため、存在するもののリポジトリではないパスと同様" +"に、`500` ではなく `400` を返します(issue 653)。" -#: src/commands/rest.md:623 +#: src/commands/rest.md:647 msgid "9. Rank files by risk — `/vcs`" msgstr "9. リスク順のファイルランキング — `/vcs`" -#: src/commands/rest.md:625 +#: src/commands/rest.md:649 msgid "" "Walks the repository's history once and returns its files ranked by a " "composite risk score (issue #328)." @@ -11642,7 +12113,7 @@ msgstr "" "リポジトリの履歴を一度だけ走査し、複合リスクスコアでランク付けしたファイル一" "覧を返します(issue #328)。" -#: src/commands/rest.md:630 +#: src/commands/rest.md:654 msgid "" "```http\n" "POST http://127.0.0.1:8080/v1/vcs\n" @@ -11652,34 +12123,34 @@ msgstr "" "POST http://127.0.0.1:8080/v1/vcs\n" "```" -#: src/commands/rest.md:639 src/commands/rest.md:777 +#: src/commands/rest.md:663 src/commands/rest.md:801 msgid "\"repo_path\"" msgstr "\"repo_path\"" -#: src/commands/rest.md:639 src/commands/rest.md:777 +#: src/commands/rest.md:663 src/commands/rest.md:801 msgid "\"/srv/repos/my-project\"" msgstr "\"/srv/repos/my-project\"" -#: src/commands/rest.md:643 +#: src/commands/rest.md:667 msgid "" "`repo_path` is required; every other field is optional and defaults to the " "`bca vcs` default. `id` is optional too (issue #645) — omitting it defaults " "to an empty string, echoed back unchanged. The optional fields are:" msgstr "" "`repo_path` は必須です。他のすべてのフィールドは省略可能で、デフォルトは " -"`bca vcs` のデフォルト値です。`id` も省略可能で(issue #645)、省略すると空文" -"字列となり、そのままエコーバックされます。省略可能なフィールドは次のとおりで" -"す。" +"`bca vcs` のデフォルト値です。`id` も省略可能で(issue #645)、省略すると空" +"文字列となり、そのままエコーバックされます。省略可能なフィールドは次のとおり" +"です。" -#: src/commands/rest.md:648 +#: src/commands/rest.md:672 msgid "" -"`long_window` / `recent_window`: window specs (e.g. `12mo`, `90d`). Defaults " -"`12mo` / `90d`." +"`long_window` / `recent_window`: window specs (e.g. `12mo`, `90d`). " +"Defaults `12mo` / `90d`." msgstr "" "`long_window` / `recent_window`: ウィンドウ指定です(例: `12mo`、`90d`)。デ" "フォルトは `12mo` / `90d` です。" -#: src/commands/rest.md:650 +#: src/commands/rest.md:674 msgid "" "`top`: keep only the top _N_ files by risk. Absent defaults to `50` (the " "`bca vcs --top` default); an explicit `0` returns all files." @@ -11688,79 +12159,79 @@ msgstr "" "は `50`(`bca vcs --top` のデフォルト)で、明示的に `0` を指定するとすべての" "ファイルを返します。" -#: src/commands/rest.md:652 +#: src/commands/rest.md:676 msgid "`ref`: revision to analyse (default `HEAD`)." msgstr "`ref`: 解析対象のリビジョンです(デフォルトは `HEAD`)。" -#: src/commands/rest.md:653 +#: src/commands/rest.md:677 msgid "`risk_formula`: `weighted` (default) or `percentile`." msgstr "`risk_formula`: `weighted`(デフォルト)または `percentile` です。" -#: src/commands/rest.md:654 +#: src/commands/rest.md:678 msgid "" "`file_types`: `metrics` (default — only files bca has metrics for), `all` " "(every tracked text file), or a comma-separated extension allow-list (`rs," "py`)." msgstr "" "`file_types`: `metrics`(デフォルト — bca がメトリクスを持つファイルのみ)、" -"`all`(追跡されているすべてのテキストファイル)、またはカンマ区切りの拡張子許" -"可リスト(`rs,py`)です。" +"`all`(追跡されているすべてのテキストファイル)、またはカンマ区切りの拡張子" +"許可リスト(`rs,py`)です。" -#: src/commands/rest.md:657 +#: src/commands/rest.md:681 msgid "`full_history`: walk the full DAG rather than first-parent only." msgstr "`full_history`: 第一親のみではなく、完全な DAG を走査します。" -#: src/commands/rest.md:658 +#: src/commands/rest.md:682 msgid "`include_merges`: include merge commits." msgstr "`include_merges`: マージコミットを含めます。" -#: src/commands/rest.md:659 +#: src/commands/rest.md:683 msgid "`follow_renames`: follow renames (default `true`)." msgstr "`follow_renames`: リネームを追跡します(デフォルト `true`)。" -#: src/commands/rest.md:660 +#: src/commands/rest.md:684 msgid "`exclude_bots`: exclude bot identities (default `true`)." msgstr "`exclude_bots`: ボットの識別情報を除外します(デフォルト `true`)。" -#: src/commands/rest.md:661 +#: src/commands/rest.md:685 msgid "`bot_pattern`: override the bot-author exclusion regex." msgstr "`bot_pattern`: ボット作者を除外する正規表現を上書きします。" -#: src/commands/rest.md:662 +#: src/commands/rest.md:686 msgid "" "`as_of`: reference \"now\" (RFC 3339 / `@unix` / git date) for snapshots." msgstr "" "`as_of`: スナップショットの基準となる「現在」(RFC 3339 / `@unix` / git の日" "付形式)を指定します。" -#: src/commands/rest.md:664 +#: src/commands/rest.md:688 msgid "`emit_author_details`: emit SHA-256-hashed author identities." msgstr "" "`emit_author_details`: SHA-256 でハッシュ化した作者の識別情報を出力します。" -#: src/commands/rest.md:665 +#: src/commands/rest.md:689 msgid "" "`author_hash_key`: secret key that hardens `emit_author_details` into a " "keyed HMAC-SHA256 (requires `emit_author_details`; an empty key or one " "without the flag is a `400`)." msgstr "" "`author_hash_key`: `emit_author_details` を鍵付き HMAC-SHA256 に強化する秘密" -"鍵です(`emit_author_details` が必要です。空の鍵、またはフラグなしでの指定は " -"`400` になります)。" +"鍵です(`emit_author_details` が必要です。空の鍵、またはフラグなしでの指定" +"は `400` になります)。" -#: src/commands/rest.md:668 +#: src/commands/rest.md:692 msgid "`include_deleted`: include files deleted at the target ref." msgstr "`include_deleted`: 対象の ref で削除済みのファイルを含めます。" -#: src/commands/rest.md:669 +#: src/commands/rest.md:693 msgid "" "`bus_factor_threshold`: bus-factor coverage threshold in `(0, 1)` (default " "`0.5`)." msgstr "" -"`bus_factor_threshold`: `(0, 1)` の範囲で指定するバスファクターのカバレッジし" -"きい値です(デフォルト `0.5`)。" +"`bus_factor_threshold`: `(0, 1)` の範囲で指定するバスファクターのカバレッジ" +"しきい値です(デフォルト `0.5`)。" -#: src/commands/rest.md:671 +#: src/commands/rest.md:695 msgid "" "`no_cache`: disable the persistent change-history cache for this request " "(default `false`)." @@ -11768,87 +12239,87 @@ msgstr "" "`no_cache`: このリクエストで永続的な変更履歴キャッシュを無効にします(デフォ" "ルト `false`)。" -#: src/commands/rest.md:673 +#: src/commands/rest.md:697 msgid "`cache_dir`: override the server-side cache directory." msgstr "`cache_dir`: サーバー側のキャッシュディレクトリを上書きします。" -#: src/commands/rest.md:680 src/commands/rest.md:744 +#: src/commands/rest.md:704 src/commands/rest.md:768 msgid "\"vcs_schema_version\"" msgstr "\"vcs_schema_version\"" -#: src/commands/rest.md:681 src/commands/rest.md:745 +#: src/commands/rest.md:705 src/commands/rest.md:769 msgid "\"risk_score_version\"" msgstr "\"risk_score_version\"" -#: src/commands/rest.md:682 src/commands/rest.md:746 src/commands/rest.md:794 +#: src/commands/rest.md:706 src/commands/rest.md:770 src/commands/rest.md:818 msgid "\"long_window_days\"" msgstr "\"long_window_days\"" -#: src/commands/rest.md:683 src/commands/rest.md:747 src/commands/rest.md:795 +#: src/commands/rest.md:707 src/commands/rest.md:771 src/commands/rest.md:819 msgid "\"recent_window_days\"" msgstr "\"recent_window_days\"" -#: src/commands/rest.md:684 src/commands/rest.md:748 +#: src/commands/rest.md:708 src/commands/rest.md:772 msgid "\"truncated_shallow_clone\"" msgstr "\"truncated_shallow_clone\"" -#: src/commands/rest.md:685 src/python/vcs.md:65 +#: src/commands/rest.md:709 src/python/vcs.md:65 msgid "\"vcs_aggregate\"" msgstr "\"vcs_aggregate\"" -#: src/commands/rest.md:685 +#: src/commands/rest.md:709 msgid "\"directory- / repo-level bus factor\"" msgstr "\"directory- / repo-level bus factor\"" -#: src/commands/rest.md:686 src/commands/rest.md:750 src/python/vcs.md:51 +#: src/commands/rest.md:710 src/commands/rest.md:774 src/python/vcs.md:51 msgid "\"files\"" msgstr "\"files\"" -#: src/commands/rest.md:688 src/commands/rest.md:751 src/python/index.md:11 +#: src/commands/rest.md:712 src/commands/rest.md:775 src/python/index.md:11 msgid "\"src/main.rs\"" msgstr "\"src/main.rs\"" -#: src/commands/rest.md:689 src/commands/rest.md:751 src/python/vcs.md:52 +#: src/commands/rest.md:713 src/commands/rest.md:775 src/python/vcs.md:52 msgid "\"vcs\"" msgstr "\"vcs\"" -#: src/commands/rest.md:690 +#: src/commands/rest.md:714 msgid "\"commits_long\"" msgstr "\"commits_long\"" -#: src/commands/rest.md:691 +#: src/commands/rest.md:715 msgid "\"commits_recent\"" msgstr "\"commits_recent\"" -#: src/commands/rest.md:692 +#: src/commands/rest.md:716 msgid "\"churn_long\"" msgstr "\"churn_long\"" -#: src/commands/rest.md:693 +#: src/commands/rest.md:717 msgid "\"churn_recent\"" msgstr "\"churn_recent\"" -#: src/commands/rest.md:694 +#: src/commands/rest.md:718 msgid "\"authors_long\"" msgstr "\"authors_long\"" -#: src/commands/rest.md:695 +#: src/commands/rest.md:719 msgid "\"authors_recent\"" msgstr "\"authors_recent\"" -#: src/commands/rest.md:696 src/commands/rest.md:751 src/commands/rest.md:796 +#: src/commands/rest.md:720 src/commands/rest.md:775 src/commands/rest.md:820 msgid "\"risk_score\"" msgstr "\"risk_score\"" -#: src/commands/rest.md:703 +#: src/commands/rest.md:727 msgid "" "`files` is ordered by descending `vcs.risk_score`. Each entry carries the " "repository-relative `path` plus a nested `vcs` metric block (the same shape " "`bca vcs` emits, issue #684): commit and churn counts over the long and " "recent windows, author counts, ownership share, burst, bug-fix / security-" "fix / revert counts, age, change and co-change entropy, and the composite " -"`risk_score`. `hotspot_score` and the hashed `author_ids` appear inside that " -"block only when computable / requested. The four constant stamps " +"`risk_score`. `hotspot_score` and the hashed `author_ids` appear inside " +"that block only when computable / requested. The four constant stamps " "`vcs_schema_version`, `risk_score_version`, `long_window_days`, and " "`recent_window_days` sit once at the top level, never per row (issue #635). " "`vcs_aggregate` carries the directory- and repo-level bus factor (issue " @@ -11858,29 +12329,29 @@ msgstr "" "`path` と、入れ子の `vcs` メトリクスブロック(`bca vcs` が出力するものと同じ" "形式、issue #684)を持ちます。含まれるのは、長期・直近ウィンドウでのコミット" "数とチャーン数、作者数、所有権シェア、バースト、バグ修正 / セキュリティ修" -"正 / リバートの各カウント、経過期間、変更エントロピーと共変更エントロピー、そ" -"して合成値の `risk_score` です。`hotspot_score` とハッシュ化された " +"正 / リバートの各カウント、経過期間、変更エントロピーと共変更エントロピー、" +"そして合成値の `risk_score` です。`hotspot_score` とハッシュ化された " "`author_ids` は、計算可能な場合 / 要求された場合にのみそのブロック内に現れま" "す。4 つの定数スタンプ `vcs_schema_version`、`risk_score_version`、" -"`long_window_days`、`recent_window_days` はトップレベルに一度だけ置かれ、行ご" -"とには現れません(issue #635)。`vcs_aggregate` はディレクトリレベルおよびリ" -"ポジトリレベルのバスファクターを持ちます(issue #332)。" +"`long_window_days`、`recent_window_days` はトップレベルに一度だけ置かれ、行" +"ごとには現れません(issue #635)。`vcs_aggregate` はディレクトリレベルおよび" +"リポジトリレベルのバスファクターを持ちます(issue #332)。" -#: src/commands/rest.md:715 +#: src/commands/rest.md:739 msgid "10. Historical trend — `/vcs/trend`" msgstr "10. 履歴トレンド — `/vcs/trend`" -#: src/commands/rest.md:717 +#: src/commands/rest.md:741 msgid "" "Samples the change-history metrics at several evenly-spaced points in time " -"and returns the per-file time series (issue #333). Its response is a series, " -"not a ranked snapshot, so it is a distinct route from `/vcs`." +"and returns the per-file time series (issue #333). Its response is a " +"series, not a ranked snapshot, so it is a distinct route from `/vcs`." msgstr "" "変更履歴メトリクスを等間隔の複数時点でサンプリングし、ファイルごとの時系列を" "返します(issue #333)。応答はランク付けされたスナップショットではなく系列で" "あるため、`/vcs` とは別のルートになっています。" -#: src/commands/rest.md:723 +#: src/commands/rest.md:747 msgid "" "```http\n" "POST http://127.0.0.1:8080/v1/vcs/trend\n" @@ -11890,7 +12361,7 @@ msgstr "" "POST http://127.0.0.1:8080/v1/vcs/trend\n" "```" -#: src/commands/rest.md:727 +#: src/commands/rest.md:751 msgid "" "**Payload:** every `/vcs` field above **except the cache controls** " "(`no_cache` / `cache_dir`) — trend does not use the persistent cache, so " @@ -11899,10 +12370,10 @@ msgid "" msgstr "" "**ペイロード:** 上記の `/vcs` フィールドすべて(ただし**キャッシュ制御** " "`no_cache` / `cache_dir` を除きます — trend は永続キャッシュを使わないため、" -"どちらかを送ると黙って無視されるのではなく `400` になります。issue #961)に加" -"えて、次を指定できます:" +"どちらかを送ると黙って無視されるのではなく `400` になります。issue #961)に" +"加えて、次を指定できます:" -#: src/commands/rest.md:732 +#: src/commands/rest.md:756 msgid "" "`points`: number of evenly-spaced sample points (`>= 2`). Defaults to `12` " "(the `bca vcs trend --points` default) when omitted." @@ -11910,83 +12381,85 @@ msgstr "" "`points`: 等間隔のサンプル点の数(`>= 2`)。省略時は `12`(`bca vcs trend --" "points` のデフォルト)になります。" -#: src/commands/rest.md:734 +#: src/commands/rest.md:758 msgid "`span`: total look-back the points cover (default `12mo`)." msgstr "`span`: サンプル点全体がカバーする遡及期間(デフォルト `12mo`)。" -#: src/commands/rest.md:735 +#: src/commands/rest.md:759 msgid "" -"`top_deltas`: top _N_ files per improving / regressing list. Absent defaults " -"to `10`; an explicit `0` returns all." +"`top_deltas`: top _N_ files per improving / regressing list. Absent " +"defaults to `10`; an explicit `0` returns all." msgstr "" "`top_deltas`: 改善 / 悪化それぞれのリストに載せる上位 _N_ ファイル数。未指定" "の場合は `10`、明示的な `0` は全件を返します。" -#: src/commands/rest.md:743 +#: src/commands/rest.md:767 msgid "\"trend_schema_version\"" msgstr "\"trend_schema_version\"" -#: src/commands/rest.md:749 src/python/vcs.md:140 +#: src/commands/rest.md:773 src/python/vcs.md:140 msgid "\"as_of_points\"" msgstr "\"as_of_points\"" -#: src/commands/rest.md:751 +#: src/commands/rest.md:775 msgid "\"as_of\"" msgstr "\"as_of\"" -#: src/commands/rest.md:753 src/python/vcs.md:143 +#: src/commands/rest.md:777 src/python/vcs.md:143 msgid "\"deltas\"" msgstr "\"deltas\"" -#: src/commands/rest.md:753 +#: src/commands/rest.md:777 msgid "\"improved\"" msgstr "\"improved\"" -#: src/commands/rest.md:753 src/python/vcs.md:143 +#: src/commands/rest.md:777 src/python/vcs.md:143 msgid "\"regressed\"" msgstr "\"regressed\"" -#: src/commands/rest.md:757 +#: src/commands/rest.md:781 msgid "" "`as_of_points` lists the sample timestamps oldest-first. Each file's array " -"in `files` aligns to it 1:1, with a `null` element at a point where the file " -"did not yet exist; each present element is `{ \"as_of\": ..., \"vcs\": " +"in `files` aligns to it 1:1, with a `null` element at a point where the " +"file did not yet exist; each present element is `{ \"as_of\": ..., \"vcs\": " "{ ... } }`, with that file's VCS block nested under `vcs` at that moment " "(issue #684). The four constant stamps sit once at the top level, never per " "point (issue #635). `deltas` ranks the most-improved and most-regressed " "files by their risk-score movement across the series." msgstr "" -"`as_of_points` はサンプル時刻を古い順に列挙します。`files` 内の各ファイルの配" -"列はこれと 1:1 で対応し、その時点でファイルがまだ存在しなかった場合は `null` " -"要素になります。存在する各要素は `{ \"as_of\": ..., \"vcs\": { ... } }` の形" -"で、その時点のそのファイルの VCS ブロックが `vcs` の下に入れ子になります" -"(issue #684)。4 つの定数スタンプはトップレベルに一度だけ置かれ、時点ごとに" -"は現れません(issue #635)。`deltas` は、系列全体でのリスクスコアの変動に基づ" -"いて、最も改善したファイルと最も悪化したファイルをランク付けします。" +"`as_of_points` はサンプル時刻を古い順に列挙します。`files` 内の各ファイルの" +"配列はこれと 1:1 で対応し、その時点でファイルがまだ存在しなかった場合は " +"`null` 要素になります。存在する各要素は `{ \"as_of\": ..., \"vcs\": " +"{ ... } }` の形で、その時点のそのファイルの VCS ブロックが `vcs` の下に入れ" +"子になります(issue #684)。4 つの定数スタンプはトップレベルに一度だけ置か" +"れ、時点ごとには現れません(issue #635)。`deltas` は、系列全体でのリスクス" +"コアの変動に基づいて、最も改善したファイルと最も悪化したファイルをランク付け" +"します。" -#: src/commands/rest.md:766 +#: src/commands/rest.md:790 msgid "11. Just-in-time risk — `/vcs/jit`" msgstr "11. ジャストインタイムリスク — `/vcs/jit`" -#: src/commands/rest.md:768 +#: src/commands/rest.md:792 msgid "" -"Scores the just-in-time risk of a **single change** — either one commit on a " -"server-side repository, or an arbitrary unified diff carried in the request " -"body (issues #331 / #580). The two modes are mutually exclusive." +"Scores the just-in-time risk of a **single change** — either one commit on " +"a server-side repository, or an arbitrary unified diff carried in the " +"request body (issues #331 / #580). The two modes are mutually exclusive." msgstr "" -"**単一の変更**のジャストインタイムリスクをスコアリングします — 対象はサーバー" -"側リポジトリ上の 1 コミット、またはリクエストボディで渡される任意の unified " -"diff のいずれかです(issue #331 / #580)。この 2 つのモードは相互排他です。" +"**単一の変更**のジャストインタイムリスクをスコアリングします — 対象はサー" +"バー側リポジトリ上の 1 コミット、またはリクエストボディで渡される任意の " +"unified diff のいずれかです(issue #331 / #580)。この 2 つのモードは相互排" +"他です。" -#: src/commands/rest.md:772 +#: src/commands/rest.md:796 msgid "**Commit mode** scores a commit on `repo_path`:" msgstr "**コミットモード**は `repo_path` 上のコミットをスコアリングします:" -#: src/commands/rest.md:778 src/commands/rest.md:793 src/commands/rest.md:797 +#: src/commands/rest.md:802 src/commands/rest.md:817 src/commands/rest.md:821 msgid "\"commit\"" msgstr "\"commit\"" -#: src/commands/rest.md:782 +#: src/commands/rest.md:806 msgid "" "Commit mode also accepts the experience-window knobs `long_window`, " "`recent_window`, `full_history`, `include_merges`, `follow_renames`, and " @@ -11996,77 +12469,77 @@ msgid "" msgstr "" "コミットモードは、経験ウィンドウを調整する `long_window`、`recent_window`、" "`full_history`、`include_merges`、`follow_renames`、`as_of` も受け付けます。" -"応答は `source` が `\"commit\"` の完全なレポートで、その `risk_score` は 5 つ" -"の特徴グループ(サイズ、拡散、履歴、経験、目的)すべてを織り込みます:" +"応答は `source` が `\"commit\"` の完全なレポートで、その `risk_score` は 5 " +"つの特徴グループ(サイズ、拡散、履歴、経験、目的)すべてを織り込みます:" -#: src/commands/rest.md:791 src/commands/rest.md:821 +#: src/commands/rest.md:815 src/commands/rest.md:845 msgid "\"jit_schema_version\"" msgstr "\"jit_schema_version\"" -#: src/commands/rest.md:792 src/commands/rest.md:822 +#: src/commands/rest.md:816 src/commands/rest.md:846 msgid "\"jit_score_version\"" msgstr "\"jit_score_version\"" -#: src/commands/rest.md:793 src/commands/rest.md:823 +#: src/commands/rest.md:817 src/commands/rest.md:847 msgid "\"source\"" msgstr "\"source\"" -#: src/commands/rest.md:797 src/python/traversal.md:42 +#: src/commands/rest.md:821 src/python/traversal.md:42 msgid "\"…\"" msgstr "\"…\"" -#: src/commands/rest.md:797 +#: src/commands/rest.md:821 msgid "\"parent_count\"" msgstr "\"parent_count\"" -#: src/commands/rest.md:797 +#: src/commands/rest.md:821 msgid "\"is_merge\"" msgstr "\"is_merge\"" -#: src/commands/rest.md:797 src/commands/rest.md:799 +#: src/commands/rest.md:821 src/commands/rest.md:823 msgid "\"purpose\"" msgstr "\"purpose\"" -#: src/commands/rest.md:798 src/python/vcs.md:86 +#: src/commands/rest.md:822 src/python/vcs.md:86 msgid "\"features\"" msgstr "\"features\"" -#: src/commands/rest.md:798 src/commands/rest.md:799 src/commands/rest.md:825 -#: src/commands/rest.md:827 src/python/vcs.md:86 +#: src/commands/rest.md:822 src/commands/rest.md:823 src/commands/rest.md:849 +#: src/commands/rest.md:851 src/python/vcs.md:86 msgid "\"size\"" msgstr "\"size\"" -#: src/commands/rest.md:798 src/commands/rest.md:799 src/commands/rest.md:826 -#: src/commands/rest.md:827 +#: src/commands/rest.md:822 src/commands/rest.md:823 src/commands/rest.md:850 +#: src/commands/rest.md:851 msgid "\"diffusion\"" msgstr "\"diffusion\"" -#: src/commands/rest.md:798 src/commands/rest.md:799 +#: src/commands/rest.md:822 src/commands/rest.md:823 msgid "\"history\"" msgstr "\"history\"" -#: src/commands/rest.md:798 src/commands/rest.md:799 +#: src/commands/rest.md:822 src/commands/rest.md:823 msgid "\"experience\"" msgstr "\"experience\"" -#: src/commands/rest.md:799 src/commands/rest.md:827 src/python/vcs.md:91 +#: src/commands/rest.md:823 src/commands/rest.md:851 src/python/vcs.md:91 msgid "\"contributions\"" msgstr "\"contributions\"" -#: src/commands/rest.md:803 +#: src/commands/rest.md:827 msgid "**Diff mode** scores an arbitrary unified diff with no repository:" msgstr "" "**diff モード**はリポジトリなしで任意の unified diff をスコアリングします:" -#: src/commands/rest.md:808 src/commands/rest.md:823 src/python/vcs.md:112 +#: src/commands/rest.md:832 src/commands/rest.md:847 src/python/vcs.md:112 msgid "\"diff\"" msgstr "\"diff\"" -#: src/commands/rest.md:808 +#: src/commands/rest.md:832 msgid "\"--- a/x\\n+++ b/x\\n@@ -1 +1 @@\\n-old\\n+new\\n\"" msgstr "\"--- a/x\\n+++ b/x\\n@@ -1 +1 @@\\n-old\\n+new\\n\"" -#: src/commands/rest.md:812 +#: src/commands/rest.md:836 msgid "" "A bare diff carries no author, parent, or history, so only the _size_ and " "_diffusion_ groups are computable. The diff report's `source` is `\"diff\"` " @@ -12075,14 +12548,14 @@ msgid "" msgstr "" "素の diff には作者・親・履歴の情報がないため、計算できるのは _サイズ_ と _拡" "散_ のグループだけです。diff レポートの `source` は `\"diff\"` で、" -"`risk_score` では**なく** `partial_risk_score` を報告します。欠けているグルー" -"プは _ボディから完全に省かれ_、ゼロとして現れることは決してないためです:" +"`risk_score` では**なく** `partial_risk_score` を報告します。欠けているグ" +"ループは _ボディから完全に省かれ_、ゼロとして現れることは決してないためです:" -#: src/commands/rest.md:824 +#: src/commands/rest.md:848 msgid "\"partial_risk_score\"" msgstr "\"partial_risk_score\"" -#: src/commands/rest.md:831 +#: src/commands/rest.md:855 msgid "" "Branch on the `source` discriminator (`\"commit\"` vs `\"diff\"`) to read " "the right score field. `partial_risk_score` is always lower than a commit's " @@ -12094,7 +12567,7 @@ msgstr "" "ミットの `risk_score` より常に低く、異なるスケール上にあります。diff は他の " "diff とだけ比較し、コミットのスコアとは決して比較しないでください。" -#: src/commands/rest.md:836 +#: src/commands/rest.md:860 msgid "" "**Mode conflict.** Supplying `diff` together with **any** commit-mode field " "(`repo_path`, `commit`, a window, history, rename, or `as_of` knob) is " @@ -12103,22 +12576,32 @@ msgid "" "combination is treated as a client mistake (issue number 632)." msgstr "" "**モードの競合。** `diff` を**いずれかの**コミットモードのフィールド" -"(`repo_path`、`commit`、ウィンドウ、履歴、リネーム、`as_of` の各設定)と同時" -"に指定すると、diff を黙って優先して残りを捨てるのではなく `400` で拒否されま" -"す。2 つのモードは互いに比較できない別々の問いに答えるものであり、この組み合" -"わせはクライアントの誤りとして扱われます(issue 632)。" +"(`repo_path`、`commit`、ウィンドウ、履歴、リネーム、`as_of` の各設定)と同" +"時に指定すると、diff を黙って優先して残りを捨てるのではなく `400` で拒否され" +"ます。2 つのモードは互いに比較できない別々の問いに答えるものであり、この組み" +"合わせはクライアントの誤りとして扱われます(issue 632)。" -#: src/commands/rest.md:843 +#: src/commands/rest.md:867 msgid "" "**Non-diff `diff`.** A `diff` value that is not a git unified diff — the " "wrong field, an accidentally-mangled string, arbitrary text — is rejected " "with a `400` (`vcs_invalid_diff`) rather than scored as a confident " -"`partial_risk_score` of `0.0`. On a risk-_gating_ endpoint a spurious \"zero " -"risk\" is the most dangerous failure mode, so non-diff input is a hard error " -"(issue 652). An **empty** or whitespace-only `diff` is the one exception: it " -"legitimately means \"no changes\", so it still returns a valid `0.0` — a CI " -"step that computed an empty diff gets the zero-risk answer it expects." -msgstr "**diff でない `diff`。** git の unified diff ではない `diff` 値 — フィールドの取り違え、途中で壊れた文字列、任意のテキストなど — は、確信を持った `partial_risk_score` の `0.0` としてスコアリングされるのではなく、`400`(`vcs_invalid_diff`)で拒否されます。リスクを「ゲート」するエンドポイントでは、誤った「リスクゼロ」が最も危険な失敗モードであるため、diff でない入力はハードエラーになります(issue 652)。唯一の例外は**空**または空白のみの `diff` です。これは正当に「変更なし」を意味するため、有効な `0.0` を返します — 空の diff を計算した CI ステップは、期待どおりのリスクゼロという答えを得られます。" +"`partial_risk_score` of `0.0`. On a risk-_gating_ endpoint a spurious " +"\"zero risk\" is the most dangerous failure mode, so non-diff input is a " +"hard error (issue 652). An **empty** or whitespace-only `diff` is the one " +"exception: it legitimately means \"no changes\", so it still returns a " +"valid `0.0` — a CI step that computed an empty diff gets the zero-risk " +"answer it expects." +msgstr "" +"**diff でない `diff`。** git の unified diff ではない `diff` 値 — フィールド" +"の取り違え、途中で壊れた文字列、任意のテキストなど — は、確信を持った " +"`partial_risk_score` の `0.0` としてスコアリングされるのではなく、`400`" +"(`vcs_invalid_diff`)で拒否されます。リスクを「ゲート」するエンドポイントで" +"は、誤った「リスクゼロ」が最も危険な失敗モードであるため、diff でない入力は" +"ハードエラーになります(issue 652)。唯一の例外は**空**または空白のみの " +"`diff` です。これは正当に「変更なし」を意味するため、有効な `0.0` を返しま" +"す — 空の diff を計算した CI ステップは、期待どおりのリスクゼロという答えを" +"得られます。" #: src/commands/web-server.md:3 msgid "" @@ -12129,11 +12612,11 @@ msgid "" "environment variables tune it, and the trust boundaries to respect before " "exposing it." msgstr "" -"`bca-web` は `big-code-analysis` ライブラリをラップする HTTP デーモンで、コメ" -"ント除去、関数スパン、AST ダンプ、保守性メトリクス、変更履歴(VCS)メトリクス" -"を REST API として公開します。このページはデーモンを運用するオペレーター向け" -"に、ビルドと起動の方法、チューニングに使うフラグと環境変数、そして公開前に守" -"るべき信頼境界を説明します。" +"`bca-web` は `big-code-analysis` ライブラリをラップする HTTP デーモンで、コ" +"メント除去、関数スパン、AST ダンプ、保守性メトリクス、変更履歴(VCS)メトリ" +"クスを REST API として公開します。このページはデーモンを運用するオペレーター" +"向けに、ビルドと起動の方法、チューニングに使うフラグと環境変数、そして公開前" +"に守るべき信頼境界を説明します。" #: src/commands/web-server.md:10 msgid "" @@ -12143,11 +12626,11 @@ msgid "" "api.md) recipe shows end-to-end `curl` calls. This page covers the process " "itself and links to those two rather than repeating them." msgstr "" -"本ページは 2 つのリファレンスページを補う運用ガイドです。[REST API リファレン" -"ス](rest.md)は、全エンドポイントとそのリクエスト / レスポンス形式、エラー契約" -"を文書化しています。[REST API を操作する](../recipes/rest-api.md)レシピは、エ" -"ンドツーエンドの `curl` 呼び出しを示します。このページはプロセスそのものを扱" -"い、内容を繰り返す代わりにこの 2 つへリンクします。" +"本ページは 2 つのリファレンスページを補う運用ガイドです。[REST API リファレ" +"ンス](rest.md)は、全エンドポイントとそのリクエスト / レスポンス形式、エラー" +"契約を文書化しています。[REST API を操作する](../recipes/rest-api.md)レシピ" +"は、エンドツーエンドの `curl` 呼び出しを示します。このページはプロセスそのも" +"のを扱い、内容を繰り返す代わりにこの 2 つへリンクします。" #: src/commands/web-server.md:17 msgid "Build and run" @@ -12158,8 +12641,8 @@ msgid "" "`bca-web` is the binary of the `big-code-analysis-web` crate. From a " "checkout, run it through Cargo:" msgstr "" -"`bca-web` は `big-code-analysis-web` クレートのバイナリです。チェックアウトか" -"らは Cargo 経由で実行します:" +"`bca-web` は `big-code-analysis-web` クレートのバイナリです。チェックアウト" +"からは Cargo 経由で実行します:" #: src/commands/web-server.md:26 msgid "" @@ -12178,13 +12661,14 @@ msgid "" "`bca-web` binds the requested address, serves until interrupted, and exits " "non-zero if it cannot bind the port or hits an I/O error, so a supervisor " "([systemd](https://www.freedesktop.org/wiki/Software/systemd/), a container " -"orchestrator, or a CI smoke check) sees the failure and can restart or alert." +"orchestrator, or a CI smoke check) sees the failure and can restart or " +"alert." msgstr "" "`bca-web` は指定されたアドレスにバインドし、中断されるまでサービスを提供しま" -"す。ポートをバインドできない場合や I/O エラーに遭遇した場合は非ゼロで終了する" -"ため、スーパーバイザー([systemd](https://www.freedesktop.org/wiki/Software/" -"systemd/)、コンテナオーケストレーター、CI のスモークチェック)が失敗を検知し" -"て再起動や警告を行えます。" +"す。ポートをバインドできない場合や I/O エラーに遭遇した場合は非ゼロで終了す" +"るため、スーパーバイザー([systemd](https://www.freedesktop.org/wiki/" +"Software/systemd/)、コンテナオーケストレーター、CI のスモークチェック)が失" +"敗を検知して再起動や警告を行えます。" #: src/commands/web-server.md:40 msgid "Building with a subset of languages does not work" @@ -12206,9 +12690,10 @@ msgstr "" "languages` フィーチャセットを明示的に固定しているため、`cargo build -p big-" "code-analysis-web` に `--no-default-features` や独自の `--features` リストを" "渡しても、生成されるバイナリから文法は**除外されません**。ユーザー向けデーモ" -"ンから文法が黙って抜け落ちると、ビルドエラーではなくリクエスト時に「言語 X が" -"動かなくなった」という形で表面化するため、このクレートはそれを禁止しています" -"([issue #252](https://github.com/dekobon/big-code-analysis/issues/252))。" +"ンから文法が黙って抜け落ちると、ビルドエラーではなくリクエスト時に「言語 X " +"が動かなくなった」という形で表面化するため、このクレートはそれを禁止していま" +"す([issue #252](https://github.com/dekobon/big-code-analysis/" +"issues/252))。" #: src/commands/web-server.md:52 msgid "" @@ -12219,8 +12704,8 @@ msgid "" msgstr "" "文法セットを削減する必要がある場合は、自分の Rust コードに `big-code-" "analysis` ライブラリを組み込み、自分の `Cargo.toml` でフィーチャを選択してく" -"ださい。[言語別 Cargo フィーチャ](../library/cargo-features.md)の章に、すべて" -"のフィーチャと実際の例が載っています。" +"ださい。[言語別 Cargo フィーチャ](../library/cargo-features.md)の章に、すべ" +"てのフィーチャと実際の例が載っています。" #: src/commands/web-server.md:57 msgid "Command-line flags" @@ -12245,7 +12730,8 @@ msgstr "`auto`" #: src/commands/web-server.md:63 msgid "" "Worker-thread count. `auto` resolves to the OS-reported effective CPU count." -msgstr "ワーカースレッド数。`auto` は OS が報告する実効 CPU 数に解決されます。" +msgstr "" +"ワーカースレッド数。`auto` は OS が報告する実効 CPU 数に解決されます。" #: src/commands/web-server.md:64 msgid "`--host `" @@ -12310,11 +12796,12 @@ msgstr "バージョンを表示して終了します。" #: src/commands/web-server.md:71 msgid "" "`--num-jobs auto` is [cgroup](https://www.kernel.org/doc/html/latest/admin-" -"guide/cgroup-v2.html)\\-quota- and `cpuset`\\-aware on Linux: in a container " -"with a CPU quota it resolves to the quota rather than the host's physical " -"core count, matching the `bca` CLI's `--num-jobs`. This count sizes the " -"worker pool and the parse-admission semaphore, so it caps how many parses " -"run concurrently. The minimum is `1`; `0` is rejected at parse time." +"guide/cgroup-v2.html)\\-quota- and `cpuset`\\-aware on Linux: in a " +"container with a CPU quota it resolves to the quota rather than the host's " +"physical core count, matching the `bca` CLI's `--num-jobs`. This count " +"sizes the worker pool and the parse-admission semaphore, so it caps how " +"many parses run concurrently. The minimum is `1`; `0` is rejected at parse " +"time." msgstr "" "`--num-jobs auto` は Linux で [cgroup](https://www.kernel.org/doc/html/" "latest/admin-guide/cgroup-v2.html) のクォータと `cpuset` を認識します。CPU " @@ -12329,23 +12816,23 @@ msgid "" "request returns `504 Gateway Timeout`. The default of `30` guards against a " "pathological input wedging a worker indefinitely. Setting it to `0` removes " "the deadline and, with it, the load-shedding described below; use `0` only " -"when an unbounded parse is acceptable. See the [REST API reference](rest.md) " -"for the response body the timeout returns." +"when an unbounded parse is acceptable. See the [REST API reference](rest." +"md) for the response body the timeout returns." msgstr "" -"`--parse-timeout-secs` は、リクエストが `504 Gateway Timeout` を返すまでに 1 " -"回のパースが実行できる時間を制限します。デフォルトの `30` は、病的な入力が" +"`--parse-timeout-secs` は、リクエストが `504 Gateway Timeout` を返すまでに " +"1 回のパースが実行できる時間を制限します。デフォルトの `30` は、病的な入力が" "ワーカーを無期限に塞ぐことを防ぎます。`0` に設定すると期限がなくなり、それと" "ともに後述の負荷制御も無効になります。無制限のパースが許容できる場合にのみ " -"`0` を使ってください。タイムアウト時に返されるレスポンスボディは [REST API リ" -"ファレンス](rest.md)を参照してください。" +"`0` を使ってください。タイムアウト時に返されるレスポンスボディは [REST API " +"リファレンス](rest.md)を参照してください。" #: src/commands/web-server.md:87 msgid "" "CORS is off by default. The [CORS](rest.md#cors) section of the reference " "documents it in full, covering preflight handling, the wildcard form, and " "the absence of credentials. The short version: pass `--cors` with an " -"explicit origin allow-list to let browser tooling read responses; omit it to " -"emit no `Access-Control-*` headers at all." +"explicit origin allow-list to let browser tooling read responses; omit it " +"to emit no `Access-Control-*` headers at all." msgstr "" "CORS はデフォルトで無効です。リファレンスの [CORS](rest.md#cors) セクション" "が、プリフライト処理、ワイルドカード形式、クレデンシャル非対応を含めて完全に" @@ -12400,8 +12887,8 @@ msgstr "" "`RUST_LOG` は [`EnvFilter`](https://docs.rs/tracing-subscriber/latest/" "tracing_subscriber/filter/struct.EnvFilter.html) の構文を使います(例: " "`RUST_LOG=big_code_analysis_web=debug`)。デーモンは完了したリクエストごと" -"に、メソッド、ルート、ステータス、レイテンシを含むアクセスログを 1 行出力しま" -"す。" +"に、メソッド、ルート、ステータス、レイテンシを含むアクセスログを 1 行出力し" +"ます。" #: src/commands/web-server.md:106 msgid "Resource limits and back-pressure" @@ -12419,10 +12906,10 @@ msgid "" "and raw-octet-stream content types, so both reject oversized bodies at the " "same threshold." msgstr "" -"**リクエストボディサイズ。** すべてのエンドポイントは、4 MiB を超えるリクエス" -"トボディを `413 Payload Too Large` で拒否します。この制限は JSON と raw オク" -"テットストリームのコンテンツタイプに一律に適用されるため、どちらも同じしきい" -"値で過大なボディを拒否します。" +"**リクエストボディサイズ。** すべてのエンドポイントは、4 MiB を超えるリクエ" +"ストボディを `413 Payload Too Large` で拒否します。この制限は JSON と raw オ" +"クテットストリームのコンテンツタイプに一律に適用されるため、どちらも同じしき" +"い値で過大なボディを拒否します。" #: src/commands/web-server.md:115 msgid "" @@ -12437,16 +12924,16 @@ msgid "" "value falls back to the default). Setting `--parse-timeout-secs 0` disables " "this mechanism entirely, since with no deadline no task is ever orphaned." msgstr "" -"**孤児タスクの流入制御。** パースが `--parse-timeout-secs` を超えるとリクエス" -"トは `504` を返しますが、tree-sitter はパース途中で中断できないため、ブロッキ" -"ングスレッドはパースが自然に終わるまでプール上で動き続けます。持続的な病的入" -"力によってバックグラウンド作業が際限なく積み上がるのを止めるため、孤児タスク" -"数がソフト上限に達すると、新しいリクエストは `503 Service Unavailable` で拒否" -"されます。上限のデフォルトは `max(num_jobs * 2, 4)` で、" -"`BCA_MAX_ORPHANED_TASKS` で上書きできます(符号なし整数としてパースされ、不正" -"な値やゼロはデフォルトにフォールバックします)。`--parse-timeout-secs 0` を設" -"定すると、この仕組み全体が無効になります。期限がなければタスクが孤児化するこ" -"とはないためです。" +"**孤児タスクの流入制御。** パースが `--parse-timeout-secs` を超えるとリクエ" +"ストは `504` を返しますが、tree-sitter はパース途中で中断できないため、ブ" +"ロッキングスレッドはパースが自然に終わるまでプール上で動き続けます。持続的な" +"病的入力によってバックグラウンド作業が際限なく積み上がるのを止めるため、孤児" +"タスク数がソフト上限に達すると、新しいリクエストは `503 Service " +"Unavailable` で拒否されます。上限のデフォルトは `max(num_jobs * 2, 4)` で、" +"`BCA_MAX_ORPHANED_TASKS` で上書きできます(符号なし整数としてパースされ、不" +"正な値やゼロはデフォルトにフォールバックします)。`--parse-timeout-secs 0` " +"を設定すると、この仕組み全体が無効になります。期限がなければタスクが孤児化す" +"ることはないためです。" #: src/commands/web-server.md:128 msgid "Security and trust boundaries" @@ -12454,9 +12941,9 @@ msgstr "セキュリティと信頼境界" #: src/commands/web-server.md:130 msgid "" -"`bca-web` has no authentication, authorization, or rate limiting of its own. " -"The defaults are chosen for a local, single-operator deployment; widen them " -"deliberately." +"`bca-web` has no authentication, authorization, or rate limiting of its " +"own. The defaults are chosen for a local, single-operator deployment; widen " +"them deliberately." msgstr "" "`bca-web` 自体には認証、認可、レート制限がありません。デフォルト値はローカル" "の単一オペレーター運用向けに選ばれています。広げる場合は意図的に行ってくださ" @@ -12469,10 +12956,10 @@ msgid "" "before exposing it to a network. Binding `0.0.0.0` makes every capability " "below reachable by anyone who can route to the port." msgstr "" -"**デフォルトのバインド先はループバックです。** サーバーは `--host` で指定しな" -"い限り `127.0.0.1` にバインドします。ネットワークに公開する前は、そのままにし" -"ておくか、前段に認証プロキシを置いてください。`0.0.0.0` にバインドすると、" -"ポートに到達できる誰もが以下のすべての機能に到達できるようになります。" +"**デフォルトのバインド先はループバックです。** サーバーは `--host` で指定し" +"ない限り `127.0.0.1` にバインドします。ネットワークに公開する前は、そのまま" +"にしておくか、前段に認証プロキシを置いてください。`0.0.0.0` にバインドする" +"と、ポートに到達できる誰もが以下のすべての機能に到達できるようになります。" #: src/commands/web-server.md:139 msgid "" @@ -12480,56 +12967,56 @@ msgid "" "another origin cannot read API responses, so a page the operator happens to " "visit cannot quietly drive a loopback `bca-web`. The wildcard form (`--cors " "'*'`) answers every origin and exposes the server's metrics and repository " -"paths to any site; use it only on trusted networks. Full semantics are under " -"[CORS](rest.md#cors)." +"paths to any site; use it only on trusted networks. Full semantics are " +"under [CORS](rest.md#cors)." msgstr "" -"**CORS はデフォルトで無効です。** `--cors` フラグがなければ、別オリジンのブラ" -"ウザースクリプトは API レスポンスを読めないため、オペレーターがたまたま訪れた" -"ページがループバックの `bca-web` をこっそり操作することはできません。ワイルド" -"カード形式(`--cors '*'`)はすべてのオリジンに応答し、サーバーのメトリクスや" -"リポジトリパスを任意のサイトに公開するため、信頼できるネットワークでのみ使っ" -"てください。完全なセマンティクスは [CORS](rest.md#cors) にあります。" +"**CORS はデフォルトで無効です。** `--cors` フラグがなければ、別オリジンのブ" +"ラウザースクリプトは API レスポンスを読めないため、オペレーターがたまたま訪" +"れたページがループバックの `bca-web` をこっそり操作することはできません。ワ" +"イルドカード形式(`--cors '*'`)はすべてのオリジンに応答し、サーバーのメトリ" +"クスやリポジトリパスを任意のサイトに公開するため、信頼できるネットワークでの" +"み使ってください。完全なセマンティクスは [CORS](rest.md#cors) にあります。" #: src/commands/web-server.md:146 msgid "" "**The VCS endpoints read server-side repositories.** Unlike the source-in-" "body endpoints, `/v1/vcs`, `/v1/vcs/trend`, and `/v1/vcs/jit` analyze a git " "repository already on the server's filesystem, named by the request's " -"`repo_path`. A caller who can reach these endpoints can make the server walk " -"any git repository it can read and learn that repository's file paths, " +"`repo_path`. A caller who can reach these endpoints can make the server " +"walk any git repository it can read and learn that repository's file paths, " "churn, and author signals. The [VCS trust-boundary warning](rest.md#change-" "history-vcs-metrics) in the reference covers this in full; do not expose " "these endpoints to untrusted clients without an authorization layer." msgstr "" -"**VCS エンドポイントはサーバー側のリポジトリを読み取ります。** ソースコードを" -"ボディで受け取るエンドポイントと異なり、`/v1/vcs`、`/v1/vcs/trend`、`/v1/vcs/" -"jit` は、リクエストの `repo_path` で指定される、サーバーのファイルシステム上" -"に既にある git リポジトリを解析します。これらのエンドポイントに到達できる呼び" -"出し元は、サーバーが読み取れる任意の git リポジトリをサーバーに走査させ、その" -"リポジトリのファイルパス、チャーン、作者シグナルを知ることができます。リファ" -"レンスの [VCS 信頼境界の警告](rest.md#change-history-vcs-metrics)がこれを完全" -"に扱っています。認可レイヤーなしで、信頼できないクライアントにこれらのエンド" -"ポイントを公開しないでください。" +"**VCS エンドポイントはサーバー側のリポジトリを読み取ります。** ソースコード" +"をボディで受け取るエンドポイントと異なり、`/v1/vcs`、`/v1/vcs/trend`、`/v1/" +"vcs/jit` は、リクエストの `repo_path` で指定される、サーバーのファイルシステ" +"ム上に既にある git リポジトリを解析します。これらのエンドポイントに到達でき" +"る呼び出し元は、サーバーが読み取れる任意の git リポジトリをサーバーに走査さ" +"せ、そのリポジトリのファイルパス、チャーン、作者シグナルを知ることができま" +"す。リファレンスの [VCS 信頼境界の警告](rest.md#change-history-vcs-metrics)" +"がこれを完全に扱っています。認可レイヤーなしで、信頼できないクライアントにこ" +"れらのエンドポイントを公開しないでください。" #: src/commands/web-server.md:156 msgid "" "**The VCS cache directory is a client-controlled write path.** The VCS " "endpoints accept an optional `cache_dir` field that overrides where the " -"persistent change-history cache is written, defaulting to the platform cache " -"location (`$XDG_CACHE_HOME/big-code-analysis/vcs`). A caller who can set " -"`cache_dir` chooses a directory the server process writes into, so an " +"persistent change-history cache is written, defaulting to the platform " +"cache location (`$XDG_CACHE_HOME/big-code-analysis/vcs`). A caller who can " +"set `cache_dir` chooses a directory the server process writes into, so an " "untrusted client could direct cache writes to an attacker-chosen path. This " "is one more reason the VCS endpoints belong behind an authorization layer, " "never open to untrusted input." msgstr "" -"**VCS キャッシュディレクトリはクライアントが制御する書き込みパスです。** VCS " -"エンドポイントはオプションの `cache_dir` フィールドを受け付け、永続的な変更履" -"歴キャッシュの書き込み先を上書きできます。デフォルトはプラットフォームの" -"キャッシュ位置(`$XDG_CACHE_HOME/big-code-analysis/vcs`)です。`cache_dir` を" -"設定できる呼び出し元は、サーバープロセスが書き込むディレクトリを選べるため、" -"信頼できないクライアントは攻撃者が選んだパスにキャッシュ書き込みを向けられま" -"す。これも、VCS エンドポイントを認可レイヤーの背後に置き、信頼できない入力に" -"決して開放してはならない理由の 1 つです。" +"**VCS キャッシュディレクトリはクライアントが制御する書き込みパスです。** " +"VCS エンドポイントはオプションの `cache_dir` フィールドを受け付け、永続的な" +"変更履歴キャッシュの書き込み先を上書きできます。デフォルトはプラットフォーム" +"のキャッシュ位置(`$XDG_CACHE_HOME/big-code-analysis/vcs`)です。" +"`cache_dir` を設定できる呼び出し元は、サーバープロセスが書き込むディレクトリ" +"を選べるため、信頼できないクライアントは攻撃者が選んだパスにキャッシュ書き込" +"みを向けられます。これも、VCS エンドポイントを認可レイヤーの背後に置き、信頼" +"できない入力に決して開放してはならない理由の 1 つです。" #: src/recipes/index.md:3 msgid "" @@ -12537,9 +13024,9 @@ msgid "" "recipe assumes you have built the binaries (`cargo build --release`) and " "that `bca` is on your `PATH`." msgstr "" -"`bca` と `bca-web` で作業を進めるためのタスク指向の例です。各レシピは、バイナ" -"リがビルド済み(`cargo build --release`)で、`bca` が `PATH` 上にあることを前" -"提とします。" +"`bca` と `bca-web` で作業を進めるためのタスク指向の例です。各レシピは、バイ" +"ナリがビルド済み(`cargo build --release`)で、`bca` が `PATH` 上にあること" +"を前提とします。" #: src/recipes/index.md:7 msgid "The recipes are grouped by goal:" @@ -12558,8 +13045,8 @@ msgstr "" #: src/recipes/index.md:12 msgid "" "[CI integration](ci.md) — wire `bca check` and `bca report` into GitHub " -"Actions and GitLab CI, including the baseline / ratchet pattern and the Code " -"Quality widget path." +"Actions and GitLab CI, including the baseline / ratchet pattern and the " +"Code Quality widget path." msgstr "" "[CI 統合](ci.md) — `bca check` と `bca report` を GitHub Actions と GitLab " "CI に組み込みます。ベースライン / ラチェットパターンと Code Quality ウィ" @@ -12571,19 +13058,19 @@ msgid "" "toml` so the gate only fires on new or worsened violations, and audit or " "diff that baseline during review." msgstr "" -"[ベースライン](baselines.md) — 既存の違反を `.bca-baseline.toml` に記録して、" -"ゲートが新規または悪化した違反にのみ反応するようにし、レビュー時にそのベース" -"ラインを監査したり差分を確認したりします。" +"[ベースライン](baselines.md) — 既存の違反を `.bca-baseline.toml` に記録し" +"て、ゲートが新規または悪化した違反にのみ反応するようにし、レビュー時にその" +"ベースラインを監査したり差分を確認したりします。" #: src/recipes/index.md:18 msgid "" "[Local threshold gates](local-gates.md) — 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." +"developer machine with a two-tier (hard + headroom) Makefile / `just` / " +"`pre-commit` pattern, so regressions never reach the pull request." msgstr "" "[ローカルしきい値ゲート](local-gates.md) — 2 層構成(ハード + ヘッドルーム)" -"の Makefile / `just` / `pre-commit` パターンで、CI のしきい値ゲートを開発者マ" -"シン上に複製し、リグレッションをプルリクエストに到達させません。" +"の Makefile / `just` / `pre-commit` パターンで、CI のしきい値ゲートを開発者" +"マシン上に複製し、リグレッションをプルリクエストに到達させません。" #: src/recipes/index.md:22 msgid "" @@ -12594,16 +13081,16 @@ msgid "" msgstr "" "[エージェントへのメトリクス供給](agent-feedback.md) — `bca check` をエージェ" "ント型コーディングツールの編集後フィードバックループ(Claude Code の " -"`PostToolUse` フック、opencode プラグイン)に組み込みます。ループを健全に保つ" -"アンチゲーミングの指針も含みます。" +"`PostToolUse` フック、opencode プラグイン)に組み込みます。ループを健全に保" +"つアンチゲーミングの指針も含みます。" #: src/recipes/index.md:26 msgid "" "[AST queries](ast-queries.md) — search for syntactic constructs, count node " "types, dump trees, and detect parse errors." msgstr "" -"[AST クエリ](ast-queries.md) — 構文要素の検索、ノード種別のカウント、ツリーの" -"ダンプ、パースエラーの検出を行います。" +"[AST クエリ](ast-queries.md) — 構文要素の検索、ノード種別のカウント、ツリー" +"のダンプ、パースエラーの検出を行います。" #: src/recipes/index.md:28 msgid "" @@ -12624,20 +13111,21 @@ msgstr "" #: src/recipes/index.md:33 msgid "" "If you want a deeper look at any flag the recipes use, see the per-command " -"pages under [Commands](../commands/index.html). For the full list of metrics " -"that show up in these recipes, see [Supported Metrics](../metrics.md)." +"pages under [Commands](../commands/index.html). For the full list of " +"metrics that show up in these recipes, see [Supported Metrics](../metrics." +"md)." msgstr "" "レシピで使われているフラグを詳しく知りたい場合は、[コマンド](../commands/" -"index.html)配下のコマンド別ページを参照してください。これらのレシピに登場する" -"メトリクスの一覧は、[対応メトリクス](../metrics.md)を参照してください。" +"index.html)配下のコマンド別ページを参照してください。これらのレシピに登場す" +"るメトリクスの一覧は、[対応メトリクス](../metrics.md)を参照してください。" #: src/recipes/index.md:38 msgid "" "**Upstream reference.** `big-code-analysis` is a fork of Mozilla's [`rust-" -"code-analysis`](https://github.com/mozilla/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](../migration.md)." +"code-analysis`](https://github.com/mozilla/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](../migration.md)." msgstr "" "**上流リファレンス。** `big-code-analysis` は Mozilla の [`rust-code-" "analysis`](https://github.com/mozilla/rust-code-analysis) のフォークです。上" @@ -12652,14 +13140,14 @@ msgstr "集約された人間可読の Markdown レポートを生成するた #: src/recipes/quality-reports.md:5 msgid "" "**Wiring reports into CI?** See the [CI integration recipe](ci.md) for " -"runnable GitHub Actions and GitLab CI examples that post the Markdown report " -"as a PR/MR comment and surface threshold violations through the platform's " -"native code quality widgets." +"runnable GitHub Actions and GitLab CI examples that post the Markdown " +"report as a PR/MR comment and surface threshold violations through the " +"platform's native code quality widgets." msgstr "" -"**レポートを CI に組み込みたい場合。** Markdown レポートを PR/MR コメントとし" -"て投稿し、しきい値違反をプラットフォーム標準のコード品質ウィジェットで表示す" -"る、実行可能な GitHub Actions と GitLab CI の例は [CI 統合レシピ](ci.md)を参" -"照してください。" +"**レポートを CI に組み込みたい場合。** Markdown レポートを PR/MR コメントと" +"して投稿し、しきい値違反をプラットフォーム標準のコード品質ウィジェットで表示" +"する、実行可能な GitHub Actions と GitLab CI の例は [CI 統合レシピ](ci.md)を" +"参照してください。" #: src/recipes/quality-reports.md:11 msgid "Live example reports" @@ -12674,18 +13162,18 @@ msgid "" msgstr "" "`big-code-analysis` は、`main` へのプッシュごとに、自身のソースツリーに対す" "る `bca report -O markdown --vcs` と `bca report -O html --vcs` の出力を公開" -"しています。どちらかを開けば、このページのレシピが多言語の Rust + Python コー" -"ドベースで生成する結果をそのまま確認できます:" +"しています。どちらかを開けば、このページのレシピが多言語の Rust + Python " +"コードベースで生成する結果をそのまま確認できます:" #: src/recipes/quality-reports.md:19 msgid "" -"HTML hotspot report (sortable tables, per-language sections, plus a \"Change-" -"history risk\" section from `--vcs`): " +"HTML hotspot report (sortable tables, per-language sections, plus a " +"\"Change-history risk\" section from `--vcs`): " msgstr "" "HTML ホットスポットレポート(ソート可能なテーブル、言語別セクション、さらに " -"`--vcs` による「変更履歴リスク」セクション付き): " +"`--vcs` による「変更履歴リスク」セクション付き): " #: src/recipes/quality-reports.md:22 msgid "" @@ -12713,9 +13201,9 @@ msgid "" "(ci.md#live-worked-example) for the full pipeline shape." msgstr "" "これらを生成する仕組みは [`.github/workflows/pages.yml`](https://github.com/" -"dekobon/big-code-analysis/blob/main/.github/workflows/pages.yml) にあります。" -"同じワークフローがしきい値ゲートも実行します。パイプライン全体の構成は [CI 統" -"合](ci.md#live-worked-example) を参照してください。" +"dekobon/big-code-analysis/blob/main/.github/workflows/pages.yml) にありま" +"す。同じワークフローがしきい値ゲートも実行します。パイプライン全体の構成は " +"[CI 統合](ci.md#live-worked-example) を参照してください。" #: src/recipes/quality-reports.md:34 msgid "Generate a project-wide quality report" @@ -12730,8 +13218,8 @@ msgid "" "`--strip-prefix` keeps the file paths short and stable across machines — " "without it every row carries the absolute path of the current checkout." msgstr "" -"`--strip-prefix` はファイルパスを短く保ち、マシン間で安定させます。指定しない" -"場合、各行には現在のチェックアウトの絶対パスが含まれます。" +"`--strip-prefix` はファイルパスを短く保ち、マシン間で安定させます。指定しな" +"い場合、各行には現在のチェックアウトの絶対パスが含まれます。" #: src/recipes/quality-reports.md:50 msgid "" @@ -12739,18 +13227,18 @@ msgid "" "default for a PR comment; drop to 5 for a dashboard tile, or pass `0` to " "list every row." msgstr "" -"`--top` は各ホットスポットテーブルに表示される行数を制御します。PR コメントに" -"は 20 が適切なデフォルトです。ダッシュボードのタイルなら 5 に減らし、すべての" -"行を表示するには `0` を渡します。" +"`--top` は各ホットスポットテーブルに表示される行数を制御します。PR コメント" +"には 20 が適切なデフォルトです。ダッシュボードのタイルなら 5 に減らし、すべ" +"ての行を表示するには `0` を渡します。" #: src/recipes/quality-reports.md:53 msgid "" "`--jobs` defaults to the effective CPU count (cgroup-/cpuset-aware on " "Linux); pass `--jobs 1` only to force serial mode for debugging." msgstr "" -"`--jobs` のデフォルトは実効 CPU 数です(Linux では cgroup / cpuset を考慮しま" -"す)。デバッグのために直列モードを強制したい場合にのみ `--jobs 1` を渡してく" -"ださい。" +"`--jobs` のデフォルトは実効 CPU 数です(Linux では cgroup / cpuset を考慮し" +"ます)。デバッグのために直列モードを強制したい場合にのみ `--jobs 1` を渡して" +"ください。" #: src/recipes/quality-reports.md:57 msgid "Limit the report to specific languages" @@ -12771,7 +13259,7 @@ msgstr "" msgid "\"*.rs\"" msgstr "\"*.rs\"" -#: src/recipes/quality-reports.md:64 src/recipes/exporting-data.md:194 +#: src/recipes/quality-reports.md:64 src/recipes/exporting-data.md:198 #: src/python/batch.md:70 msgid "\"*.py\"" msgstr "\"*.py\"" @@ -12779,8 +13267,8 @@ msgstr "\"*.py\"" #: src/recipes/quality-reports.md:69 msgid "To exclude vendored or generated trees, layer in `--exclude`:" msgstr "" -"ベンダリングされたツリーや生成されたツリーを除外するには、さらに `--exclude` " -"を重ねます:" +"ベンダリングされたツリーや生成されたツリーを除外するには、さらに `--" +"exclude` を重ねます:" #: src/recipes/quality-reports.md:74 msgid "\"**/target/**\"" @@ -12797,8 +13285,8 @@ msgid "" "same way: `--include=\"*.rs\" --exclude=\"**/target/**\"`." msgstr "" "**フラグの引数個数。** `--include` と `--exclude` は 1 回の指定につきちょう" -"ど 1 つのグロブを受け取ります。パターンを追加するにはフラグを繰り返してくださ" -"い。`=` 形式も同様に動作します: `--include=\"*.rs\" --exclude=\"**/target/" +"ど 1 つのグロブを受け取ります。パターンを追加するにはフラグを繰り返してくだ" +"さい。`=` 形式も同様に動作します: `--include=\"*.rs\" --exclude=\"**/target/" "**\"`。" #: src/recipes/quality-reports.md:83 @@ -12810,10 +13298,10 @@ msgid "" "exclude]` gate-exemption set." msgstr "" "**先頭の `./` は省略可能です。** 素の相対パターンと `./` 付きの表記は等価で" -"す。`--exclude \"vendor/**\"` は `--exclude \"./vendor/**\"` とまったく同じも" -"のにマッチします。これは `--include`、`--exclude`、`--exclude-from`、`." -"bcaignore`、そして `[check.exclude]` ゲート免除セットという、すべてのグロブ入" -"力面に当てはまります。" +"す。`--exclude \"vendor/**\"` は `--exclude \"./vendor/**\"` とまったく同じ" +"ものにマッチします。これは `--include`、`--exclude`、`--exclude-from`、`." +"bcaignore`、そして `[check.exclude]` ゲート免除セットという、すべてのグロブ" +"入力面に当てはまります。" #: src/recipes/quality-reports.md:89 msgid "" @@ -12835,8 +13323,8 @@ msgstr "最も深刻な違反だけを表示する" msgid "" "For a quick triage view that highlights the top three problems per section:" msgstr "" -"セクションごとに上位 3 件の問題をハイライトする簡易トリアージビューには次を使" -"います:" +"セクションごとに上位 3 件の問題をハイライトする簡易トリアージビューには次を" +"使います:" #: src/recipes/quality-reports.md:110 msgid "" @@ -12852,8 +13340,8 @@ msgstr "2 つのリビジョンを比較する" #: src/recipes/quality-reports.md:115 msgid "" -"Aggregate reports do not diff revisions on their own. Run the report on each " -"side and diff the Markdown:" +"Aggregate reports do not diff revisions on their own. Run the report on " +"each side and diff the Markdown:" msgstr "" "集約レポート自体にはリビジョン間の差分を取る機能はありません。両側でそれぞれ" "レポートを実行し、Markdown を diff します:" @@ -12863,8 +13351,8 @@ msgid "" "Because both reports use the same `--strip-prefix` shape, the path columns " "line up and the diff is dominated by metric changes rather than path noise." msgstr "" -"両方のレポートが同じ `--strip-prefix` の形式を使うため、パスの列が揃い、diff " -"はパスのノイズではなくメトリクスの変化が中心になります。" +"両方のレポートが同じ `--strip-prefix` の形式を使うため、パスの列が揃い、" +"diff はパスのノイズではなくメトリクスの変化が中心になります。" #: src/recipes/quality-reports.md:133 msgid "C/C++ preprocessor-aware reports" @@ -12873,11 +13361,11 @@ msgstr "C/C++ プリプロセッサ対応レポート" #: src/recipes/quality-reports.md:135 msgid "" "Macro-heavy C/C++ codebases benefit from feeding preprocessor data into the " -"analyzer so that conditional compilation is interpreted the way the compiler " -"sees it. The workflow is two steps:" +"analyzer so that conditional compilation is interpreted the way the " +"compiler sees it. The workflow is two steps:" msgstr "" -"マクロを多用する C/C++ コードベースでは、プリプロセッサデータをアナライザーに" -"与えることで、条件付きコンパイルをコンパイラが見るのと同じように解釈できま" +"マクロを多用する C/C++ コードベースでは、プリプロセッサデータをアナライザー" +"に与えることで、条件付きコンパイルをコンパイラが見るのと同じように解釈できま" "す。ワークフローは 2 段階です:" #: src/recipes/quality-reports.md:140 @@ -12896,11 +13384,11 @@ msgid "" "C++ analysis matters. Subcommands that do not consume it (`vcs`, `preproc`, " "`list-metrics`, `diff-baseline`) reject it as a usage error." msgstr "" -"`--preproc-data` は、メトリクスを計算してツリーをウォークするすべてのサブコマ" -"ンド(`metrics`、`ops`、`functions`、`report`、`check` など)で受け付けられま" -"す。正確な C/C++ 解析が重要な場面ならどこでも使えます。これを消費しないサブコ" -"マンド(`vcs`、`preproc`、`list-metrics`、`diff-baseline`)では、使用方法エ" -"ラーとして拒否されます。" +"`--preproc-data` は、メトリクスを計算してツリーをウォークするすべてのサブコ" +"マンド(`metrics`、`ops`、`functions`、`report`、`check` など)で受け付けら" +"れます。正確な C/C++ 解析が重要な場面ならどこでも使えます。これを消費しない" +"サブコマンド(`vcs`、`preproc`、`list-metrics`、`diff-baseline`)では、使用" +"方法エラーとして拒否されます。" #: src/recipes/quality-reports.md:158 msgid "Analyze only files changed in a PR" @@ -12927,8 +13415,8 @@ msgid "" "`--paths-from -` reads newline-separated paths from stdin. A file argument " "works the same way: `--paths-from changed.txt`." msgstr "" -"`--paths-from -` は標準入力から改行区切りのパスを読み取ります。ファイル引数で" -"も同様に動作します: `--paths-from changed.txt`。" +"`--paths-from -` は標準入力から改行区切りのパスを読み取ります。ファイル引数" +"でも同様に動作します: `--paths-from changed.txt`。" #: src/recipes/quality-reports.md:172 msgid "" @@ -12939,44 +13427,45 @@ msgid "" msgstr "" "この方法で渡されたパスは**明示的**なものとして扱われるため、ディレクトリ" "ウォークではそれらを隠していたはずの `.gitignore` ルールをバイパスします。言" -"語で絞り込むには `-I '*.py' -I '*.rs'` を組み合わせてください(グロブごとにフ" -"ラグを 1 回ずつ繰り返します)。" +"語で絞り込むには `-I '*.py' -I '*.rs'` を組み合わせてください(グロブごとに" +"フラグを 1 回ずつ繰り返します)。" #: src/recipes/quality-reports.md:177 msgid "" "For a PR-scoped Markdown summary, swap `metrics` for the report pipeline:" msgstr "" -"PR 範囲の Markdown サマリーが必要な場合は、`metrics` をレポートパイプラインに" -"置き換えます:" +"PR 範囲の Markdown サマリーが必要な場合は、`metrics` をレポートパイプライン" +"に置き換えます:" #: src/recipes/quality-reports.md:186 msgid "" "`.gitignore` is honored automatically when walking a directory, so recipes " -"earlier in this page no longer need an explicit `-X \"**/target/**\" -X \"**/" -"node_modules/**\"` if those paths are already covered by your project's `." -"gitignore`. Add `--no-ignore` if you do need to analyze gitignored trees." +"earlier in this page no longer need an explicit `-X \"**/target/**\" -X " +"\"**/node_modules/**\"` if those paths are already covered by your " +"project's `.gitignore`. Add `--no-ignore` if you do need to analyze " +"gitignored trees." msgstr "" "ディレクトリをウォークする際は `.gitignore` が自動的に尊重されるため、この" "ページの前半のレシピでは、対象のパスがプロジェクトの `.gitignore` で既にカ" -"バーされていれば、明示的な `-X \"**/target/**\" -X \"**/node_modules/**\"` は" -"もう不要です。gitignore されたツリーを解析する必要がある場合は `--no-ignore` " -"を追加してください。" +"バーされていれば、明示的な `-X \"**/target/**\" -X \"**/node_modules/**\"` " +"はもう不要です。gitignore されたツリーを解析する必要がある場合は `--no-" +"ignore` を追加してください。" #: src/recipes/ci.md:3 msgid "" "Recipes for wiring `bca` into a build pipeline. The [`bca check`](../" "commands/check.md) command already ships every output shape a modern CI " -"needs (Checkstyle, SARIF, GitLab Code Climate JSON, clang/GCC warning lines, " -"MSVC warning lines), plus [`bca report markdown`](../commands/report.md) for " -"humans. This page is a consolidated map from the user's _goal_ to the right " -"combination of subcommand, flags, and platform glue." +"needs (Checkstyle, SARIF, GitLab Code Climate JSON, clang/GCC warning " +"lines, MSVC warning lines), plus [`bca report markdown`](../commands/report." +"md) for humans. This page is a consolidated map from the user's _goal_ to " +"the right combination of subcommand, flags, and platform glue." msgstr "" "`bca` をビルドパイプラインに組み込むためのレシピ集です。[`bca check`](../" "commands/check.md) コマンドは、現代の CI に必要なあらゆる出力形式" "(Checkstyle、SARIF、GitLab Code Climate JSON、clang/GCC 警告行、MSVC 警告" "行)を既に備えており、加えて人間向けの [`bca report markdown`](../commands/" -"report.md) があります。このページは、ユーザーの _目的_ から、適切なサブコマン" -"ド・フラグ・プラットフォーム連携の組み合わせへの統合マップです。" +"report.md) があります。このページは、ユーザーの _目的_ から、適切なサブコマ" +"ンド・フラグ・プラットフォーム連携の組み合わせへの統合マップです。" #: src/recipes/ci.md:11 msgid "Picking outputs" @@ -12989,8 +13478,8 @@ msgid "" "example." msgstr "" "以下のマトリクスは、よくある目的ごとに、対応する CI サーフェスへ出力を供給す" -"る `bca` の呼び出し方を対応付けたものです。実行可能な例はリンク先の各セクショ" -"ンにあります。" +"る `bca` の呼び出し方を対応付けたものです。実行可能な例はリンク先の各セク" +"ションにあります。" #: src/recipes/ci.md:17 msgid "Goal" @@ -13032,11 +13521,11 @@ msgstr "Code Scanning アラート(GitHub)" #: src/recipes/ci.md:22 msgid "" -"`bca check … --report-format sarif --no-fail` + `github/codeql-action/upload-" -"sarif`" +"`bca check … --report-format sarif --no-fail` + `github/codeql-action/" +"upload-sarif`" msgstr "" -"`bca check … --report-format sarif --no-fail` + `github/codeql-action/upload-" -"sarif`" +"`bca check … --report-format sarif --no-fail` + `github/codeql-action/" +"upload-sarif`" #: src/recipes/ci.md:23 msgid "Merge-request widget (GitLab Code Quality)" @@ -13077,16 +13566,16 @@ msgid "" "bootstrap-refresh-retire workflow._" msgstr "" "_(‡)既存の違反があるコードベースにしきい値を導入する際に推奨される導入パス" -"です。ブートストラップ・リフレッシュ・リタイアのワークフローについては[ベース" -"ラインのレシピ](baselines.md)を参照してください。_" +"です。ブートストラップ・リフレッシュ・リタイアのワークフローについては[ベー" +"スラインのレシピ](baselines.md)を参照してください。_" #: src/recipes/ci.md:33 msgid "" "The full reference for `bca check`'s output formats, exit codes (`0` clean, " "`2` violation, `1` tool error), and threshold config lives in the [Check " "command page](../commands/check.md). For the Markdown report shape, see the " -"[Report command page](../commands/report.md) and the [Quality reports recipe]" -"(quality-reports.md)." +"[Report command page](../commands/report.md) and the [Quality reports " +"recipe](quality-reports.md)." msgstr "" "`bca check` の出力形式、終了コード(`0` はクリーン、`2` は違反、`1` はツール" "エラー)、しきい値設定の完全なリファレンスは [Check コマンドのページ](../" @@ -13110,12 +13599,12 @@ msgid "" "— exercises the threshold gate, the baseline ratchet, both report formats, " "and a SARIF upload to GitHub Code Scanning end-to-end against the workspace " "itself. (The SARIF upload runs on same-repo pushes and PRs only; fork PRs " -"skip it because the upload needs a write-scoped token, exactly as the clippy " -"SARIF job does.) The output sits on GitHub Pages alongside this book:" +"skip it because the upload needs a write-scoped token, exactly as the " +"clippy SARIF job does.) The output sits on GitHub Pages alongside this book:" msgstr "" "`big-code-analysis` は、すべてのプッシュと PR で、以下のレシピを自身のソース" -"に対して実行しています。ワークフローのソースである [`.github/workflows/pages." -"yml`](https://github.com/dekobon/big-code-analysis/blob/main/.github/" +"に対して実行しています。ワークフローのソースである [`.github/workflows/" +"pages.yml`](https://github.com/dekobon/big-code-analysis/blob/main/.github/" "workflows/pages.yml) は、しきい値ゲート、ベースラインのラチェット、両方のレ" "ポート形式、そして GitHub Code Scanning への SARIF アップロードを、ワークス" "ペース自身に対してエンドツーエンドで実行します。(SARIF アップロードは同一リ" @@ -13134,8 +13623,8 @@ msgstr "" #: src/recipes/ci.md:55 msgid "" -"Markdown PR/MR comment: " +"Markdown PR/MR comment: " msgstr "" "Markdown 版 PR/MR コメント: " @@ -13145,24 +13634,25 @@ msgid "" "Copy snippets below straight into your own workflow; the `bca` version " "quoted is the latest published release at the time of writing." msgstr "" -"以下のスニペットはそのまま自身のワークフローにコピーできます。記載されている " -"`bca` のバージョンは、執筆時点で最新の公開リリースです。" +"以下のスニペットはそのまま自身のワークフローにコピーできます。記載されてい" +"る `bca` のバージョンは、執筆時点で最新の公開リリースです。" #: src/recipes/ci.md:61 msgid "" -"The in-tree workflow installs `bca` by building it from the current checkout " -"rather than downloading a pinned release — this avoids the CLI-artifact " -"schema-skew failure mode described under [Installing `bca` from a GitHub " -"Release](#installing-bca-from-a-github-release-recommended) below for repos " -"whose `.bca-baseline.toml` is always written by the same `bca` that gates " -"it. Downstream adopters tracking a stable release line should stick with the " -"pinned-tarball pattern; only switch to \"build from checkout\" if you, too, " -"are mutating CLI artifact schemas in lockstep with the binary." +"The in-tree workflow installs `bca` by building it from the current " +"checkout rather than downloading a pinned release — this avoids the CLI-" +"artifact schema-skew failure mode described under [Installing `bca` from a " +"GitHub Release](#installing-bca-from-a-github-release-recommended) below " +"for repos whose `.bca-baseline.toml` is always written by the same `bca` " +"that gates it. Downstream adopters tracking a stable release line should " +"stick with the pinned-tarball pattern; only switch to \"build from " +"checkout\" if you, too, are mutating CLI artifact schemas in lockstep with " +"the binary." msgstr "" "リポジトリ内のワークフローは、ピン留めされたリリースをダウンロードするのでは" -"なく、現在のチェックアウトから `bca` をビルドしてインストールします。これは、" -"`.bca-baseline.toml` が常にそれをゲートするのと同じ `bca` によって書かれるリ" -"ポジトリにおいて、後述の [GitHub Release からの `bca` のインストール]" +"なく、現在のチェックアウトから `bca` をビルドしてインストールします。これ" +"は、`.bca-baseline.toml` が常にそれをゲートするのと同じ `bca` によって書かれ" +"るリポジトリにおいて、後述の [GitHub Release からの `bca` のインストール]" "(#installing-bca-from-a-github-release-recommended)で説明する CLI アーティ" "ファクトのスキーマ不整合という失敗モードを避けるためです。安定リリース系列を" "追跡する下流の採用者は、ピン留めされた tarball のパターンを使い続けるべきで" @@ -13182,8 +13672,9 @@ msgid "" msgstr "" "既存の 3 つのレシピ、すなわちハードなしきい値ゲート、Code Scanning への " "SARIF アップロード、インライン PR アノテーション用の `clang-warning` + GCC " -"problem matcher は、[Check コマンドのページ](../commands/check.md#ci-example-" -"github-actions)にあります。ここで再実装せず、リンク先を利用してください。" +"problem matcher は、[Check コマンドのページ](../commands/check.md#ci-" +"example-github-actions)にあります。ここで再実装せず、リンク先を利用してくだ" +"さい。" #: src/recipes/ci.md:79 msgid "Installing `bca` from a GitHub Release (recommended)" @@ -13195,15 +13686,15 @@ msgid "" "this repository's [GitHub Releases](https://github.com/dekobon/big-code-" "analysis/releases). It is a single `curl | sha256sum | tar`, requires no " "Rust toolchain, and produces byte-identical binaries across runs. Pair it " -"with [`actions/cache`](https://github.com/actions/cache) keyed by version so " -"a green-path rerun skips the download entirely:" +"with [`actions/cache`](https://github.com/actions/cache) keyed by version " +"so a green-path rerun skips the download entirely:" msgstr "" "最も高速で再現性の高いインストール方法は、このリポジトリの [GitHub Releases]" "(https://github.com/dekobon/big-code-analysis/releases) にあるビルド済み " -"tarball です。`curl | sha256sum | tar` の 1 手順だけで済み、Rust ツールチェー" -"ンを必要とせず、実行のたびにバイト単位で同一のバイナリが得られます。バージョ" -"ンをキーにした [`actions/cache`](https://github.com/actions/cache) と組み合わ" -"せると、正常パスの再実行ではダウンロード自体をスキップできます:" +"tarball です。`curl | sha256sum | tar` の 1 手順だけで済み、Rust ツール" +"チェーンを必要とせず、実行のたびにバイト単位で同一のバイナリが得られます。" +"バージョンをキーにした [`actions/cache`](https://github.com/actions/cache) " +"と組み合わせると、正常パスの再実行ではダウンロード自体をスキップできます:" #: src/recipes/ci.md:88 msgid "" @@ -13213,13 +13704,13 @@ msgid "" "`bca.toml` manifest. A baseline file written by a newer `bca` (carrying a " "newer schema version) is **not loadable** by an older `bca` and the gate " "will fail with `baseline version N is not supported by this bca`. When " -"tracking `main` or regenerating baselines locally with a newer `bca`, either " -"re-pin to a release that covers the new schema or switch to a `cargo install " -"--git` build of `bca` pointed at the same commit your baseline was written " -"from (see the [`cargo install` alternative](#alternative-cargo-install-via-" -"prebuilt-aware-actions) below). The compatibility contract is recorded in " -"[STABILITY.md](https://github.com/dekobon/big-code-analysis/blob/main/" -"STABILITY.md#cli-artifact-formats)." +"tracking `main` or regenerating baselines locally with a newer `bca`, " +"either re-pin to a release that covers the new schema or switch to a `cargo " +"install --git` build of `bca` pointed at the same commit your baseline was " +"written from (see the [`cargo install` alternative](#alternative-cargo-" +"install-via-prebuilt-aware-actions) below). The compatibility contract is " +"recorded in [STABILITY.md](https://github.com/dekobon/big-code-analysis/" +"blob/main/STABILITY.md#cli-artifact-formats)." msgstr "" "**CLI アーティファクトのスキーマ互換性。** ここでピン留めする `BCA_VERSION` " "は、リポジトリがコミットするすべての CLI アーティファクト — 最も重要なのは" @@ -13228,13 +13719,13 @@ msgstr "" "`bca`(より新しいスキーマバージョンを持つもの)が書いたベースラインファイル" "は、古い `bca` では**読み込めず**、ゲートは `baseline version N is not " "supported by this bca` というエラーで失敗します。`main` を追跡している場合" -"や、より新しい `bca` でローカルにベースラインを再生成した場合は、新しいスキー" -"マに対応したリリースへピン留めし直すか、ベースラインを書いたのと同じコミット" -"を指す `bca` の `cargo install --git` ビルドに切り替えてください(後述の " -"[`cargo install` の代替手段](#alternative-cargo-install-via-prebuilt-aware-" -"actions)を参照)。互換性の契約は [STABILITY.md](https://github.com/dekobon/" -"big-code-analysis/blob/main/STABILITY.md#cli-artifact-formats) に記録されてい" -"ます。" +"や、より新しい `bca` でローカルにベースラインを再生成した場合は、新しいス" +"キーマに対応したリリースへピン留めし直すか、ベースラインを書いたのと同じコ" +"ミットを指す `bca` の `cargo install --git` ビルドに切り替えてください(後述" +"の [`cargo install` の代替手段](#alternative-cargo-install-via-prebuilt-" +"aware-actions)を参照)。互換性の契約は [STABILITY.md](https://github.com/" +"dekobon/big-code-analysis/blob/main/STABILITY.md#cli-artifact-formats) に記" +"録されています。" #: src/recipes/ci.md:105 msgid "env" @@ -13342,7 +13833,8 @@ msgid "" " url=\"https://github.com/dekobon/big-code-analysis/releases/download/" "v${BCA_VERSION}/${tarball}\"\n" " mkdir -p \"$HOME/.local/bin\"\n" -" curl -fsSL --proto '=https' --tlsv1.2 -o \"/tmp/${tarball}\" \"$url\"\n" +" curl -fsSL --proto '=https' --tlsv1.2 -o \"/tmp/${tarball}\" " +"\"$url\"\n" " echo \"${BCA_SHA256} /tmp/${tarball}\" | sha256sum --check --strict " "-\n" " tar -xzf \"/tmp/${tarball}\" -C /tmp\n" @@ -13356,7 +13848,8 @@ msgstr "" " url=\"https://github.com/dekobon/big-code-analysis/releases/download/" "v${BCA_VERSION}/${tarball}\"\n" " mkdir -p \"$HOME/.local/bin\"\n" -" curl -fsSL --proto '=https' --tlsv1.2 -o \"/tmp/${tarball}\" \"$url\"\n" +" curl -fsSL --proto '=https' --tlsv1.2 -o \"/tmp/${tarball}\" " +"\"$url\"\n" " echo \"${BCA_SHA256} /tmp/${tarball}\" | sha256sum --check --strict " "-\n" " tar -xzf \"/tmp/${tarball}\" -C /tmp\n" @@ -13374,18 +13867,19 @@ msgstr "echo \"$HOME/.local/bin\" >> \"$GITHUB_PATH\"" #: src/recipes/ci.md:144 msgid "" -"Available `BCA_TARGET` values (pick the one that matches `runs-on`): `x86_64-" -"unknown-linux-gnu`, `x86_64-unknown-linux-musl`, `aarch64-unknown-linux-" -"gnu`, `aarch64-unknown-linux-musl`, `aarch64-apple-darwin`, `x86_64-pc-" -"windows-msvc`, `aarch64-pc-windows-msvc`. Windows assets use `.zip` instead " -"of `.tar.gz`; the `bca-web` binary ships alongside `bca` in the same archive." +"Available `BCA_TARGET` values (pick the one that matches `runs-on`): " +"`x86_64-unknown-linux-gnu`, `x86_64-unknown-linux-musl`, `aarch64-unknown-" +"linux-gnu`, `aarch64-unknown-linux-musl`, `aarch64-apple-darwin`, `x86_64-" +"pc-windows-msvc`, `aarch64-pc-windows-msvc`. Windows assets use `.zip` " +"instead of `.tar.gz`; the `bca-web` binary ships alongside `bca` in the " +"same archive." msgstr "" "利用可能な `BCA_TARGET` の値(`runs-on` に一致するものを選択してください): " "`x86_64-unknown-linux-gnu`、`x86_64-unknown-linux-musl`、`aarch64-unknown-" -"linux-gnu`、`aarch64-unknown-linux-musl`、`aarch64-apple-darwin`、`x86_64-pc-" -"windows-msvc`、`aarch64-pc-windows-msvc`。Windows のアセットは `.tar.gz` では" -"なく `.zip` を使用します。`bca-web` バイナリは同じアーカイブ内で `bca` と一緒" -"に配布されます。" +"linux-gnu`、`aarch64-unknown-linux-musl`、`aarch64-apple-darwin`、`x86_64-" +"pc-windows-msvc`、`aarch64-pc-windows-msvc`。Windows のアセットは `.tar.gz` " +"ではなく `.zip` を使用します。`bca-web` バイナリは同じアーカイブ内で `bca` " +"と一緒に配布されます。" #: src/recipes/ci.md:152 msgid "Alternative: `cargo install` via prebuilt-aware actions" @@ -13393,20 +13887,21 @@ msgstr "代替手段: ビルド済みバイナリ対応アクション経由の #: src/recipes/ci.md:154 msgid "" -"When you cannot reach `github.com` from a runner (air-gapped, custom mirror) " -"but can reach crates.io, the following two actions fall back transparently " -"to `cargo install` when no prebuilt is published — at the cost of compile " -"time on the cold path. Both pin to the same crates.io release as the GitHub " -"Releases assets, so the [CLI-artifact schema compatibility](#installing-bca-" -"from-a-github-release-recommended) warning applies here unchanged." -msgstr "" -"ランナーから `github.com` に到達できないが crates.io には到達できる場合(エア" -"ギャップ環境、カスタムミラー)、次の 2 つのアクションは、ビルド済みバイナリが" -"公開されていないときに透過的に `cargo install` へフォールバックします — その" -"代償はコールドパスでのコンパイル時間です。どちらも GitHub Releases のアセット" -"と同じ crates.io リリースにピン留めするため、[CLI アーティファクトのスキーマ" -"互換性](#installing-bca-from-a-github-release-recommended)の警告はここでもそ" -"のまま当てはまります。" +"When you cannot reach `github.com` from a runner (air-gapped, custom " +"mirror) but can reach crates.io, the following two actions fall back " +"transparently to `cargo install` when no prebuilt is published — at the " +"cost of compile time on the cold path. Both pin to the same crates.io " +"release as the GitHub Releases assets, so the [CLI-artifact schema " +"compatibility](#installing-bca-from-a-github-release-recommended) warning " +"applies here unchanged." +msgstr "" +"ランナーから `github.com` に到達できないが crates.io には到達できる場合(エ" +"アギャップ環境、カスタムミラー)、次の 2 つのアクションは、ビルド済みバイナ" +"リが公開されていないときに透過的に `cargo install` へフォールバックします — " +"その代償はコールドパスでのコンパイル時間です。どちらも GitHub Releases のア" +"セットと同じ crates.io リリースにピン留めするため、[CLI アーティファクトのス" +"キーマ互換性](#installing-bca-from-a-github-release-recommended)の警告はここ" +"でもそのまま当てはまります。" #: src/recipes/ci.md:162 msgid "" @@ -13422,15 +13917,15 @@ msgid "" "recommended default for downstream adopters." msgstr "" "最新の crates.io リリースより先の `bca` が特に必要な場合(例えば、コミットさ" -"れた `.bca-baseline.toml` のスキーマが、公開されているどの `bca` も理解できな" -"いほど新しい場合)は、`tool: big-code-analysis-cli@` や `--version` " -"の形式を、ベースラインが生成された正確なコミットを対象とする `cargo install " -"--git https://github.com/dekobon/big-code-analysis --rev --locked big-" -"code-analysis-cli` に置き換えてください。これはリポジトリ内の [`pages.yml`]" -"(https://github.com/dekobon/big-code-analysis/blob/main/.github/workflows/" -"pages.yml) ワークフローが(`--path` によりローカルチェックアウトに対して)" -"行っていることですが、`bca` 自身のリポジトリのための意図的な回避策であり、下" -"流の採用者に推奨されるデフォルトではありません。" +"れた `.bca-baseline.toml` のスキーマが、公開されているどの `bca` も理解でき" +"ないほど新しい場合)は、`tool: big-code-analysis-cli@` や `--" +"version` の形式を、ベースラインが生成された正確なコミットを対象とする " +"`cargo install --git https://github.com/dekobon/big-code-analysis --rev " +" --locked big-code-analysis-cli` に置き換えてください。これはリポジトリ" +"内の [`pages.yml`](https://github.com/dekobon/big-code-analysis/blob/main/." +"github/workflows/pages.yml) ワークフローが(`--path` によりローカルチェック" +"アウトに対して)行っていることですが、`bca` 自身のリポジトリのための意図的な" +"回避策であり、下流の採用者に推奨されるデフォルトではありません。" #: src/recipes/ci.md:175 msgid "# Option 1: taiki-e/install-action\n" @@ -13474,8 +13969,8 @@ msgid "" "installed binary so the second run is fast:" msgstr "" "いずれかのアクションがコンパイルにフォールバックした場合は、2 回目の実行が速" -"くなるように cargo レジストリとインストール済みバイナリをキャッシュしてくださ" -"い:" +"くなるように cargo レジストリとインストール済みバイナリをキャッシュしてくだ" +"さい:" #: src/recipes/ci.md:194 msgid "Cache cargo registry and bca binary" @@ -13498,8 +13993,8 @@ msgstr "" " # crates.io のリリースは不変なものとして公開されるため、ここでは\n" " # `` のキーで十分です — ローテーションすべき sha256 はありませ" "ん。\n" -" # (上記の GitHub Releases インストールパスは事情が異なります。再公開され" -"た\n" +" # (上記の GitHub Releases インストールパスは事情が異なります。再公開さ" +"れた\n" " # リリースアセットはバージョンを共有するため、そのキャッシュキーには " "sha256 が必要です。)\n" " key" @@ -13516,9 +14011,9 @@ msgid "" "Mondays." msgstr "" "レポートが実行間で再現可能であり続けるよう、特定のバージョン(crates.io に公" -"開されている `big-code-analysis-cli` のリリースに一致するもの)にピン留めして" -"ください。バージョンを固定しないインストールでは、メトリクス集計の変更が月曜" -"日に「謎の CI フレーク」として現れます。" +"開されている `big-code-analysis-cli` のリリースに一致するもの)にピン留めし" +"てください。バージョンを固定しないインストールでは、メトリクス集計の変更が月" +"曜日に「謎の CI フレーク」として現れます。" #: src/recipes/ci.md:213 msgid "Posting the Markdown report as a PR comment" @@ -13533,10 +14028,11 @@ msgid "" "single comment instead of stacking new ones:" msgstr "" "`bca report markdown` は PR/MR コメント専用に設計されています。安定したヘッ" -"ダー構造、ホットスポットごとに 1 行のテーブル、そして `--strip-prefix` を渡せ" -"ば短いパスが得られます。[`marocchino/sticky-pull-request-comment`](https://" -"github.com/marocchino/sticky-pull-request-comment) と組み合わせると、プッシュ" -"のたびに新しいコメントが積み重なるのではなく、単一のコメントが更新されます:" +"ダー構造、ホットスポットごとに 1 行のテーブル、そして `--strip-prefix` を渡" +"せば短いパスが得られます。[`marocchino/sticky-pull-request-comment`]" +"(https://github.com/marocchino/sticky-pull-request-comment) と組み合わせる" +"と、プッシュのたびに新しいコメントが積み重なるのではなく、単一のコメントが更" +"新されます:" #: src/recipes/ci.md:222 msgid "bca-pr-report" @@ -13604,8 +14100,8 @@ msgid "" "upload-artifact@v7`) if you want it downloadable from the workflow run page " "in addition to the PR comment." msgstr "" -"同じ Markdown ファイルは、PR コメントに加えてワークフロー実行ページからもダウ" -"ンロードできるようにしたい場合、ビルドアーティファクトとしてのアップロード" +"同じ Markdown ファイルは、PR コメントに加えてワークフロー実行ページからもダ" +"ウンロードできるようにしたい場合、ビルドアーティファクトとしてのアップロード" "(`actions/upload-artifact@v7`)にも適しています。" #: src/recipes/ci.md:256 @@ -13618,10 +14114,10 @@ msgid "" "committed TOML file, fail only on regressions and new offenders, and shrink " "the file over time. Bootstrap once, commit, then point CI at it:" msgstr "" -"`bca check --baseline` はネイティブのラチェットです。今日時点の違反をコミット" -"済みの TOML ファイルに記録し、リグレッションと新規違反に対してのみ失敗させ、" -"ファイルを時間をかけて縮小していきます。一度ブートストラップしてコミットし、" -"CI をそのファイルに向けます:" +"`bca check --baseline` はネイティブのラチェットです。今日時点の違反をコミッ" +"ト済みの TOML ファイルに記録し、リグレッションと新規違反に対してのみ失敗さ" +"せ、ファイルを時間をかけて縮小していきます。一度ブートストラップしてコミット" +"し、CI をそのファイルに向けます:" #: src/recipes/ci.md:264 msgid "# Once, on a developer machine. Commit both files.\n" @@ -13636,12 +14132,12 @@ msgid "" "with `--exclude-from .bcaignore`, a checked-in deny-set covering vendored " "grammars, generated trees, and tests." msgstr "" -"このスニペットは `src/` のみからブートストラップします — 単一クレートのライブ" -"ラリに適した形です。複数クレートのワークスペースについては[実際の動作例]" -"(#live-worked-example)を参照してください。その `.github/workflows/pages.yml` " -"は、ベンダリングされた文法、生成されたツリー、テストをカバーするチェックイン" -"済みの除外セットである `--exclude-from .bcaignore` を使って、リポジトリ全体を" -"スキャンします。" +"このスニペットは `src/` のみからブートストラップします — 単一クレートのライ" +"ブラリに適した形です。複数クレートのワークスペースについては[実際の動作例]" +"(#live-worked-example)を参照してください。その `.github/workflows/pages." +"yml` は、ベンダリングされた文法、生成されたツリー、テストをカバーするチェッ" +"クイン済みの除外セットである `--exclude-from .bcaignore` を使って、リポジト" +"リ全体をスキャンします。" #: src/recipes/ci.md:276 msgid "" @@ -13649,23 +14145,24 @@ msgid "" "deny-set in a single file at the repo root (a `.bcaignore` by convention, " "mirroring `.gitignore` / `.dockerignore`) and point every `bca` invocation " "at it with `--exclude-from .bcaignore`. Patterns from `--exclude-from` are " -"unioned with any inline `--exclude ` flags into one deny-set — keep `--" -"exclude` for one-off ad-hoc excludes. Blank lines and `#`\\-prefixed comment " -"lines in the file are skipped. Patterns follow the same `./`\\-prefix " -"convention as `--exclude` arguments (the walker's emitted form). Pair edits " -"to `.bcaignore` with a `--write-baseline` refresh — the baseline keys are " -"sensitive to which files the walker visits." -msgstr "" -"**除外リストはワークフロー・レシピ・ブートストラップで共有してください。** 除" -"外セットをリポジトリルートの単一ファイル(`.gitignore` / `.dockerignore` に倣" -"い、慣例として `.bcaignore`)に置き、すべての `bca` 呼び出しを `--exclude-" -"from .bcaignore` でそのファイルに向けます。`--exclude-from` のパターンはイン" -"ラインの `--exclude ` フラグと和集合され、1 つの除外セットになります — " -"`--exclude` は一回限りのアドホックな除外用に残してください。ファイル内の空行" -"と `#` で始まるコメント行はスキップされます。パターンは `--exclude` 引数と同" -"じ `./` プレフィックスの規約(ウォーカーが出力する形式)に従います。`." -"bcaignore` の編集は `--write-baseline` による更新とセットで行ってください — " -"ベースラインのキーは、ウォーカーがどのファイルを訪れるかに敏感です。" +"unioned with any inline `--exclude ` flags into one deny-set — keep " +"`--exclude` for one-off ad-hoc excludes. Blank lines and `#`\\-prefixed " +"comment lines in the file are skipped. Patterns follow the same `./`\\-" +"prefix convention as `--exclude` arguments (the walker's emitted form). " +"Pair edits to `.bcaignore` with a `--write-baseline` refresh — the baseline " +"keys are sensitive to which files the walker visits." +msgstr "" +"**除外リストはワークフロー・レシピ・ブートストラップで共有してください。** " +"除外セットをリポジトリルートの単一ファイル(`.gitignore` / `.dockerignore` " +"に倣い、慣例として `.bcaignore`)に置き、すべての `bca` 呼び出しを `--" +"exclude-from .bcaignore` でそのファイルに向けます。`--exclude-from` のパター" +"ンはインラインの `--exclude ` フラグと和集合され、1 つの除外セットにな" +"ります — `--exclude` は一回限りのアドホックな除外用に残してください。ファイ" +"ル内の空行と `#` で始まるコメント行はスキップされます。パターンは `--" +"exclude` 引数と同じ `./` プレフィックスの規約(ウォーカーが出力する形式)に" +"従います。`.bcaignore` の編集は `--write-baseline` による更新とセットで行っ" +"てください — ベースラインのキーは、ウォーカーがどのファイルを訪れるかに敏感" +"です。" #: src/recipes/ci.md:289 msgid "Threshold check with baseline" @@ -13683,7 +14180,8 @@ msgstr "" msgid "" "A regressed function (`current value > baseline value`) still fails. A new " "offender not in the baseline still fails. An improved function passes " -"silently and stays in the baseline until the next `--write-baseline` refresh." +"silently and stays in the baseline until the next `--write-baseline` " +"refresh." msgstr "" "リグレッションした関数(`current value > baseline value`)は引き続き失敗しま" "す。ベースラインにない新規の違反も引き続き失敗します。改善された関数は黙って" @@ -13695,8 +14193,9 @@ msgid "" "developer can tell at a glance whether they are looking at a brand-new " "offender or a known one that has worsened:" msgstr "" -"stderr ストリームに残った各違反にはタグが前置されるため、開発者は、見ているも" -"のが真新しい違反なのか、既知の違反が悪化したものなのかを一目で判別できます:" +"stderr ストリームに残った各違反にはタグが前置されるため、開発者は、見ている" +"ものが真新しい違反なのか、既知の違反が悪化したものなのかを一目で判別できま" +"す:" #: src/recipes/ci.md:304 msgid "`[new]` — no baseline entry for this function / metric." @@ -13729,27 +14228,27 @@ msgstr "" " = vs limit at L)` という形式のファイル別ロー" "ルアップフッターを、違反数の降順で出力します。これは読み手が最初に見るべきも" "のとして意図されています。どのファイルに最も問題が多いか、そのファイルでどの" -"メトリクスが最も目立っているかが分かります。stderr ストリームを grep でパイプ" -"処理する下流ツールのためにフッターを抑制するには、`--no-summary` を渡してくだ" -"さい。" +"メトリクスが最も目立っているかが分かります。stderr ストリームを grep でパイ" +"プ処理する下流ツールのためにフッターを抑制するには、`--no-summary` を渡して" +"ください。" #: src/recipes/ci.md:320 msgid "" "The four sub-sections below turn `bca check`'s failure output from \"a wall " "of offender lines\" into a stack of CI-aware presentations: which files in " -"this PR tripped a threshold (`--since` / `--changed-only`), inline file-diff " -"annotations (`--github-annotations`), a rendered step-summary digest " +"this PR tripped a threshold (`--since` / `--changed-only`), inline file-" +"diff annotations (`--github-annotations`), a rendered step-summary digest " "(`$GITHUB_STEP_SUMMARY`), and a copy-paste-safe remediation block. Each is " "independent; mix and match per CI surface. A combined worked example is at " "the end of this group." msgstr "" "以下の 4 つのサブセクションは、`bca check` の失敗出力を「違反行の羅列」から " -"CI を意識した表現のスタックへと変えます。この PR のどのファイルがしきい値に触" -"れたか(`--since` / `--changed-only`)、インラインのファイル diff アノテー" +"CI を意識した表現のスタックへと変えます。この PR のどのファイルがしきい値に" +"触れたか(`--since` / `--changed-only`)、インラインのファイル diff アノテー" "ション(`--github-annotations`)、レンダリングされたステップサマリーのダイ" "ジェスト(`$GITHUB_STEP_SUMMARY`)、そしてコピー&ペーストしても安全な修復ブ" -"ロックです。それぞれ独立しているので、CI サーフェスごとに自由に組み合わせられ" -"ます。組み合わせた実例はこのグループの最後にあります。" +"ロックです。それぞれ独立しているので、CI サーフェスごとに自由に組み合わせら" +"れます。組み合わせた実例はこのグループの最後にあります。" #: src/recipes/ci.md:329 msgid "Diff-aware mode (`--since` / `--changed-only`)" @@ -13761,16 +14260,16 @@ msgid "" "files in this change_ tripped a threshold — not the whole-tree offender " "list. Two flags answer that:" msgstr "" -"PR やプッシュで開発者が最初に抱く疑問はたいてい、ツリー全体の違反リストではな" -"く、_この変更に含まれる自分のファイルのうちどれが_ しきい値に触れたのか、で" -"す。2 つのフラグがそれに答えます:" +"PR やプッシュで開発者が最初に抱く疑問はたいてい、ツリー全体の違反リストでは" +"なく、_この変更に含まれる自分のファイルのうちどれが_ しきい値に触れたのか、" +"です。2 つのフラグがそれに答えます:" #: src/recipes/ci.md:335 msgid "" "`--since ` partitions the per-file footer into a \"Files in this range:" "\" section (offenders in files touched between `` and `HEAD`) followed " -"by \"Other offenders:\" (everything else). Per-violation lines are unchanged " -"so existing grep-anchored tooling keeps working." +"by \"Other offenders:\" (everything else). Per-violation lines are " +"unchanged so existing grep-anchored tooling keeps working." msgstr "" "`--since ` はファイル別フッターを、「Files in this range:」セクション" "(`` と `HEAD` の間で変更されたファイルにある違反)と、それに続く" @@ -13782,8 +14281,8 @@ msgid "" "`--changed-only` drops violations from files outside the touched set " "entirely. Use it for PR gates that should be terse." msgstr "" -"`--changed-only` は、変更されたファイル群の外にあるファイルの違反を完全に除外" -"します。簡潔さが求められる PR ゲートに使用してください。" +"`--changed-only` は、変更されたファイル群の外にあるファイルの違反を完全に除" +"外します。簡潔さが求められる PR ゲートに使用してください。" #: src/recipes/ci.md:346 msgid "" @@ -13824,14 +14323,14 @@ msgid "" "`BCA_DIFF_BASE` — the explicit-override hatch. Use this from a local shell " "or non-GHA CI runner to mimic the auto-detection." msgstr "" -"`BCA_DIFF_BASE` — 明示的にオーバーライドするための手段です。ローカルシェルや " -"GHA 以外の CI ランナーから自動検出を模倣するために使用します。" +"`BCA_DIFF_BASE` — 明示的にオーバーライドするための手段です。ローカルシェル" +"や GHA 以外の CI ランナーから自動検出を模倣するために使用します。" #: src/recipes/ci.md:362 msgid "" -"`GITHUB_BASE_REF` — set by GitHub Actions on `pull_request` events. Expanded " -"to `origin/`; the runner is responsible for the corresponding `git " -"fetch`." +"`GITHUB_BASE_REF` — set by GitHub Actions on `pull_request` events. " +"Expanded to `origin/`; the runner is responsible for the " +"corresponding `git fetch`." msgstr "" "`GITHUB_BASE_REF` — GitHub Actions が `pull_request` イベントで設定します。" "`origin/` に展開されます。対応する `git fetch` はランナー側の責任で" @@ -13839,9 +14338,9 @@ msgstr "" #: src/recipes/ci.md:365 msgid "" -"`GITHUB_EVENT_BEFORE` — set by GitHub Actions on `push` events to the SHA at " -"HEAD before the push. The all-zeroes SHA (force push, brand-new branch) is " -"treated as no signal." +"`GITHUB_EVENT_BEFORE` — set by GitHub Actions on `push` events to the SHA " +"at HEAD before the push. The all-zeroes SHA (force push, brand-new branch) " +"is treated as no signal." msgstr "" "`GITHUB_EVENT_BEFORE` — GitHub Actions が `push` イベントで、プッシュ前の " "HEAD の SHA に設定します。すべてゼロの SHA(強制プッシュや新規ブランチ)はシ" @@ -13849,17 +14348,17 @@ msgstr "" #: src/recipes/ci.md:369 msgid "" -"Auto-detection failing — `git` missing, ref unresolvable, not a git checkout " -"— is non-fatal without `--changed-only`: `bca` prints a warning and falls " -"back to today's whole-tree footer. With `--changed-only`, the same failure " -"is fatal so a misconfigured CI does not silently green-light by suppressing " -"every violation." +"Auto-detection failing — `git` missing, ref unresolvable, not a git " +"checkout — is non-fatal without `--changed-only`: `bca` prints a warning " +"and falls back to today's whole-tree footer. With `--changed-only`, the " +"same failure is fatal so a misconfigured CI does not silently green-light " +"by suppressing every violation." msgstr "" "自動検出の失敗(`git` がない、ref が解決できない、git チェックアウトではな" -"い)は、`--changed-only` なしでは致命的ではありません。`bca` は警告を表示し、" -"従来どおりのツリー全体のフッターにフォールバックします。`--changed-only` を指" -"定した場合、同じ失敗は致命的になります。設定を誤った CI がすべての違反を抑制" -"して黙って合格扱いになることを防ぐためです。" +"い)は、`--changed-only` なしでは致命的ではありません。`bca` は警告を表示" +"し、従来どおりのツリー全体のフッターにフォールバックします。`--changed-" +"only` を指定した場合、同じ失敗は致命的になります。設定を誤った CI がすべての" +"違反を抑制して黙って合格扱いになることを防ぐためです。" #: src/recipes/ci.md:375 msgid "" @@ -13867,9 +14366,9 @@ msgid "" "that produced it, so a CI-log reader can verify the gate latched onto the " "expected ref:" msgstr "" -"\"Files in this range:\" バナーには、解決されたベースとそれを導いたシグナルが" -"表示されるため、CI ログの読者はゲートが期待どおりの ref を捕捉したことを確認" -"できます。" +"\"Files in this range:\" バナーには、解決されたベースとそれを導いたシグナル" +"が表示されるため、CI ログの読者はゲートが期待どおりの ref を捕捉したことを確" +"認できます。" #: src/recipes/ci.md:387 msgid "" @@ -13878,9 +14377,9 @@ msgid "" "entries. `--since` diffs **source files** between two git refs." msgstr "" "これは `bca diff-baseline` とは異なります。`bca diff-baseline` はディスク上" -"の 2 つのパス間で**ベースラインファイル**を比較し、追加・削除・悪化・改善され" -"たエントリを報告します。`--since` は 2 つの git ref 間で**ソースファイル**を" -"比較します。" +"の 2 つのパス間で**ベースラインファイル**を比較し、追加・削除・悪化・改善さ" +"れたエントリを報告します。`--since` は 2 つの git ref 間で**ソースファイル**" +"を比較します。" #: src/recipes/ci.md:392 msgid "GitHub Actions inline annotations (`--github-annotations`)" @@ -13888,21 +14387,21 @@ msgstr "GitHub Actions のインラインアノテーション(`--github-annot #: src/recipes/ci.md:394 msgid "" -"The GHA UI renders `::error file=…,line=…,title=…::msg` workflow commands as " -"inline annotations on the file-diff view — much more discoverable than " +"The GHA UI renders `::error file=…,line=…,title=…::msg` workflow commands " +"as inline annotations on the file-diff view — much more discoverable than " "scrolling the raw job log. `bca check` emits one per violation per the tri-" "state `--github-annotations `: `auto` (the default) " -"enables when `$GITHUB_ACTIONS == \"true\"` (set by every GHA workflow step), " -"`always` forces them on, `never` suppresses them even inside a step (handy " -"when a workflow runs `bca check` twice and wants annotations from only one " -"run). A bare `--github-annotations` means `always`." +"enables when `$GITHUB_ACTIONS == \"true\"` (set by every GHA workflow " +"step), `always` forces them on, `never` suppresses them even inside a step " +"(handy when a workflow runs `bca check` twice and wants annotations from " +"only one run). A bare `--github-annotations` means `always`." msgstr "" "GHA の UI は `::error file=…,line=…,title=…::msg` ワークフローコマンドをファ" "イル差分ビュー上のインラインアノテーションとして表示します。生のジョブログを" "スクロールするよりはるかに見つけやすい方法です。`bca check` は、3 状態の `--" "github-annotations ` に従って違反ごとに 1 件ずつ出力しま" -"す。`auto`(デフォルト)は `$GITHUB_ACTIONS == \"true\"`(すべての GHA ワーク" -"フローステップで設定されます)のときに有効化し、`always` は常に有効にし、" +"す。`auto`(デフォルト)は `$GITHUB_ACTIONS == \"true\"`(すべての GHA ワー" +"クフローステップで設定されます)のときに有効化し、`always` は常に有効にし、" "`never` はステップ内でも抑制します(ワークフローが `bca check` を 2 回実行" "し、片方の実行だけからアノテーションを得たい場合に便利です)。引数なしの `--" "github-annotations` は `always` を意味します。" @@ -13912,13 +14411,14 @@ msgid "" "The annotations ride on top of the existing per-violation human stream — " "both are emitted. To avoid exhausting GitHub's 10-error-per-step UI quota, " "annotations are capped at 10 per metric; overflow rolls up to a single `::" -"error::N more violations not shown` line so the count stays visible." +"error::N more violations not shown` line so the count stays " +"visible." msgstr "" "アノテーションは既存の違反ごとの人間向けストリームに重ねて出力され、両方が出" -"力されます。GitHub のステップあたり 10 エラーという UI クォータを使い切らない" -"よう、アノテーションはメトリクスごとに 10 件までに制限され、超過分は 1 行の " -"`::error::N more violations not shown` にまとめられるため、件数は常" -"に確認できます。" +"力されます。GitHub のステップあたり 10 エラーという UI クォータを使い切らな" +"いよう、アノテーションはメトリクスごとに 10 件までに制限され、超過分は 1 行" +"の `::error::N more violations not shown` にまとめられるため、件数" +"は常に確認できます。" #: src/recipes/ci.md:411 msgid "Threshold check with inline annotations" @@ -13950,34 +14450,34 @@ msgstr "ステップサマリーの Markdown ダイジェスト(`$GITHUB_STEP_ #: src/recipes/ci.md:423 msgid "" "GitHub Actions exposes `$GITHUB_STEP_SUMMARY` — a path to a markdown file " -"that, when populated, renders as the step's summary view in the job UI. `bca " -"check` appends a digest containing the per-file rollup table, a per-metric " -"count breakdown, and the top-10 offenders by `value / limit` ratio whenever " -"that env var is set, or when `--summary-file ` is passed explicitly. " -"`--summary-file never` suppresses the digest even when " +"that, when populated, renders as the step's summary view in the job UI. " +"`bca check` appends a digest containing the per-file rollup table, a per-" +"metric count breakdown, and the top-10 offenders by `value / limit` ratio " +"whenever that env var is set, or when `--summary-file ` is passed " +"explicitly. `--summary-file never` suppresses the digest even when " "`$GITHUB_STEP_SUMMARY` is set." msgstr "" "GitHub Actions は `$GITHUB_STEP_SUMMARY` を公開しています。これは Markdown " "ファイルへのパスで、内容を書き込むとジョブ UI にそのステップのサマリービュー" -"として表示されます。`bca check` は、この環境変数が設定されているとき、または " -"`--summary-file ` が明示的に渡されたときに、ファイル別ロールアップ表、" -"メトリクス別の件数内訳、`value / limit` 比による上位 10 件の違反者を含むダイ" -"ジェストを追記します。`--summary-file never` は、`$GITHUB_STEP_SUMMARY` が設" -"定されていてもダイジェストを抑制します。" +"として表示されます。`bca check` は、この環境変数が設定されているとき、また" +"は `--summary-file ` が明示的に渡されたときに、ファイル別ロールアップ" +"表、メトリクス別の件数内訳、`value / limit` 比による上位 10 件の違反者を含む" +"ダイジェストを追記します。`--summary-file never` は、`$GITHUB_STEP_SUMMARY` " +"が設定されていてもダイジェストを抑制します。" #: src/recipes/ci.md:431 msgid "" "The digest is bracketed by HTML-comment markers (`` / ``) so a retried step replaces " "(not stacks) the previous block — three retries converge to exactly one up-" -"to-date digest. Content outside the markers (e.g. summaries written by other " -"tools earlier in the same step) is preserved." +"to-date digest. Content outside the markers (e.g. summaries written by " +"other tools earlier in the same step) is preserved." msgstr "" "ダイジェストは HTML コメントマーカー(`` / " -"``)で囲まれているため、リトライされたステップは" -"前のブロックを(積み重ねるのではなく)置き換えます。3 回リトライしても、最新" -"のダイジェストがちょうど 1 つに収束します。マーカーの外側の内容(同じステップ" -"内で先に他のツールが書き込んだサマリーなど)は保持されます。" +"``)で囲まれているため、リトライされたステップ" +"は前のブロックを(積み重ねるのではなく)置き換えます。3 回リトライしても、最" +"新のダイジェストがちょうど 1 つに収束します。マーカーの外側の内容(同じス" +"テップ内で先に他のツールが書き込んだサマリーなど)は保持されます。" #: src/recipes/ci.md:438 msgid "Threshold check with step-summary digest" @@ -14011,8 +14511,8 @@ msgstr "修復フッター(常時有効)" #: src/recipes/ci.md:452 msgid "" -"When the gate finds violations, `bca check` emits a trailing `--- next steps " -"---` block on stderr (and inside the step-summary digest from above):" +"When the gate finds violations, `bca check` emits a trailing `--- next " +"steps ---` block on stderr (and inside the step-summary digest from above):" msgstr "" "ゲートが違反を検出すると、`bca check` は stderr に(さらに上記のステップサマ" "リーダイジェスト内にも)末尾の `--- next steps ---` ブロックを出力します。" @@ -14023,8 +14523,8 @@ msgid "" "--- next steps ---\n" "* Detailed reports: bca-reports artifact at https://github.com//" "/actions/runs/\n" -"* To refresh baseline: bca check --paths . --exclude-from .bcaignore --write-" -"baseline .bca-baseline.toml\n" +"* To refresh baseline: bca check --paths . --exclude-from .bcaignore --" +"write-baseline .bca-baseline.toml\n" "* Adoption guide: https://dekobon.github.io/big-code-analysis/recipes/" "baselines.html\n" "```" @@ -14033,8 +14533,8 @@ msgstr "" "--- next steps ---\n" "* Detailed reports: bca-reports artifact at https://github.com//" "/actions/runs/\n" -"* To refresh baseline: bca check --paths . --exclude-from .bcaignore --write-" -"baseline .bca-baseline.toml\n" +"* To refresh baseline: bca check --paths . --exclude-from .bcaignore --" +"write-baseline .bca-baseline.toml\n" "* Adoption guide: https://dekobon.github.io/big-code-analysis/recipes/" "baselines.html\n" "```" @@ -14044,17 +14544,17 @@ msgid "" "The refresh invocation mirrors the gate's resolved `--paths`, `--exclude`, " "`--exclude-from`, `--config`, and `--baseline` so a first-time reader of a " "failing CI log can copy-paste it verbatim. The artifact URL is derived from " -"`$GITHUB_REPOSITORY` and `$GITHUB_RUN_ID` when both are present (always true " -"in GHA); local runs — where there is no upload to point at — instead suggest " -"running `bca report` to see the detailed view locally." +"`$GITHUB_REPOSITORY` and `$GITHUB_RUN_ID` when both are present (always " +"true in GHA); local runs — where there is no upload to point at — instead " +"suggest running `bca report` to see the detailed view locally." msgstr "" "このベースライン更新用の呼び出しは、ゲートで解決された `--paths`、`--" -"exclude`、`--exclude-from`、`--config`、`--baseline` をそのまま反映するため、" -"失敗した CI ログを初めて読む人でもそのままコピー&ペーストできます。アーティ" -"ファクト URL は `$GITHUB_REPOSITORY` と `$GITHUB_RUN_ID` の両方が存在するとき" -"(GHA では常に真)に導出されます。ローカル実行では指し示すべきアップロードが" -"存在しないため、代わりに `bca report` を実行して詳細ビューをローカルで確認す" -"ることを提案します。" +"exclude`、`--exclude-from`、`--config`、`--baseline` をそのまま反映するた" +"め、失敗した CI ログを初めて読む人でもそのままコピー&ペーストできます。アー" +"ティファクト URL は `$GITHUB_REPOSITORY` と `$GITHUB_RUN_ID` の両方が存在す" +"るとき(GHA では常に真)に導出されます。ローカル実行では指し示すべきアップ" +"ロードが存在しないため、代わりに `bca report` を実行して詳細ビューをローカル" +"で確認することを提案します。" #: src/recipes/ci.md:471 msgid "" @@ -14079,10 +14579,10 @@ msgid "" "the [Baselines recipe](baselines.md) for the full adoption flow, PR-review " "heuristics, and the suppression composition rules." msgstr "" -"変更のないツリーに対して `--write-baseline` を 2 回実行するとバイト単位で同一" -"の出力が生成されるため、偽の差分は違反者が実際に変化したときにのみ現れます。" -"採用フローの全体、PR レビューのヒューリスティクス、抑制の合成規則については" -"[ベースラインのレシピ](baselines.md)を参照してください。" +"変更のないツリーに対して `--write-baseline` を 2 回実行するとバイト単位で同" +"一の出力が生成されるため、偽の差分は違反者が実際に変化したときにのみ現れま" +"す。採用フローの全体、PR レビューのヒューリスティクス、抑制の合成規則につい" +"ては[ベースラインのレシピ](baselines.md)を参照してください。" #: src/recipes/ci.md:488 msgid "Putting it all together" @@ -14139,8 +14639,8 @@ msgid "" "**Per-violation stderr lines** — same shape as the legacy gate, so existing " "grep tooling keeps working." msgstr "" -"**違反ごとの stderr 行** — 従来のゲートと同じ形式なので、既存の grep ツール群" -"がそのまま使えます。" +"**違反ごとの stderr 行** — 従来のゲートと同じ形式なので、既存の grep ツール" +"群がそのまま使えます。" #: src/recipes/ci.md:516 msgid "" @@ -14162,12 +14662,12 @@ msgstr "" #: src/recipes/ci.md:521 msgid "" -"**Step-summary panel** with a rendered markdown digest (per-file rollup, per-" -"metric breakdown, top-10 offenders by ratio)." +"**Step-summary panel** with a rendered markdown digest (per-file rollup, " +"per-metric breakdown, top-10 offenders by ratio)." msgstr "" -"**ステップサマリーパネル** — レンダリングされた Markdown ダイジェスト(ファイ" -"ル別ロールアップ、メトリクス別内訳、比率による上位 10 件の違反者)を表示しま" -"す。" +"**ステップサマリーパネル** — レンダリングされた Markdown ダイジェスト(ファ" +"イル別ロールアップ、メトリクス別内訳、比率による上位 10 件の違反者)を表示し" +"ます。" #: src/recipes/ci.md:523 msgid "" @@ -14209,7 +14709,8 @@ msgstr "" #: src/recipes/ci.md:533 msgid "`auto` enables when `$GITHUB_ACTIONS == \"true\"`; `never` opts out" -msgstr "`auto` は `$GITHUB_ACTIONS == \"true\"` のとき有効化。`never` で無効化" +msgstr "" +"`auto` は `$GITHUB_ACTIONS == \"true\"` のとき有効化。`never` で無効化" #: src/recipes/ci.md:534 msgid "Append markdown digest; `never` opts out" @@ -14229,10 +14730,10 @@ msgid "" "behaviour: none of the four features auto-enable without an env signal. To " "preview the GHA experience locally:" msgstr "" -"GHA の外で `bca check` を実行するローカルユーザーにとって、デフォルトの挙動に" -"変化はありません。環境からのシグナルなしに自動有効化される機能は 4 つのうち " -"1 つもありません。GHA での体験をローカルでプレビューするには次のようにしま" -"す。" +"GHA の外で `bca check` を実行するローカルユーザーにとって、デフォルトの挙動" +"に変化はありません。環境からのシグナルなしに自動有効化される機能は 4 つのう" +"ち 1 つもありません。GHA での体験をローカルでプレビューするには次のようにし" +"ます。" #: src/recipes/ci.md:542 msgid "true" @@ -14247,8 +14748,8 @@ msgid "" "For a non-GHA CI (GitLab, Buildkite, Jenkins), set the env vars your runner " "exposes (or pass the flags explicitly) and the same output paths fire." msgstr "" -"GHA 以外の CI(GitLab、Buildkite、Jenkins)では、ランナーが公開する環境変数を" -"設定する(またはフラグを明示的に渡す)ことで、同じ出力経路が動作します。" +"GHA 以外の CI(GitLab、Buildkite、Jenkins)では、ランナーが公開する環境変数" +"を設定する(またはフラグを明示的に渡す)ことで、同じ出力経路が動作します。" #: src/recipes/ci.md:553 msgid "Offender-count delta against merge base (stopgap)" @@ -14256,9 +14757,10 @@ msgstr "マージベースに対する違反者数の差分(暫定策)" #: src/recipes/ci.md:555 msgid "" -"For teams who cannot commit a baseline file (e.g. policy reasons), a coarser " -"approximation counts `` elements in two Checkstyle documents — one on " -"the merge base, one on the PR head — and fails when the count grows:" +"For teams who cannot commit a baseline file (e.g. policy reasons), a " +"coarser approximation counts `` elements in two Checkstyle documents " +"— one on the merge base, one on the PR head — and fails when the count " +"grows:" msgstr "" "(ポリシー上の理由などで)ベースラインファイルをコミットできないチーム向けの" "より粗い近似として、2 つの Checkstyle ドキュメント(マージベース上のものと " @@ -14289,7 +14791,8 @@ msgid "" "\n" " echo \"Offenders: base=$BASE_COUNT head=$HEAD_COUNT\"\n" " if [ \"$HEAD_COUNT\" -gt \"$BASE_COUNT\" ]; then\n" -" echo \"::error::Offender count grew from $BASE_COUNT to $HEAD_COUNT\"\n" +" echo \"::error::Offender count grew from $BASE_COUNT to " +"$HEAD_COUNT\"\n" " exit 1\n" " fi\n" msgstr "" @@ -14311,7 +14814,8 @@ msgstr "" "\n" " echo \"Offenders: base=$BASE_COUNT head=$HEAD_COUNT\"\n" " if [ \"$HEAD_COUNT\" -gt \"$BASE_COUNT\" ]; then\n" -" echo \"::error::Offender count grew from $BASE_COUNT to $HEAD_COUNT\"\n" +" echo \"::error::Offender count grew from $BASE_COUNT to " +"$HEAD_COUNT\"\n" " exit 1\n" " fi\n" @@ -14342,14 +14846,14 @@ msgid "" "second tier at 95% of every limit so encroachment is caught a commit or two " "before the hard gate trips:" msgstr "" -"CI のしきい値ゲートはプッシュ後にしか作動しないため、リファクタリングが気付か" -"ないうちにメトリクスを限界値の先へ押し出していた場合には手遅れです。`big-" -"code-analysis` リポジトリの [`Makefile`](https://github.com/dekobon/big-code-" -"analysis/blob/main/Makefile) は、CI ゲート([`.github/workflows/pages.yml` " -"の `Threshold gate` ステップ](https://github.com/dekobon/big-code-analysis/" -"blob/main/.github/workflows/pages.yml))をローカルでミラーする 4 つのターゲッ" -"トを公開し、さらに各限界値の 95% に第 2 の段階を追加して、ハードゲートが作動" -"する 1〜2 コミット前に接近を検出できるようにしています。" +"CI のしきい値ゲートはプッシュ後にしか作動しないため、リファクタリングが気付" +"かないうちにメトリクスを限界値の先へ押し出していた場合には手遅れです。`big-" +"code-analysis` リポジトリの [`Makefile`](https://github.com/dekobon/big-" +"code-analysis/blob/main/Makefile) は、CI ゲート([`.github/workflows/pages." +"yml` の `Threshold gate` ステップ](https://github.com/dekobon/big-code-" +"analysis/blob/main/.github/workflows/pages.yml))をローカルでミラーする 4 つ" +"のターゲットを公開し、さらに各限界値の 95% に第 2 の段階を追加して、ハード" +"ゲートが作動する 1〜2 コミット前に接近を検出できるようにしています。" #: src/recipes/ci.md:603 msgid "# hard gate, 100% of bca.toml thresholds\n" @@ -14384,26 +14888,26 @@ msgstr "" #: src/recipes/ci.md:620 msgid "" "Both tiers consume the same `bca.toml` thresholds and the same `.bca-" -"baseline.toml`; the soft tier just runs the hard recipe with every threshold " -"value multiplied by `BCA_HEADROOM`. Both exit `0` clean, `2` on any " -"threshold violation, `1` on tool error — the soft tier is a real gate, not " -"advisory, so do not wrap `make self-scan-headroom` in `|| true`. The two " -"gate targets (`self-scan`, `self-scan-headroom`) are wired into `make pre-" -"commit`, `make ci`, and `.pre-commit-config.yaml`; those chains run the hard " -"tier before the soft tier, so a true regression always reports before near-" -"limit headroom. The two `write-baseline` targets are side-effecting and " -"deliberately not wired in." +"baseline.toml`; the soft tier just runs the hard recipe with every " +"threshold value multiplied by `BCA_HEADROOM`. Both exit `0` clean, `2` on " +"any threshold violation, `1` on tool error — the soft tier is a real gate, " +"not advisory, so do not wrap `make self-scan-headroom` in `|| true`. The " +"two gate targets (`self-scan`, `self-scan-headroom`) are wired into `make " +"pre-commit`, `make ci`, and `.pre-commit-config.yaml`; those chains run the " +"hard tier before the soft tier, so a true regression always reports before " +"near-limit headroom. The two `write-baseline` targets are side-effecting " +"and deliberately not wired in." msgstr "" "両段階は同じ `bca.toml` のしきい値と同じ `.bca-baseline.toml` を使用します。" "ソフト段階は、各しきい値に `BCA_HEADROOM` を掛けた上でハード段階のレシピを実" "行するだけです。どちらもクリーンなら `0`、しきい値違反があれば `2`、ツールエ" "ラーなら `1` で終了します。ソフト段階は助言的なものではなく本物のゲートなの" -"で、`make self-scan-headroom` を `|| true` で包まないでください。2 つのゲート" -"ターゲット(`self-scan`、`self-scan-headroom`)は `make pre-commit`、`make " -"ci`、`.pre-commit-config.yaml` に組み込まれています。これらのチェーンはハード" -"段階をソフト段階より先に実行するため、真のリグレッションは常に限界値接近の警" -"告より先に報告されます。2 つの `write-baseline` ターゲットは副作用を伴うた" -"め、意図的に組み込まれていません。" +"で、`make self-scan-headroom` を `|| true` で包まないでください。2 つのゲー" +"トターゲット(`self-scan`、`self-scan-headroom`)は `make pre-commit`、" +"`make ci`、`.pre-commit-config.yaml` に組み込まれています。これらのチェーン" +"はハード段階をソフト段階より先に実行するため、真のリグレッションは常に限界値" +"接近の警告より先に報告されます。2 つの `write-baseline` ターゲットは副作用を" +"伴うため、意図的に組み込まれていません。" #: src/recipes/ci.md:632 msgid "" @@ -14416,8 +14920,8 @@ msgstr "" "`BCA_HEADROOM=0.90 make self-scan-headroom` は帯域を広げ、" "`BCA_HEADROOM=0.99` は最後の 1% まで狭めます。ソフト段階が作動したときは、" "`make self-scan-write-baseline-headroom`(すべての違反者をスケール後のしきい" -"値で記録します — ハード段階の違反者の厳密な上位集合です)でベースラインに違反" -"者を取り込みます。" +"値で記録します — ハード段階の違反者の厳密な上位集合です)でベースラインに違" +"反者を取り込みます。" #: src/recipes/ci.md:639 msgid "" @@ -14426,12 +14930,12 @@ msgid "" "gates recipe](local-gates.md) documents the underlying principles, drop-in " "Makefile / `just` / `package.json` skeletons, and the helper script that " "scales thresholds, so you can adopt the same workflow in your own repo. The " -"generic recipe uses the same `BCA_*` env-var names as the Makefile above, so " -"overrides like `BCA_HEADROOM=0.90` work identically across both." +"generic recipe uses the same `BCA_*` env-var names as the Makefile above, " +"so overrides like `BCA_HEADROOM=0.90` work identically across both." msgstr "" "このパターン(CI をミラーするハード段階 + 早期警告帯としてのソフト段階、どち" -"らも同じベースラインでラチェット)はプロジェクトに依存しません。[ローカルしき" -"い値ゲートのレシピ](local-gates.md)には、基礎となる原則、そのまま使える " +"らも同じベースラインでラチェット)はプロジェクトに依存しません。[ローカルし" +"きい値ゲートのレシピ](local-gates.md)には、基礎となる原則、そのまま使える " "Makefile / `just` / `package.json` のスケルトン、しきい値をスケールするヘル" "パースクリプトが記載されており、同じワークフローを自分のリポジトリでも採用で" "きます。汎用レシピは上記の Makefile と同じ `BCA_*` 環境変数名を使うため、" @@ -14465,8 +14969,8 @@ msgid "" msgstr "" "GitHub Actions セクションの [CLI アーティファクトのスキーマ互換性に関する注" "意](#installing-bca-from-a-github-release-recommended)がここでも当てはまりま" -"す。`BCA_VERSION` のピンは、リポジトリにコミットするすべての CLI アーティファ" -"クトのスキーマバージョンをカバーしなければなりません。" +"す。`BCA_VERSION` のピンは、リポジトリにコミットするすべての CLI アーティ" +"ファクトのスキーマバージョンをカバーしなければなりません。" #: src/recipes/ci.md:662 src/recipes/local-gates.md:543 #: src/recipes/local-gates.md:549 @@ -14549,12 +15053,12 @@ msgid "" " if [ ! -x \"$CI_PROJECT_DIR/.cache/bca/bca\" ]; then\n" " stage=\"big-code-analysis-${BCA_VERSION}-${BCA_TARGET}\"\n" " tarball=\"${stage}.tar.gz\"\n" -" url=\"https://github.com/dekobon/big-code-analysis/releases/download/" -"v${BCA_VERSION}/${tarball}\"\n" +" url=\"https://github.com/dekobon/big-code-analysis/releases/" +"download/v${BCA_VERSION}/${tarball}\"\n" " curl -fsSL --proto '=https' --tlsv1.2 -o \"/tmp/${tarball}\" " "\"$url\"\n" -" echo \"${BCA_SHA256} /tmp/${tarball}\" | sha256sum --check --strict " -"-\n" +" echo \"${BCA_SHA256} /tmp/${tarball}\" | sha256sum --check --" +"strict -\n" " tar -xzf \"/tmp/${tarball}\" -C /tmp\n" " install -m 0755 \"/tmp/${stage}/bca\" \"$CI_PROJECT_DIR/.cache/bca/" "bca\"\n" @@ -14570,12 +15074,12 @@ msgstr "" " if [ ! -x \"$CI_PROJECT_DIR/.cache/bca/bca\" ]; then\n" " stage=\"big-code-analysis-${BCA_VERSION}-${BCA_TARGET}\"\n" " tarball=\"${stage}.tar.gz\"\n" -" url=\"https://github.com/dekobon/big-code-analysis/releases/download/" -"v${BCA_VERSION}/${tarball}\"\n" +" url=\"https://github.com/dekobon/big-code-analysis/releases/" +"download/v${BCA_VERSION}/${tarball}\"\n" " curl -fsSL --proto '=https' --tlsv1.2 -o \"/tmp/${tarball}\" " "\"$url\"\n" -" echo \"${BCA_SHA256} /tmp/${tarball}\" | sha256sum --check --strict " -"-\n" +" echo \"${BCA_SHA256} /tmp/${tarball}\" | sha256sum --check --" +"strict -\n" " tar -xzf \"/tmp/${tarball}\" -C /tmp\n" " install -m 0755 \"/tmp/${stage}/bca\" \"$CI_PROJECT_DIR/.cache/bca/" "bca\"\n" @@ -14650,9 +15154,9 @@ msgstr "この例に関する補足です。" #: src/recipes/ci.md:732 msgid "" "The first two `bca check … --no-fail` invocations collect offenders for the " -"artifacts; the final `bca check` (no `--no-fail`) is the pass/fail gate. All " -"three runs use the same threshold config so the artifacts always match the " -"gate decision." +"artifacts; the final `bca check` (no `--no-fail`) is the pass/fail gate. " +"All three runs use the same threshold config so the artifacts always match " +"the gate decision." msgstr "" "最初の 2 回の `bca check … --no-fail` 呼び出しはアーティファクト用に違反者を" "収集します。最後の `bca check`(`--no-fail` なし)が合否を決めるゲートです。" @@ -14670,8 +15174,8 @@ msgstr "" #: src/recipes/ci.md:739 msgid "" "`artifacts:reports:codequality` wires the Code Climate JSON directly into " -"GitLab's MR Code Quality widget — see the [Code Quality widget section below]" -"(#gitlab-code-quality-widget) for the field-by-field semantics." +"GitLab's MR Code Quality widget — see the [Code Quality widget section " +"below](#gitlab-code-quality-widget) for the field-by-field semantics." msgstr "" "`artifacts:reports:codequality` は Code Climate JSON を GitLab の MR Code " "Quality ウィジェットに直接接続します。フィールドごとの意味は[下記の Code " @@ -14689,17 +15193,17 @@ msgid "" "docs.gitlab.com/ci/testing/code_quality/). `bca check` emits this natively " "via `--report-format code-climate`, so the integration is a one-liner:" msgstr "" -"GitLab の第一級の Code Quality 体験(MR 差分上のインライン指摘、MR 概要ページ" -"のサマリー)は [Code Climate JSON](https://docs.gitlab.com/ci/testing/" -"code_quality/) を読み取ります。`bca check` は `--report-format code-climate` " -"によりこれをネイティブに出力するため、統合は 1 行で済みます。" +"GitLab の第一級の Code Quality 体験(MR 差分上のインライン指摘、MR 概要ペー" +"ジのサマリー)は [Code Climate JSON](https://docs.gitlab.com/ci/testing/" +"code_quality/) を読み取ります。`bca check` は `--report-format code-" +"climate` によりこれをネイティブに出力するため、統合は 1 行で済みます。" #: src/recipes/ci.md:768 msgid "" "Severity bands are derived from how far each metric exceeds its configured " "threshold (`value / limit` ratio, inverted for the maintainability-index " -"family where lower is worse): `≤ 1.5×` → `minor`, `≤ 2×` → `major`, `≤ 4×` → " -"`critical`, `> 4×` → `blocker`. The widget deduplicates findings by " +"family where lower is worse): `≤ 1.5×` → `minor`, `≤ 2×` → `major`, `≤ 4×` " +"→ `critical`, `> 4×` → `blocker`. The widget deduplicates findings by " "`fingerprint`; `bca` hashes `path \\0 function \\0 metric` (no line, no " "value) so a violation surviving an upstream line-drift edit still collapses " "into the same widget entry across pipeline runs." @@ -14707,10 +15211,10 @@ msgstr "" "重大度の帯は、各メトリクスが設定されたしきい値をどれだけ超えているか" "(`value / limit` 比。値が低いほど悪い保守容易性指数系では反転)から導出され" "ます: `≤ 1.5×` → `minor`、`≤ 2×` → `major`、`≤ 4×` → `critical`、`> 4×` → " -"`blocker`。ウィジェットは `fingerprint` で検出結果を重複排除します。`bca` は " -"`path \\0 function \\0 metric` を(行番号も値も含めずに)ハッシュ化するため、" -"変更による行ずれを生き延びた違反は、パイプライン実行をまたいで同じウィジェッ" -"トエントリに集約されます。" +"`blocker`。ウィジェットは `fingerprint` で検出結果を重複排除します。`bca` " +"は `path \\0 function \\0 metric` を(行番号も値も含めずに)ハッシュ化するた" +"め、変更による行ずれを生き延びた違反は、パイプライン実行をまたいで同じウィ" +"ジェットエントリに集約されます。" #: src/recipes/ci.md:777 msgid "Sanity-check a generated report locally:" @@ -14805,11 +15309,12 @@ msgstr "" #: src/recipes/ci.md:814 msgid "" "`CI_BCA_BOT_TOKEN` is a project access token with `api` scope. The job " -"depends on `bca-quality` so the Markdown artifact is in place before it runs." +"depends on `bca-quality` so the Markdown artifact is in place before it " +"runs." msgstr "" "`CI_BCA_BOT_TOKEN` は `api` スコープを持つプロジェクトアクセストークンです。" -"このジョブは `bca-quality` に依存するため、実行前に Markdown アーティファクト" -"が揃っています。" +"このジョブは `bca-quality` に依存するため、実行前に Markdown アーティファク" +"トが揃っています。" #: src/recipes/ci.md:818 msgid "Jenkins / SonarQube" @@ -14822,23 +15327,23 @@ msgid "" "invocation feeds both:" msgstr "" "Jenkins(_Warnings Next Generation_ プラグイン経由)と SonarQube(_Generic " -"Issue_ インポーター経由)は、どちらも Checkstyle 4.3 XML を直接読み取ります。" -"同じ呼び出しが両方に使えます。" +"Issue_ インポーター経由)は、どちらも Checkstyle 4.3 XML を直接読み取りま" +"す。同じ呼び出しが両方に使えます。" #: src/recipes/ci.md:830 msgid "" "Wire `report.checkstyle.xml` into your existing Jenkins _Record Issues_ / " -"SonarQube _External Issues_ step. The Checkstyle writer emits an empty (well-" -"formed) document when there are no offenders, so neither tool needs special-" -"casing for a clean run. See the [Check command page](../commands/check." -"md#checkstyle-ci-integration) for the writer's schema details." -msgstr "" -"`report.checkstyle.xml` を、既存の Jenkins の _Record Issues_ / SonarQube の " -"_External Issues_ ステップに接続してください。Checkstyle ライターは違反者がい" -"ないときも空の(整形式の)ドキュメントを出力するため、どちらのツールもクリー" -"ンな実行を特別扱いする必要はありません。ライターのスキーマの詳細は [check コ" -"マンドのページ](../commands/check.md#checkstyle-ci-integration)を参照してくだ" -"さい。" +"SonarQube _External Issues_ step. The Checkstyle writer emits an empty " +"(well-formed) document when there are no offenders, so neither tool needs " +"special-casing for a clean run. See the [Check command page](../commands/" +"check.md#checkstyle-ci-integration) for the writer's schema details." +msgstr "" +"`report.checkstyle.xml` を、既存の Jenkins の _Record Issues_ / SonarQube " +"の _External Issues_ ステップに接続してください。Checkstyle ライターは違反者" +"がいないときも空の(整形式の)ドキュメントを出力するため、どちらのツールもク" +"リーンな実行を特別扱いする必要はありません。ライターのスキーマの詳細は " +"[check コマンドのページ](../commands/check.md#checkstyle-ci-integration)を参" +"照してください。" #: src/recipes/ci.md:837 msgid "Generic CI guidance" @@ -14874,14 +15379,14 @@ msgid "" "**`--jobs` defaults to the effective CPU count.** The flag honors " "`available_parallelism()` — cgroup-/cpuset-/quota-aware on Linux, OS CPU " "count on macOS/Windows — so CI runners no longer need to thread `--jobs " -"\"$(nproc)\"` through every recipe. `--jobs 1` remains a debugging knob, not " -"a default." +"\"$(nproc)\"` through every recipe. `--jobs 1` remains a debugging knob, " +"not a default." msgstr "" "**`--jobs` のデフォルトは有効 CPU 数です。** このフラグは " "`available_parallelism()` に従います — Linux では cgroup / cpuset / クォータ" -"を考慮し、macOS / Windows では OS の CPU 数を使います — ので、CI ランナーであ" -"らゆるレシピに `--jobs \"$(nproc)\"` を通す必要はもうありません。`--jobs 1` " -"はデフォルトではなく、デバッグ用のノブとして残っています。" +"を考慮し、macOS / Windows では OS の CPU 数を使います — ので、CI ランナーで" +"あらゆるレシピに `--jobs \"$(nproc)\"` を通す必要はもうありません。`--jobs " +"1` はデフォルトではなく、デバッグ用のノブとして残っています。" #: src/recipes/ci.md:856 msgid "" @@ -14891,8 +15396,8 @@ msgid "" "work/...` vs. `/builds/group/project/...` noise." msgstr "" "**`bca report markdown` には常に `--strip-prefix \"$PWD/\"` を渡してくださ" -"い。** そうすればパス列は、ワークスペースパスが異なるランナー間でも同一になり" -"ます。これがないと、2 つのレポートの差分は `/home/runner/work/...` と `/" +"い。** そうすればパス列は、ワークスペースパスが異なるランナー間でも同一にな" +"ります。これがないと、2 つのレポートの差分は `/home/runner/work/...` と `/" "builds/group/project/...` のノイズに支配されます。" #: src/recipes/ci.md:861 @@ -14904,9 +15409,9 @@ msgid "" msgstr "" "**`bca.toml` はリポジトリルートに置いてください** — `Cargo.toml` / " "`pyproject.toml` / `package.json` と同じ場所です。`bca` はこれを自動的に発見" -"するため、引数なしの `bca check` がコミット済みのしきい値、パス、ベースライン" -"を読み込みます。これをソースコードとして扱い、しきい値の緩和はコードレビュー" -"で審査してください。" +"するため、引数なしの `bca check` がコミット済みのしきい値、パス、ベースライ" +"ンを読み込みます。これをソースコードとして扱い、しきい値の緩和はコードレ" +"ビューで審査してください。" #: src/recipes/ci.md:866 msgid "" @@ -14914,24 +15419,24 @@ msgid "" "violation, `1` on tool error (bad config, unknown metric, unreadable path). " "Reserving `1` for tool errors lets CI distinguish \"a function got too " "complex\" from \"the analyzer crashed\". Pass `--exit-codes=tiered` (or set " -"`[check] exit_codes = \"tiered\"` in `bca.toml`) to split the violation case " -"by severity: `2` new offenders only, `3` regressions only, `4` both, `5` a " -"`--tier=soft` violation that also breaches the hard limit. The tiered codes " -"are opt-in; the default stays `0`/`1`/`2`. Every fail-state remains non-" -"zero, so `exit != 0 → fail` wrappers keep working — only tooling that tests " -"`$? -eq 2` explicitly needs to widen to `2`\\-`5`." +"`[check] exit_codes = \"tiered\"` in `bca.toml`) to split the violation " +"case by severity: `2` new offenders only, `3` regressions only, `4` both, " +"`5` a `--tier=soft` violation that also breaches the hard limit. The tiered " +"codes are opt-in; the default stays `0`/`1`/`2`. Every fail-state remains " +"non-zero, so `exit != 0 → fail` wrappers keep working — only tooling that " +"tests `$? -eq 2` explicitly needs to widen to `2`\\-`5`." msgstr "" "**終了コードの契約。** `bca check` は、クリーンなら `0`、しきい値違反があれ" "ば `2`、ツールエラー(不正な設定、未知のメトリクス、読み取れないパス)なら " -"`1` で終了します。`1` をツールエラー専用に予約することで、CI は「関数が複雑に" -"なりすぎた」と「アナライザーがクラッシュした」を区別できます。`--exit-" -"codes=tiered` を渡す(または `bca.toml` に `[check] exit_codes = \"tiered\"` " -"を設定する)と、違反の場合を重大度で分割できます: `2` は新規違反者のみ、`3` " -"はリグレッションのみ、`4` は両方、`5` はハード限界も同時に超えた `--" -"tier=soft` 違反です。tiered の終了コードはオプトインで、デフォルトは `0`/`1`/" -"`2` のままです。すべての失敗状態は非ゼロのままなので、`exit != 0 → fail` 型の" -"ラッパーはそのまま機能します — 明示的に `$? -eq 2` を検査するツールだけが " -"`2`\\-`5` に広げる必要があります。" +"`1` で終了します。`1` をツールエラー専用に予約することで、CI は「関数が複雑" +"になりすぎた」と「アナライザーがクラッシュした」を区別できます。`--exit-" +"codes=tiered` を渡す(または `bca.toml` に `[check] exit_codes = " +"\"tiered\"` を設定する)と、違反の場合を重大度で分割できます: `2` は新規違反" +"者のみ、`3` はリグレッションのみ、`4` は両方、`5` はハード限界も同時に超え" +"た `--tier=soft` 違反です。tiered の終了コードはオプトインで、デフォルトは " +"`0`/`1`/`2` のままです。すべての失敗状態は非ゼロのままなので、`exit != 0 → " +"fail` 型のラッパーはそのまま機能します — 明示的に `$? -eq 2` を検査するツー" +"ルだけが `2`\\-`5` に広げる必要があります。" #: src/recipes/ci.md:878 msgid "" @@ -14940,10 +15445,10 @@ msgid "" "(../commands/suppression.md); passing `--no-suppress` ignores them so " "auditors see the raw offender list." msgstr "" -"**ソース内の抑制マーカーを尊重し、監査には `--no-suppress` を使ってください。" -"** デフォルトの `bca check` は [`bca: suppress` / `bca: suppress-file` マー" -"カー](../commands/suppression.md)を尊重します。`--no-suppress` を渡すとそれら" -"を無視するため、監査者は生の違反者リストを確認できます。" +"**ソース内の抑制マーカーを尊重し、監査には `--no-suppress` を使ってくださ" +"い。** デフォルトの `bca check` は [`bca: suppress` / `bca: suppress-file` " +"マーカー](../commands/suppression.md)を尊重します。`--no-suppress` を渡すと" +"それらを無視するため、監査者は生の違反者リストを確認できます。" #: src/recipes/baselines.md:1 msgid "Baselines: ratcheting thresholds on existing code" @@ -14958,19 +15463,19 @@ msgid "" "file is how `bca check` supports that workflow." msgstr "" "既存のコードベースにメトリクスのしきい値を導入すると、たいてい同じ壁にぶつか" -"ります。妥当なしきい値はどれも既存の関数を何百件もフラグし、CI はプッシュのた" -"びに赤になります。現実的な採用経路は「現状からラチェットし、新規の違反者だけ" -"を失敗させる」ことです。ベースラインファイルは、`bca check` がそのワークフ" +"ります。妥当なしきい値はどれも既存の関数を何百件もフラグし、CI はプッシュの" +"たびに赤になります。現実的な採用経路は「現状からラチェットし、新規の違反者だ" +"けを失敗させる」ことです。ベースラインファイルは、`bca check` がそのワークフ" "ローを支えるための仕組みです。" #: src/recipes/baselines.md:10 msgid "" "Baselines are the complement to in-source suppression markers, not a " "substitute. Use suppression markers ([Suppression markers](../commands/" -"suppression.md)) when a function is intentionally complex forever (a parser, " -"a state machine, generated code). Use a baseline when the team intends to " -"pay the debt down. Both can live in the same repo; suppression is checked " -"first." +"suppression.md)) when a function is intentionally complex forever (a " +"parser, a state machine, generated code). Use a baseline when the team " +"intends to pay the debt down. Both can live in the same repo; suppression " +"is checked first." msgstr "" "ベースラインはソース内の抑制マーカーを補完するものであり、その代替ではありま" "せん。関数が意図的に恒久的に複雑な場合(パーサー、状態機械、生成コード)は抑" @@ -14986,20 +15491,21 @@ msgstr "エンドツーエンドの採用フロー" msgid "" "One-shot shortcut: `bca init` scaffolds a consolidated `bca.toml` manifest " "(with `paths`, `exclude_from`, `baseline`, and a `[thresholds]` table), the " -"`.bcaignore` it references, and an initial `.bca-baseline.toml` derived from " -"the current tree in a single command. With the manifest in place, a bare " -"`bca check` discovers it and gates zero-config; pass `--force` to overwrite " -"existing files or `--no-baseline` to skip the walk. The longer recipe below " -"is useful when you want to tune thresholds before bootstrapping the baseline." -msgstr "" -"ワンショットのショートカット: `bca init` は、統合された `bca.toml` マニフェス" -"ト(`paths`、`exclude_from`、`baseline`、`[thresholds]` テーブルを含む)、そ" -"れが参照する `.bcaignore`、そして現在のツリーから導出した初期 `.bca-baseline." -"toml` を 1 つのコマンドでスキャフォールドします。マニフェストが配置されていれ" -"ば、引数なしの `bca check` がそれを自動発見し、設定なしでゲートします。既存" -"ファイルを上書きするには `--force` を、ツリーの走査をスキップするには `--no-" -"baseline` を渡します。以下の長めのレシピは、ベースラインをブートストラップす" -"る前にしきい値を調整したい場合に有用です。" +"`.bcaignore` it references, and an initial `.bca-baseline.toml` derived " +"from the current tree in a single command. With the manifest in place, a " +"bare `bca check` discovers it and gates zero-config; pass `--force` to " +"overwrite existing files or `--no-baseline` to skip the walk. The longer " +"recipe below is useful when you want to tune thresholds before " +"bootstrapping the baseline." +msgstr "" +"ワンショットのショートカット: `bca init` は、統合された `bca.toml` マニフェ" +"スト(`paths`、`exclude_from`、`baseline`、`[thresholds]` テーブルを含む)、" +"それが参照する `.bcaignore`、そして現在のツリーから導出した初期 `.bca-" +"baseline.toml` を 1 つのコマンドでスキャフォールドします。マニフェストが配置" +"されていれば、引数なしの `bca check` がそれを自動発見し、設定なしでゲートし" +"ます。既存ファイルを上書きするには `--force` を、ツリーの走査をスキップする" +"には `--no-baseline` を渡します。以下の長めのレシピは、ベースラインをブート" +"ストラップする前にしきい値を調整したい場合に有用です。" #: src/recipes/baselines.md:29 msgid "1. Pick initial thresholds" @@ -15010,8 +15516,8 @@ msgid "" "Either gut-feel numbers (`cyclomatic=15`, `cognitive=20`) or pull them from " "a `bca check --no-fail` run over the repo to see the current distribution." msgstr "" -"感覚的な数値(`cyclomatic=15`、`cognitive=20`)を使うか、リポジトリ全体に対す" -"る `bca check --no-fail` の実行結果から現在の分布を確認して決めます。" +"感覚的な数値(`cyclomatic=15`、`cognitive=20`)を使うか、リポジトリ全体に対" +"する `bca check --no-fail` の実行結果から現在の分布を確認して決めます。" #: src/recipes/baselines.md:35 msgid "" @@ -15050,14 +15556,14 @@ msgid "" "A bare `--write-baseline` (no path) writes to the `baseline` key from the " "`bca.toml` you just created, so the filename lives in exactly one place. " "Pass an explicit path (`--write-baseline `) only when you have no " -"manifest `baseline` to default to — without one, the bare form errors rather " -"than guessing a filename." +"manifest `baseline` to default to — without one, the bare form errors " +"rather than guessing a filename." msgstr "" "パスなしの `--write-baseline` は、先ほど作成した `bca.toml` の `baseline` " "キーに書き込むため、ファイル名は 1 か所だけで管理されます。明示的なパス(`--" "write-baseline `)を渡すのは、デフォルトとして使えるマニフェストの " -"`baseline` がない場合だけにしてください。マニフェストがない場合、パスなしの形" -"式はファイル名を推測せずエラーになります。" +"`baseline` がない場合だけにしてください。マニフェストがない場合、パスなしの" +"形式はファイル名を推測せずエラーになります。" #: src/recipes/baselines.md:60 msgid "Commit both files in the same change:" @@ -15075,11 +15581,11 @@ msgid "" "regardless of which `--paths` form CI uses — switch between them freely " "without re-running `--write-baseline`." msgstr "" -"ベースライン内のパスキーは、ベースラインファイル自身のディレクトリ(_アンカー" -"_)からの相対パスで保存されます。`--paths .`、`--paths src/`、`--paths " +"ベースライン内のパスキーは、ベースラインファイル自身のディレクトリ(_アン" +"カー_)からの相対パスで保存されます。`--paths .`、`--paths src/`、`--paths " "\"$PWD\"` はバイト単位で同一のベースラインを生成し、CI がどの `--paths` 形式" -"を使っても `--baseline` の実行結果は一致します。`--write-baseline` を再実行す" -"ることなく、自由に切り替えられます。" +"を使っても `--baseline` の実行結果は一致します。`--write-baseline` を再実行" +"することなく、自由に切り替えられます。" #: src/recipes/baselines.md:73 msgid "3. Wire the CI gate" @@ -15125,8 +15631,8 @@ msgid "" "[CI integration](ci.md) for the broader matrix of CI surfaces." msgstr "" "終了コード: `0` はクリーン、`2` はリグレッションまたは新規違反、`1` はツール" -"エラーです。CI 環境ごとの幅広い対応表については [CI 統合](ci.md) を参照してく" -"ださい。" +"エラーです。CI 環境ごとの幅広い対応表については [CI 統合](ci.md) を参照して" +"ください。" #: src/recipes/baselines.md:99 msgid "4. Refresh the baseline as the team pays debt down" @@ -15157,7 +15663,12 @@ msgid "" "`(path, qualified, metric)` identity — so a function that merely drifted up " "or down the file is _not_ reported as a remove + add — and buckets every " "real change:" -msgstr "生の `git diff .bca-baseline.toml` を頭の中で解析する代わりに、`bca diff-baseline ` を実行してサマリーを読みます。エントリは `(path, qualified, metric)` のアイデンティティで対応付けられるため、ファイル内で位置が上下しただけの関数は削除 + 追加としては報告「されず」、実際の変更はすべて次のバケットに分類されます:" +msgstr "" +"生の `git diff .bca-baseline.toml` を頭の中で解析する代わりに、`bca diff-" +"baseline ` を実行してサマリーを読みます。エントリは `(path, " +"qualified, metric)` のアイデンティティで対応付けられるため、ファイル内で位置" +"が上下しただけの関数は削除 + 追加としては報告「されず」、実際の変更はすべて" +"次のバケットに分類されます:" #: src/recipes/baselines.md:135 msgid "Map the buckets back to the old heuristics:" @@ -15172,14 +15683,14 @@ msgstr "" #: src/recipes/baselines.md:138 msgid "" "**`added` (baseline grew).** Someone added a new offender to the file " -"intentionally. Review the values — was this a deliberate stopgap, or did the " -"author bypass the gate? Either is fine if conscious; the point of the file " -"being committed is to make the choice reviewable." +"intentionally. Review the values — was this a deliberate stopgap, or did " +"the author bypass the gate? Either is fine if conscious; the point of the " +"file being committed is to make the choice reviewable." msgstr "" "**`added`(ベースラインが拡大)。** 誰かが意図的に新しい違反をファイルに追加" -"しました。値をレビューしてください — これは意図的な暫定措置だったのか、それと" -"も作者がゲートを回避したのか。意識的な判断であればどちらでも構いません。この" -"ファイルをコミットする意義は、その選択をレビュー可能にすることにあります。" +"しました。値をレビューしてください — これは意図的な暫定措置だったのか、それ" +"とも作者がゲートを回避したのか。意識的な判断であればどちらでも構いません。こ" +"のファイルをコミットする意義は、その選択をレビュー可能にすることにあります。" #: src/recipes/baselines.md:143 msgid "" @@ -15196,8 +15707,8 @@ msgid "" "**`improved`.** A recorded offender got better without dropping out of the " "baseline; harmless, and a good sign the refactor is working." msgstr "" -"**`improved`。** 記録済みの違反がベースラインから外れることなく改善しました。" -"無害であり、リファクタリングが機能している良い兆候です。" +"**`improved`。** 記録済みの違反がベースラインから外れることなく改善しまし" +"た。無害であり、リファクタリングが機能している良い兆候です。" #: src/recipes/baselines.md:149 msgid "" @@ -15214,9 +15725,9 @@ msgstr "" "worsened-only` / `--added-only` フィルタでレビュアーが必ず見るべきリグレッ" "ションだけに絞り込めます。`--format json` は同じ diff を他のツールに渡せま" "す。このコマンドはデフォルトで終了コード 0 を返します — レビューに情報を提供" -"するものであり、ゲートではありません(ゲートは `bca check` 自体です)。ただし" -"オプトインの `--exit-code` フラグを使うと、フィルタ後の diff が空でない場合に" -"終了コード 2 を返します。" +"するものであり、ゲートではありません(ゲートは `bca check` 自体です)。ただ" +"しオプトインの `--exit-code` フラグを使うと、フィルタ後の diff が空でない場" +"合に終了コード 2 を返します。" #: src/recipes/baselines.md:157 msgid "Reading the gate output" @@ -15227,8 +15738,8 @@ msgid "" "A failing `bca check --baseline` run prefixes each surviving violation with " "a tag and follows the list with a per-file rollup:" msgstr "" -"`bca check --baseline` の実行が失敗すると、残った各違反にタグのプレフィックス" -"が付き、リストの後にファイルごとのロールアップが続きます:" +"`bca check --baseline` の実行が失敗すると、残った各違反にタグのプレフィック" +"スが付き、リストの後にファイルごとのロールアップが続きます:" #: src/recipes/baselines.md:173 msgid "Tag prefixes:" @@ -15241,26 +15752,26 @@ msgid "" "body hash. The violation is new since the baseline was written. See " "[Matching](#how-matching-works) for the resolution order." msgstr "" -"`[new]` — 修飾シンボル(行トレランスの範囲内)でも、`--baseline-fuzzy-match` " -"指定時のボディハッシュでも、この違反に一致するベースラインエントリがありませ" -"ん。ベースライン作成後に新たに発生した違反です。解決順序については[マッチン" -"グ](#how-matching-works)を参照してください。" +"`[new]` — 修飾シンボル(行トレランスの範囲内)でも、`--baseline-fuzzy-" +"match` 指定時のボディハッシュでも、この違反に一致するベースラインエントリが" +"ありません。ベースライン作成後に新たに発生した違反です。解決順序については" +"[マッチング](#how-matching-works)を参照してください。" #: src/recipes/baselines.md:180 msgid "" "`[regr +N%]` — the baseline contains a recorded value and the current value " "is `N%` higher. Cases:" msgstr "" -"`[regr +N%]` — ベースラインに記録された値があり、現在の値がそれより `N%` 高い" -"状態です。特殊なケース:" +"`[regr +N%]` — ベースラインに記録された値があり、現在の値がそれより `N%` 高" +"い状態です。特殊なケース:" #: src/recipes/baselines.md:182 msgid "" "`[regr from 0]` when the recorded value is `0.0` and a non-zero percentage " "would divide by zero." msgstr "" -"`[regr from 0]` — 記録された値が `0.0` で、非ゼロのパーセンテージがゼロ除算に" -"なる場合。" +"`[regr from 0]` — 記録された値が `0.0` で、非ゼロのパーセンテージがゼロ除算" +"になる場合。" #: src/recipes/baselines.md:184 msgid "" @@ -15284,9 +15795,9 @@ msgid "" "stderr stream can suppress the trailing summary with `--no-summary`." msgstr "" "タグは `--baseline` を渡したときにのみ表示されます。渡さない場合、行のフォー" -"マットはベースラインなしのデフォルトとバイト単位で同一です。stderr ストリーム" -"を grep でパイプする CI ツールは、`--no-summary` で末尾のサマリーを抑制できま" -"す。" +"マットはベースラインなしのデフォルトとバイト単位で同一です。stderr ストリー" +"ムを grep でパイプする CI ツールは、`--no-summary` で末尾のサマリーを抑制で" +"きます。" #: src/recipes/baselines.md:194 msgid "" @@ -15296,9 +15807,9 @@ msgid "" "offender list and spot which file to start with." msgstr "" "サマリーフッターは違反をファイルごとにグループ化し、ファイルごとに最悪のメト" -"リクス 1 件(`value / limit` 比の最大値)を提示し、行を違反数の降順、次にパス" -"の昇順でソートします。長い違反リストを読み、どのファイルから着手すべきかを見" -"つける最速の方法です。" +"リクス 1 件(`value / limit` 比の最大値)を提示し、行を違反数の降順、次にパ" +"スの昇順でソートします。長い違反リストを読み、どのファイルから着手すべきかを" +"見つける最速の方法です。" #: src/recipes/baselines.md:199 msgid "6. Retire the baseline" @@ -15310,9 +15821,9 @@ msgid "" "the `--baseline` flag from CI and delete the file. The thresholds now stand " "on their own." msgstr "" -"`.bca-baseline.toml` が `version = 5` のみでエントリを含まなくなったら、CI か" -"ら `--baseline` フラグを外してファイルを削除します。以降はしきい値だけで成立" -"します。" +"`.bca-baseline.toml` が `version = 5` のみでエントリを含まなくなったら、CI " +"から `--baseline` フラグを外してファイルを削除します。以降はしきい値だけで成" +"立します。" #: src/recipes/baselines.md:205 msgid "Tier/headroom provenance" @@ -15322,7 +15833,9 @@ msgstr "ティア/ヘッドルームの来歴" msgid "" "A baseline written with `--write-baseline` (v5+) records _which gate it was " "written against_ in a `[provenance]` table:" -msgstr "`--write-baseline`(v5 以降)で書き込まれたベースラインは、「どのゲートに対して書き込まれたか」を `[provenance]` テーブルに記録します:" +msgstr "" +"`--write-baseline`(v5 以降)で書き込まれたベースラインは、「どのゲートに対" +"して書き込まれたか」を `[provenance]` テーブルに記録します:" #: src/recipes/baselines.md:210 msgid "" @@ -15352,21 +15865,21 @@ msgstr "" #: src/recipes/baselines.md:220 msgid "" -"`tier = \"soft\"`, `headroom = ` — written by the soft gate scaled by " -"the soft ratio (`bca check --tier=soft=0.95 --write-baseline …`)." +"`tier = \"soft\"`, `headroom = ` — written by the soft gate scaled " +"by the soft ratio (`bca check --tier=soft=0.95 --write-baseline …`)." msgstr "" "`tier = \"soft\"`, `headroom = ` — ソフト比率でスケールされたソフト" -"ゲート(`bca check --tier=soft=0.95 --write-baseline …`)によって書き込まれた" -"もの。" +"ゲート(`bca check --tier=soft=0.95 --write-baseline …`)によって書き込まれ" +"たもの。" #: src/recipes/baselines.md:223 msgid "" "`tier = \"soft\"` with no `headroom` — written by the soft gate driven by a " "`[thresholds.soft]` table (per-metric limits, no single ratio)." msgstr "" -"`tier = \"soft\"` で `headroom` なし — `[thresholds.soft]` テーブル(メトリク" -"スごとの制限で、単一の比率なし)に駆動されるソフトゲートによって書き込まれた" -"もの。" +"`tier = \"soft\"` で `headroom` なし — `[thresholds.soft]` テーブル(メトリ" +"クスごとの制限で、単一の比率なし)に駆動されるソフトゲートによって書き込まれ" +"たもの。" #: src/recipes/baselines.md:226 msgid "" @@ -15375,8 +15888,8 @@ msgid "" "carry no provenance and are read without error." msgstr "" "この来歴はコメントではなく本物の TOML テーブルなので、`bca diff-baseline` や" -"外部ツールが読み取れます。古い bca(v2–v4)で書き込まれたベースラインは来歴を" -"持ちませんが、エラーなく読み込まれます。" +"外部ツールが読み取れます。古い bca(v2–v4)で書き込まれたベースラインは来歴" +"を持ちませんが、エラーなく読み込まれます。" #: src/recipes/baselines.md:230 msgid "The stricter-than-baseline warning" @@ -15388,7 +15901,11 @@ msgid "" "effective limits to a single _strictness_ scalar (hard → `1.0`; soft scaled " "by `h` → `h`; smaller means stricter) and warns when the current run is " "**stricter** than the baseline was written against:" -msgstr "`bca check` は、ベースラインの来歴と現在の実行の実効制限を単一の「厳格度」スカラーに縮約し(ハード → `1.0`、`h` でスケールされたソフト → `h`、小さいほど厳しい)、現在の実行がベースライン書き込み時よりも*「厳しい」*場合に警告します:" +msgstr "" +"`bca check` は、ベースラインの来歴と現在の実行の実効制限を単一の「厳格度」ス" +"カラーに縮約し(ハード → `1.0`、`h` でスケールされたソフト → `h`、小さいほど" +"厳しい)、現在の実行がベースライン書き込み時よりも*「厳しい」*場合に警告しま" +"す:" #: src/recipes/baselines.md:244 msgid "" @@ -15396,7 +15913,12 @@ msgid "" "baseline-as-the-team-pays-debt-down) guards against: a baseline written " "_looser_ than the current gate may not list every offender the tighter gate " "produces, so the gate can suddenly fire on files nobody touched." -msgstr "これは[ベースライン更新の規律](#4-refresh-the-baseline-as-the-team-pays-debt-down)が防ごうとしているサイレントな不整合です。現在のゲートより「緩く」書き込まれたベースラインは、より厳しいゲートが検出するすべての違反を網羅していない可能性があり、誰も触れていないファイルで突然ゲートが発火することがあります。" +msgstr "" +"これは[ベースライン更新の規律](#4-refresh-the-baseline-as-the-team-pays-" +"debt-down)が防ごうとしているサイレントな不整合です。現在のゲートより「緩く」" +"書き込まれたベースラインは、より厳しいゲートが検出するすべての違反を網羅して" +"いない可能性があり、誰も触れていないファイルで突然ゲートが発火することがあり" +"ます。" #: src/recipes/baselines.md:250 msgid "" @@ -15408,9 +15930,19 @@ msgid "" "baseline.toml`. It also stays silent for equal provenance, for pre-v5 " "baselines (provenance unknown), and when either side is a `[thresholds." "soft]`\\-table baseline (no single ratio to compare). To clear a genuine " -"warning, refresh the baseline at the current tier with the matching `--write-" -"baseline` recipe." -msgstr "この警告は**方向性**を持ちます。現在の実行のほうが厳しい場合にのみ発火します。安全な方向では沈黙します — ハードチェック(厳格度 `1.0`)がソフト `0.95` のベースラインを読む場合、そこには自身の違反の「上位集合」が含まれており、これはまさに `make self-scan`(ハード)と `make self-scan-headroom`(ソフト)が同じ `.bca-baseline.toml` を通じてラチェットする、意図された単一ベースライン構成です。来歴が等しい場合、v5 より前のベースライン(来歴不明)の場合、どちらか一方が `[thresholds.soft]` テーブル方式のベースライン(比較すべき単一の比率がない)である場合も沈黙します。本当の警告を解消するには、対応する `--write-baseline` レシピを使って現在のティアでベースラインを更新します。" +"warning, refresh the baseline at the current tier with the matching `--" +"write-baseline` recipe." +msgstr "" +"この警告は**方向性**を持ちます。現在の実行のほうが厳しい場合にのみ発火しま" +"す。安全な方向では沈黙します — ハードチェック(厳格度 `1.0`)がソフト " +"`0.95` のベースラインを読む場合、そこには自身の違反の「上位集合」が含まれて" +"おり、これはまさに `make self-scan`(ハード)と `make self-scan-headroom`" +"(ソフト)が同じ `.bca-baseline.toml` を通じてラチェットする、意図された単一" +"ベースライン構成です。来歴が等しい場合、v5 より前のベースライン(来歴不明)" +"の場合、どちらか一方が `[thresholds.soft]` テーブル方式のベースライン(比較" +"すべき単一の比率がない)である場合も沈黙します。本当の警告を解消するには、対" +"応する `--write-baseline` レシピを使って現在のティアでベースラインを更新しま" +"す。" #: src/recipes/baselines.md:261 msgid "How matching works" @@ -15426,9 +15958,9 @@ msgid "" msgstr "" "各エントリは `(path, qualified_symbol, metric)` をキーとします。修飾シンボル" "とは、囲んでいる名前付きコンテナを `::` で連結した連鎖に関数名を加えたもので" -"す(`MyStruct::do_thing`、`my_namespace::MyClass::method`)。ファイルのトップ" -"レベルのスペースは `` に畳み込まれます。違反は次の順序でベースラインに" -"対して解決されます:" +"す(`MyStruct::do_thing`、`my_namespace::MyClass::method`)。ファイルのトッ" +"プレベルのスペースは `` に畳み込まれます。違反は次の順序でベースライン" +"に対して解決されます:" #: src/recipes/baselines.md:269 msgid "" @@ -15436,9 +15968,10 @@ msgid "" "qualified_symbol, metric)`, it matches **regardless of line number** — so " "editing code above a function no longer re-keys it as `[new]`." msgstr "" -"**修飾シンボル。** 違反の `(path, qualified_symbol, metric)` を共有するエント" -"リがちょうど 1 つであれば、**行番号に関係なく**一致します。そのため、関数より" -"上のコードを編集しても `[new]` として再キー化されることはなくなりました。" +"**修飾シンボル。** 違反の `(path, qualified_symbol, metric)` を共有するエン" +"トリがちょうど 1 つであれば、**行番号に関係なく**一致します。そのため、関数" +"より上のコードを編集しても `[new]` として再キー化されることはなくなりまし" +"た。" #: src/recipes/baselines.md:273 msgid "" @@ -15448,11 +15981,11 @@ msgid "" "the violation — and within `--baseline-line-tolerance` lines (default 50) — " "wins. Beyond the tolerance the violation is `[new]`." msgstr "" -"**開始行トレランス。** 複数のエントリがそのキーを共有する場合(アナライザが区" -"別できなかった異なる `impl` ブロック上の同名メソッド `is_valid`、オーバーロー" -"ドなど)、記録された `start_line` が違反に最も近く、かつ `--baseline-line-" -"tolerance` 行以内(デフォルト 50)にあるエントリが選ばれます。トレランスを超" -"えた違反は `[new]` になります。" +"**開始行トレランス。** 複数のエントリがそのキーを共有する場合(アナライザが" +"区別できなかった異なる `impl` ブロック上の同名メソッド `is_valid`、オーバー" +"ロードなど)、記録された `start_line` が違反に最も近く、かつ `--baseline-" +"line-tolerance` 行以内(デフォルト 50)にあるエントリが選ばれます。トレラン" +"スを超えた違反は `[new]` になります。" #: src/recipes/baselines.md:279 msgid "" @@ -15471,12 +16004,12 @@ msgstr "" "飾シンボルがもはや一致しない違反は、同じ `(path, metric)` 内で正規化されたボ" "ディハッシュが同一のエントリと照合されます。これにより、関数の形を保ったまま" "のリネームを吸収できます(ダイジェストは関数自身の名前を除外し、インデント・" -"空行・CRLF の影響を受けません)。ハッシュは `--baseline-fuzzy-match` が設定さ" -"れている場合にのみベースラインに書き込まれるため、ファジー読み取りを有効にす" -"るには一度ファジーな `--write-baseline` でシードしてください。両方のキーは " -"`bca.toml` の `[check]` の下に `baseline_line_tolerance` および " -"`baseline_fuzzy_match` として設定します(トップレベルに直接書く綴りは非推奨で" -"警告が出ます。#599 を参照)。" +"空行・CRLF の影響を受けません)。ハッシュは `--baseline-fuzzy-match` が設定" +"されている場合にのみベースラインに書き込まれるため、ファジー読み取りを有効に" +"するには一度ファジーな `--write-baseline` でシードしてください。両方のキー" +"は `bca.toml` の `[check]` の下に `baseline_line_tolerance` および " +"`baseline_fuzzy_match` として設定します(トップレベルに直接書く綴りは非推奨" +"で警告が出ます。#599 を参照)。" #: src/recipes/baselines.md:291 msgid "" @@ -15485,7 +16018,12 @@ msgid "" "key as `[new]` when they move — the symbol fix only survives line drift for " "_named_ top-level and method-bound functions, which produce the bulk of " "baseline churn." -msgstr "**匿名関数**(クロージャ、ラムダ)には安定した名前がないため、その修飾シンボルには行番号が焼き込まれます(`outer::`)。したがって移動すると `[new]` として再キー化されます。シンボルによる対応付けが行のずれに耐えるのは、ベースラインのチャーンの大半を生む「名前付き」のトップレベル関数とメソッドに束縛された関数だけです。" +msgstr "" +"**匿名関数**(クロージャ、ラムダ)には安定した名前がないため、その修飾シンボ" +"ルには行番号が焼き込まれます(`outer::`)。したがって移動すると " +"`[new]` として再キー化されます。シンボルによる対応付けが行のずれに耐えるの" +"は、ベースラインのチャーンの大半を生む「名前付き」のトップレベル関数とメソッ" +"ドに束縛された関数だけです。" #: src/recipes/baselines.md:297 msgid "Remediation footer" @@ -15493,19 +16031,19 @@ msgstr "修復フッター" #: src/recipes/baselines.md:299 msgid "" -"When the gate finds violations, `bca check` emits a trailing `--- next steps " -"---` block on stderr (and inside the `$GITHUB_STEP_SUMMARY` digest) that " -"names the artifact, prints a copy-paste-safe `--write-baseline` refresh " -"invocation, and links back to this recipe. The refresh invocation mirrors " -"the gate's resolved `--paths` / `--exclude` / `--exclude-from` / `--" -"config` / `--baseline` arguments, so a first-time reader of a failing CI log " -"can refresh the baseline without leaving the page." +"When the gate finds violations, `bca check` emits a trailing `--- next " +"steps ---` block on stderr (and inside the `$GITHUB_STEP_SUMMARY` digest) " +"that names the artifact, prints a copy-paste-safe `--write-baseline` " +"refresh invocation, and links back to this recipe. The refresh invocation " +"mirrors the gate's resolved `--paths` / `--exclude` / `--exclude-from` / `--" +"config` / `--baseline` arguments, so a first-time reader of a failing CI " +"log can refresh the baseline without leaving the page." msgstr "" "ゲートが違反を検出すると、`bca check` は stderr に(および " -"`$GITHUB_STEP_SUMMARY` ダイジェスト内に)末尾の `--- next steps ---` ブロック" -"を出力します。このブロックは対象アーティファクトを名指しし、そのままコピー&" -"ペーストできる `--write-baseline` の更新コマンドを提示し、このレシピへのリン" -"クを示します。更新コマンドはゲートが解決した `--paths` / `--exclude` / `--" +"`$GITHUB_STEP_SUMMARY` ダイジェスト内に)末尾の `--- next steps ---` ブロッ" +"クを出力します。このブロックは対象アーティファクトを名指しし、そのままコピー" +"&ペーストできる `--write-baseline` の更新コマンドを提示し、このレシピへのリ" +"ンクを示します。更新コマンドはゲートが解決した `--paths` / `--exclude` / `--" "exclude-from` / `--config` / `--baseline` 引数をそのまま反映するため、失敗し" "た CI ログを初めて読む人でも、ページを離れることなくベースラインを更新できま" "す。" @@ -15531,12 +16069,12 @@ msgid "" "commit). Use the baseline only for violations the team genuinely intends to " "fix." msgstr "" -"`--write-baseline` は、`bca: suppress` または `#lizard forgives` マーカーで抑" -"止された関数をあらかじめ除外するため、同じ関数が 2 か所に登録されることはあり" -"ません。関数を恒久的に除外するつもりであれば、ソース内マーカーを優先してくだ" -"さい(コードの隣に置かれ、リファクタリングに耐え、コミットすべき追加ファイル" -"もありません)。ベースラインは、チームが本当に修正するつもりのある違反にのみ" -"使ってください。" +"`--write-baseline` は、`bca: suppress` または `#lizard forgives` マーカーで" +"抑止された関数をあらかじめ除外するため、同じ関数が 2 か所に登録されることは" +"ありません。関数を恒久的に除外するつもりであれば、ソース内マーカーを優先して" +"ください(コードの隣に置かれ、リファクタリングに耐え、コミットすべき追加ファ" +"イルもありません)。ベースラインは、チームが本当に修正するつもりのある違反に" +"のみ使ってください。" #: src/recipes/baselines.md:320 msgid "" @@ -15551,8 +16089,8 @@ msgid "" "Combined with `--write-baseline`, `--no-suppress` records every violation " "including the ones that suppression markers normally hide." msgstr "" -"`--write-baseline` と組み合わせると、`--no-suppress` は抑制マーカーが通常隠す" -"違反も含め、すべての違反を記録します。" +"`--write-baseline` と組み合わせると、`--no-suppress` は抑制マーカーが通常隠" +"す違反も含め、すべての違反を記録します。" #: src/recipes/baselines.md:332 msgid "Auditing every exemption at once" @@ -15561,15 +16099,15 @@ msgstr "すべての除外を一度に監査する" #: src/recipes/baselines.md:334 msgid "" "A baseline is one of three ways code escapes the gate; the other two are in-" -"source `bca: suppress` markers and `[check.exclude]` globs. `bca exemptions` " -"lists all three tiers in a single report so a reviewer can see everything " -"`bca check` is skipping without running three commands:" +"source `bca: suppress` markers and `[check.exclude]` globs. `bca " +"exemptions` lists all three tiers in a single report so a reviewer can see " +"everything `bca check` is skipping without running three commands:" msgstr "" -"ベースラインは、コードがゲートを逃れる 3 つの方法のうちの 1 つです。残りの 2 " -"つは、ソース内の `bca: suppress` マーカーと `[check.exclude]` グロブです。" -"`bca exemptions` はこの 3 層すべてを 1 つのレポートに列挙するため、レビュアー" -"は 3 つのコマンドを実行することなく、`bca check` がスキップしているものを一覧" -"できます:" +"ベースラインは、コードがゲートを逃れる 3 つの方法のうちの 1 つです。残りの " +"2 つは、ソース内の `bca: suppress` マーカーと `[check.exclude]` グロブです。" +"`bca exemptions` はこの 3 層すべてを 1 つのレポートに列挙するため、レビュ" +"アーは 3 つのコマンドを実行することなく、`bca check` がスキップしているもの" +"を一覧できます:" #: src/recipes/baselines.md:357 msgid "" @@ -15578,10 +16116,19 @@ msgid "" "`--baseline-only` to list just the baselined offenders, `--format markdown` " "for a PR comment, or `--format json` for dashboards. During PR review, pair " "it with `bca diff-baseline ` (above): the diff shows what " -"_changed_ in the baseline, `bca exemptions` shows the full current exemption " -"surface. See the [Suppression markers](../commands/suppression.md#auditing-" -"exemptions-bca-exemptions) page for the complete flag reference." -msgstr "ベースラインのセクションは、`bca check` と同じ `--baseline` / `bca.toml` の `[check] baseline` ソース(またはデフォルトの `.bca-baseline.toml`)を読み取ります。ベースライン化された違反だけを列挙するには `--baseline-only` を、PR コメント用には `--format markdown` を、ダッシュボード用には `--format json` を使います。PR レビュー時には、前述の `bca diff-baseline ` と組み合わせてください。diff はベースラインで何が「変わった」かを示し、`bca exemptions` は現在の除外面の全体を示します。完全なフラグリファレンスは[抑制マーカー](../commands/suppression.md#auditing-exemptions-bca-exemptions)のページを参照してください。" +"_changed_ in the baseline, `bca exemptions` shows the full current " +"exemption surface. See the [Suppression markers](../commands/suppression." +"md#auditing-exemptions-bca-exemptions) page for the complete flag reference." +msgstr "" +"ベースラインのセクションは、`bca check` と同じ `--baseline` / `bca.toml` の " +"`[check] baseline` ソース(またはデフォルトの `.bca-baseline.toml`)を読み取" +"ります。ベースライン化された違反だけを列挙するには `--baseline-only` を、PR " +"コメント用には `--format markdown` を、ダッシュボード用には `--format json` " +"を使います。PR レビュー時には、前述の `bca diff-baseline ` と組み" +"合わせてください。diff はベースラインで何が「変わった」かを示し、`bca " +"exemptions` は現在の除外面の全体を示します。完全なフラグリファレンスは[抑制" +"マーカー](../commands/suppression.md#auditing-exemptions-bca-exemptions)の" +"ページを参照してください。" #: src/recipes/baselines.md:370 msgid "" @@ -15591,11 +16138,11 @@ msgid "" "their recorded lines, neither disambiguates and the violations surface as " "`[new]`. Refresh with `--write-baseline`, or raise the tolerance." msgstr "" -"**あいまいなシンボル。** 2 つの関数が修飾シンボルを共有し(アナライザが異なる" -"コンテナを解決できなかった、または言語がオーバーロードを許している)、かつ両" -"方が記録された行から `--baseline-line-tolerance` を超えてずれている場合、どち" -"らも判別できず、違反は `[new]` として現れます。`--write-baseline` で更新する" -"か、トレランスを引き上げてください。" +"**あいまいなシンボル。** 2 つの関数が修飾シンボルを共有し(アナライザが異な" +"るコンテナを解決できなかった、または言語がオーバーロードを許している)、かつ" +"両方が記録された行から `--baseline-line-tolerance` を超えてずれている場合、" +"どちらも判別できず、違反は `[new]` として現れます。`--write-baseline` で更新" +"するか、トレランスを引き上げてください。" #: src/recipes/baselines.md:376 msgid "" @@ -15603,9 +16150,9 @@ msgid "" "their synthetic symbol embeds the line (see [How matching works](#how-" "matching-works))." msgstr "" -"**匿名関数。** クロージャとラムダは、その合成シンボルに行番号が埋め込まれてい" -"るため、移動すると再キー化されます([マッチングの仕組み](#how-matching-works)" -"を参照)。" +"**匿名関数。** クロージャとラムダは、その合成シンボルに行番号が埋め込まれて" +"いるため、移動すると再キー化されます([マッチングの仕組み](#how-matching-" +"works)を参照)。" #: src/recipes/baselines.md:379 msgid "" @@ -15621,15 +16168,15 @@ msgstr "" #: src/recipes/baselines.md:383 msgid "" -"**Tightening a threshold.** Lowering a limit may newly expose functions that " -"were previously clean. They will not be in the baseline → CI will fail. This " -"is correct — tightening should expose new offenders. Refresh the baseline if " -"the team chooses to absorb the new entries." +"**Tightening a threshold.** Lowering a limit may newly expose functions " +"that were previously clean. They will not be in the baseline → CI will " +"fail. This is correct — tightening should expose new offenders. Refresh the " +"baseline if the team chooses to absorb the new entries." msgstr "" -"**しきい値の引き締め。** 制限を下げると、これまでクリーンだった関数が新たに露" -"出することがあります。それらはベースラインに含まれないため、CI は失敗します。" -"これは正しい挙動です — 引き締めは新しい違反を露出させるべきです。チームが新し" -"いエントリを吸収すると決めた場合は、ベースラインを更新してください。" +"**しきい値の引き締め。** 制限を下げると、これまでクリーンだった関数が新たに" +"露出することがあります。それらはベースラインに含まれないため、CI は失敗しま" +"す。これは正しい挙動です — 引き締めは新しい違反を露出させるべきです。チーム" +"が新しいエントリを吸収すると決めた場合は、ベースラインを更新してください。" #: src/recipes/local-gates.md:3 msgid "" @@ -15638,18 +16185,18 @@ msgid "" "fires red on a pull request, the offending change has already been pushed, " "the author has context-switched, and someone has to revisit the diff to " "nudge a metric back under its limit. A local threshold gate moves that " -"feedback to the moment of `git commit` — the same moment `cargo fmt --check` " -"and `cargo clippy -- -D warnings` already fire — so the regression never " -"makes it past the developer's keyboard." +"feedback to the moment of `git commit` — the same moment `cargo fmt --" +"check` and `cargo clippy -- -D warnings` already fire — so the regression " +"never makes it past the developer's keyboard." msgstr "" "CI は最後の防衛線であり、最初の防衛線ではありません。`bca check`(リポジトリ" "ルートの `bca.toml` マニフェストとその `.bca-baseline.toml` を読み取る)がプ" "ルリクエストで赤く点灯する頃には、問題のある変更はすでにプッシュされ、作者は" "コンテキストを切り替えており、誰かが diff を見直してメトリクスを制限内に押し" "戻さなければなりません。ローカルのしきい値ゲートは、そのフィードバックを " -"`git commit` の瞬間 — `cargo fmt --check` と `cargo clippy -- -D warnings` が" -"すでに発火するのと同じ瞬間 — に移すため、リグレッションが開発者のキーボードを" -"越えることはありません。" +"`git commit` の瞬間 — `cargo fmt --check` と `cargo clippy -- -D warnings` " +"がすでに発火するのと同じ瞬間 — に移すため、リグレッションが開発者のキーボー" +"ドを越えることはありません。" #: src/recipes/local-gates.md:14 msgid "" @@ -15667,9 +16214,9 @@ msgstr "" "code-analysis/blob/main/Makefile)。統合された [`bca.toml`](https://github." "com/dekobon/big-code-analysis/blob/main/bca.toml) マニフェストに支えられてい" "ます)を捉え、あなたのリポジトリの `Makefile`、`justfile`、`package.json` ス" -"クリプト、`pre-commit` 設定にそのまま入れられる形に蒸留したものです。根底にあ" -"る考え方はプロバイダ中立です。どのしきい値チェッカー(`bca`、ESLint、clippy、" -"SonarLint、Qodana)でも同じ方法で組み込めます。" +"クリプト、`pre-commit` 設定にそのまま入れられる形に蒸留したものです。根底に" +"ある考え方はプロバイダ中立です。どのしきい値チェッカー(`bca`、ESLint、" +"clippy、SonarLint、Qodana)でも同じ方法で組み込めます。" #: src/recipes/local-gates.md:23 msgid "Principles" @@ -15679,29 +16226,30 @@ msgstr "原則" msgid "" "Three principles drive the design. They are not specific to `bca`; they are " "the same conclusions Sonar reached when it pivoted its default Quality Gate " -"to focus on [new code](https://docs.sonarsource.com/sonarqube-server/quality-" -"standards-administration/managing-quality-gates/introduction-to-quality-" -"gates) and that the broader ratchet pattern formalises." +"to focus on [new code](https://docs.sonarsource.com/sonarqube-server/" +"quality-standards-administration/managing-quality-gates/introduction-to-" +"quality-gates) and that the broader ratchet pattern formalises." msgstr "" "設計を駆動するのは 3 つの原則です。これらは `bca` に固有のものではありませ" "ん。Sonar がデフォルトの品質ゲートを[新しいコード](https://docs.sonarsource." -"com/sonarqube-server/quality-standards-administration/managing-quality-gates/" -"introduction-to-quality-gates)に焦点を当てる方向へ転換したときに到達したのと" -"同じ結論であり、より広いラチェットパターンが定式化しているものです。" +"com/sonarqube-server/quality-standards-administration/managing-quality-" +"gates/introduction-to-quality-gates)に焦点を当てる方向へ転換したときに到達し" +"たのと同じ結論であり、より広いラチェットパターンが定式化しているものです。" #: src/recipes/local-gates.md:31 msgid "" -"**Gate locally, mirror CI exactly.** The local gate must run the same binary " -"with the same arguments and the same threshold / baseline / exclude files as " -"CI. If the local gate is \"almost what CI runs\", it stops catching " -"regressions the moment one diverges from the other. The cost of running the " -"gate once before pushing is cheap; the cost of a red PR-bot ping is not." +"**Gate locally, mirror CI exactly.** The local gate must run the same " +"binary with the same arguments and the same threshold / baseline / exclude " +"files as CI. If the local gate is \"almost what CI runs\", it stops " +"catching regressions the moment one diverges from the other. The cost of " +"running the gate once before pushing is cheap; the cost of a red PR-bot " +"ping is not." msgstr "" -"**ローカルでゲートし、CI を正確にミラーする。** ローカルゲートは、CI と同じバ" -"イナリを、同じ引数、同じしきい値 / ベースライン / 除外ファイルで実行しなけれ" -"ばなりません。ローカルゲートが「CI の実行内容とほぼ同じ」では、両者が乖離した" -"瞬間にリグレッションを捕捉できなくなります。プッシュ前にゲートを一度実行する" -"コストは安く、PR ボットの赤い通知のコストは安くありません。" +"**ローカルでゲートし、CI を正確にミラーする。** ローカルゲートは、CI と同じ" +"バイナリを、同じ引数、同じしきい値 / ベースライン / 除外ファイルで実行しなけ" +"ればなりません。ローカルゲートが「CI の実行内容とほぼ同じ」では、両者が乖離" +"した瞬間にリグレッションを捕捉できなくなります。プッシュ前にゲートを一度実行" +"するコストは安く、PR ボットの赤い通知のコストは安くありません。" #: src/recipes/local-gates.md:37 msgid "" @@ -15713,20 +16261,36 @@ msgid "" "strict TypeScript or strict clippy lints without a months-long boil-the-" "ocean pass. See the [Baselines recipe](baselines.md) for the bootstrap → CI " "→ refresh → retire flow." -msgstr "**ラチェットせよ、リセットするな。** 既存のコードベースにしきい値を導入すると、「どんな」妥当な制限でも数十の既存関数で発火します。現実的な導入経路は「今日の違反をベースラインファイルに吸収し、新規または悪化したものだけを失敗させ、ベースラインを時間をかけて縮小する」です。これは、長年運用されてきたコードベースが数か月がかりの全面改修なしに strict TypeScript や厳格な clippy リントを導入できるのと同じ戦略です。ブートストラップ → CI → 更新 → 退役の流れは[ベースラインのレシピ](baselines.md)を参照してください。" +msgstr "" +"**ラチェットせよ、リセットするな。** 既存のコードベースにしきい値を導入する" +"と、「どんな」妥当な制限でも数十の既存関数で発火します。現実的な導入経路は" +"「今日の違反をベースラインファイルに吸収し、新規または悪化したものだけを失敗" +"させ、ベースラインを時間をかけて縮小する」です。これは、長年運用されてきた" +"コードベースが数か月がかりの全面改修なしに strict TypeScript や厳格な " +"clippy リントを導入できるのと同じ戦略です。ブートストラップ → CI → 更新 → 退" +"役の流れは[ベースラインのレシピ](baselines.md)を参照してください。" #: src/recipes/local-gates.md:46 msgid "" -"**Warn before you fail.** A hard 100% gate fails _at_ the limit and gives no " -"signal as a function creeps from 80% to 95% to 99% of its threshold. A " -"second, looser tier that fires at e.g. 95% of every limit gives a one-or-two-" -"commit early warning. The author still has the file open, the test cases in " -"their head, and the freedom to refactor before the offender hardens into " -"\"well, it's in main now\". Sonar's \"new code\" Quality Gate, the GCC `-" -"Wall` / `-Werror` split, and clippy's `warn` vs. `deny` lint levels all " -"encode the same insight: a tier between _clean_ and _broken_ is where teams " -"actually catch drift." -msgstr "**失敗させる前に警告する。** 100% のハードゲートは制限「ちょうど」で失敗し、関数がしきい値の 80% から 95%、99% へと忍び寄る間は何の信号も出しません。たとえば各制限の 95% で発火する、より緩い第 2 のティアがあれば、1〜2 コミット分の早期警告になります。作者はまだファイルを開いており、テストケースが頭に入っており、違反が「まあ、もう main に入ってるし」として固定化する前にリファクタリングする自由があります。Sonar の「新しいコード」品質ゲート、GCC の `-Wall` / `-Werror` の分離、clippy の `warn` と `deny` のリントレベルは、いずれも同じ洞察を体現しています。「クリーン」と「壊れている」の間のティアこそ、チームが実際にドリフトを捕捉する場所です。" +"**Warn before you fail.** A hard 100% gate fails _at_ the limit and gives " +"no signal as a function creeps from 80% to 95% to 99% of its threshold. A " +"second, looser tier that fires at e.g. 95% of every limit gives a one-or-" +"two-commit early warning. The author still has the file open, the test " +"cases in their head, and the freedom to refactor before the offender " +"hardens into \"well, it's in main now\". Sonar's \"new code\" Quality Gate, " +"the GCC `-Wall` / `-Werror` split, and clippy's `warn` vs. `deny` lint " +"levels all encode the same insight: a tier between _clean_ and _broken_ is " +"where teams actually catch drift." +msgstr "" +"**失敗させる前に警告する。** 100% のハードゲートは制限「ちょうど」で失敗し、" +"関数がしきい値の 80% から 95%、99% へと忍び寄る間は何の信号も出しません。た" +"とえば各制限の 95% で発火する、より緩い第 2 のティアがあれば、1〜2 コミット" +"分の早期警告になります。作者はまだファイルを開いており、テストケースが頭に" +"入っており、違反が「まあ、もう main に入ってるし」として固定化する前にリファ" +"クタリングする自由があります。Sonar の「新しいコード」品質ゲート、GCC の `-" +"Wall` / `-Werror` の分離、clippy の `warn` と `deny` のリントレベルは、いず" +"れも同じ洞察を体現しています。「クリーン」と「壊れている」の間のティアこそ、" +"チームが実際にドリフトを捕捉する場所です。" #: src/recipes/local-gates.md:57 msgid "The two tiers" @@ -15737,8 +16301,8 @@ msgid "" "The pattern is two recipes wrapping the same checker, plus two recipes for " "refreshing the baseline at each tier." msgstr "" -"このパターンは、同じチェッカーをラップする 2 つのレシピと、各ティアでベースラ" -"インを更新するための 2 つのレシピから成ります。" +"このパターンは、同じチェッカーをラップする 2 つのレシピと、各ティアでベース" +"ラインを更新するための 2 つのレシピから成ります。" #: src/recipes/local-gates.md:62 msgid "Target" @@ -15815,13 +16379,13 @@ msgstr "バンドの導入時や拡大時にソフトティアの違反を吸収 #: src/recipes/local-gates.md:69 msgid "" "The hard tier and the soft tier consume the **same** `[thresholds]` table " -"and the **same** `.bca-baseline.toml`. The only difference between them is a " -"scalar multiplier applied to every threshold value before `bca check` sees " -"it." +"and the **same** `.bca-baseline.toml`. The only difference between them is " +"a scalar multiplier applied to every threshold value before `bca check` " +"sees it." msgstr "" -"ハードティアとソフトティアは**同じ** `[thresholds]` テーブルと**同じ** `.bca-" -"baseline.toml` を消費します。両者の唯一の違いは、`bca check` に渡る前にすべて" -"のしきい値に適用されるスカラー乗数です。" +"ハードティアとソフトティアは**同じ** `[thresholds]` テーブルと**同じ** `." +"bca-baseline.toml` を消費します。両者の唯一の違いは、`bca check` に渡る前に" +"すべてのしきい値に適用されるスカラー乗数です。" #: src/recipes/local-gates.md:74 msgid "" @@ -15829,11 +16393,19 @@ msgid "" "headroom`). A v5 baseline records the tier and headroom it was written " "against in a `[provenance]` table, and `bca check` warns when the current " "run is _stricter_ than the baseline was written for. A soft-`0.95` baseline " -"is a superset of the hard gate's offenders, so the hard `self-scan` reads it " -"silently; writing the baseline at the hard tier instead would make the soft " -"`self-scan-headroom` warn that it is the stricter gate. See [Tier/headroom " -"provenance](./baselines.md#tierheadroom-provenance)." -msgstr "共有ベースラインは**ソフト**ティア(`self-scan-write-baseline-headroom`)で書き込みます。v5 のベースラインは、書き込み時のティアとヘッドルームを `[provenance]` テーブルに記録し、`bca check` は現在の実行がベースライン書き込み時よりも「厳しい」場合に警告します。ソフト `0.95` のベースラインはハードゲートの違反の上位集合なので、ハードの `self-scan` はそれを黙って読みます。逆にハードティアでベースラインを書くと、ソフトの `self-scan-headroom` が自分のほうが厳しいゲートだと警告するようになります。[ティア/ヘッドルームの来歴](./baselines.md#tierheadroom-provenance)を参照してください。" +"is a superset of the hard gate's offenders, so the hard `self-scan` reads " +"it silently; writing the baseline at the hard tier instead would make the " +"soft `self-scan-headroom` warn that it is the stricter gate. See [Tier/" +"headroom provenance](./baselines.md#tierheadroom-provenance)." +msgstr "" +"共有ベースラインは**ソフト**ティア(`self-scan-write-baseline-headroom`)で" +"書き込みます。v5 のベースラインは、書き込み時のティアとヘッドルームを " +"`[provenance]` テーブルに記録し、`bca check` は現在の実行がベースライン書き" +"込み時よりも「厳しい」場合に警告します。ソフト `0.95` のベースラインはハード" +"ゲートの違反の上位集合なので、ハードの `self-scan` はそれを黙って読みます。" +"逆にハードティアでベースラインを書くと、ソフトの `self-scan-headroom` が自分" +"のほうが厳しいゲートだと警告するようになります。[ティア/ヘッドルームの来歴]" +"(./baselines.md#tierheadroom-provenance)を参照してください。" #: src/recipes/local-gates.md:84 msgid "" @@ -15843,9 +16415,9 @@ msgid "" "with the hard config the first time anyone forgets to update both files." msgstr "" "これは重要です。ソフトティアをより厳しくしたい(侵食をより早い段階で捕捉した" -"い)貢献者は、環境変数を 1 つ変えるだけで済み、誰かが両方のファイルの更新を忘" -"れた瞬間にハード設定から乖離していく並行のソフトしきい値ファイルを維持する必" -"要がない、ということです。" +"い)貢献者は、環境変数を 1 つ変えるだけで済み、誰かが両方のファイルの更新を" +"忘れた瞬間にハード設定から乖離していく並行のソフトしきい値ファイルを維持する" +"必要がない、ということです。" #: src/recipes/local-gates.md:90 msgid "Two-tier thresholds" @@ -15884,8 +16456,8 @@ msgid "" "scaling)." msgstr "" "それ以外の場合、すべての制限をソフト `RATIO` でスケールします(引数なしの " -"`soft` のデフォルトは `0.95` で、`--tier=soft` が黙って何もしないことはありま" -"せん。`soft=1.0` はスケーリングを無効にします)。" +"`soft` のデフォルトは `0.95` で、`--tier=soft` が黙って何もしないことはあり" +"ません。`soft=1.0` はスケーリングを無効にします)。" #: src/recipes/local-gates.md:106 msgid "" @@ -15895,27 +16467,35 @@ msgid "" "recorded next to the hard limit instead of buried in a runtime multiplier:" msgstr "" "引数なしの `--tier=soft`(比率 `0.95`)が設定なしの入り口です。`[thresholds." -"soft]` テーブルは、成熟したプロジェクトが育っていく先の設定面です。メトリクス" -"ごとに異なるソフトバンドを表現でき、そのバンドを実行時の乗数に埋もれさせず、" -"ハード制限のすぐ隣に記録できるからです:" +"soft]` テーブルは、成熟したプロジェクトが育っていく先の設定面です。メトリク" +"スごとに異なるソフトバンドを表現でき、そのバンドを実行時の乗数に埋もれさせ" +"ず、ハード制限のすぐ隣に記録できるからです:" #: src/recipes/local-gates.md:124 msgid "" -"Soft limits with **integer** types read more cleanly as absolute values than " -"as float-scaled ones: prefer `nargs = 6` (for a hard `nargs = 7`) over the " -"`0.95 × 7 = 6.65` a scalar would produce. Use the `\"x\"` form for " -"the large-valued metrics (`halstead.*`, `loc.*`) where an exact integer soft " -"limit is fussy to pick. The scale factor must be in `(0, 1]` — the soft tier " -"is an early-warning band that fires _before_ the hard gate, never looser " -"than it." -msgstr "**整数**型のソフト制限は、浮動小数でスケールした値よりも絶対値として書くほうが明快に読めます。スカラーが生む `0.95 × 7 = 6.65` よりも、(ハードの `nargs = 7` に対して)`nargs = 6` を優先してください。正確な整数のソフト制限を選びにくい大きな値のメトリクス(`halstead.*`、`loc.*`)には `\"x\"` 形式を使います。スケール係数は `(0, 1]` の範囲でなければなりません — ソフトティアはハードゲートの「前に」発火する早期警告バンドであり、ハードゲートより緩くなることは決してありません。" +"Soft limits with **integer** types read more cleanly as absolute values " +"than as float-scaled ones: prefer `nargs = 6` (for a hard `nargs = 7`) over " +"the `0.95 × 7 = 6.65` a scalar would produce. Use the `\"x\"` form " +"for the large-valued metrics (`halstead.*`, `loc.*`) where an exact integer " +"soft limit is fussy to pick. The scale factor must be in `(0, 1]` — the " +"soft tier is an early-warning band that fires _before_ the hard gate, never " +"looser than it." +msgstr "" +"**整数**型のソフト制限は、浮動小数でスケールした値よりも絶対値として書くほう" +"が明快に読めます。スカラーが生む `0.95 × 7 = 6.65` よりも、(ハードの " +"`nargs = 7` に対して)`nargs = 6` を優先してください。正確な整数のソフト制限" +"を選びにくい大きな値のメトリクス(`halstead.*`、`loc.*`)には " +"`\"x\"` 形式を使います。スケール係数は `(0, 1]` の範囲でなければなり" +"ません — ソフトティアはハードゲートの「前に」発火する早期警告バンドであり、" +"ハードゲートより緩くなることは決してありません。" #: src/recipes/local-gates.md:132 msgid "" "Both tiers ratchet through the **same** `.bca-baseline.toml` (no separate " -"soft baseline file). `bca check --print-effective-config --tier=soft` prints " -"the resolved limits — paste its `[thresholds]` output into `[thresholds." -"soft]` to migrate from a blanket-ratio band to explicit per-metric limits." +"soft baseline file). `bca check --print-effective-config --tier=soft` " +"prints the resolved limits — paste its `[thresholds]` output into " +"`[thresholds.soft]` to migrate from a blanket-ratio band to explicit per-" +"metric limits." msgstr "" "両ティアは**同じ** `.bca-baseline.toml` を通じてラチェットします(別個のソフ" "トベースラインファイルはありません)。`bca check --print-effective-config --" @@ -15930,8 +16510,8 @@ msgstr "ゼロコンフィグ: `bca.toml` マニフェスト" #: src/recipes/local-gates.md:140 msgid "" "Rather than thread `--paths`, `--exclude-from`, `--jobs`, `--config`, `--" -"baseline`, and `--tier=soft=` through every recipe, drop a `bca.toml` " -"at the repo root and let `bca check` discover it:" +"baseline`, and `--tier=soft=` through every recipe, drop a `bca." +"toml` at the repo root and let `bca check` discover it:" msgstr "" "すべてのレシピに `--paths`、`--exclude-from`、`--jobs`、`--config`、`--" "baseline`、`--tier=soft=` を渡して回る代わりに、リポジトリルートに " @@ -15988,15 +16568,16 @@ msgid "" "you chose next to the hard limit instead of leaving it to a runtime " "multiplier." msgstr "" -"`headroom` キーは**ソフトティアのスケール比率**です。`--tier=soft` の下でのみ" -"効果を持つため、引数なしの `bca check`(ハードティア)は `headroom` キーの有" -"無にかかわらず正確な CI ミラーのままです。メトリクスごとのソフト制限には、ス" -"カラーよりも `[thresholds.soft]` テーブル(後述)を優先してください。選んだバ" -"ンドを実行時の乗数に委ねるのではなく、ハード制限の隣に記録できます。" +"`headroom` キーは**ソフトティアのスケール比率**です。`--tier=soft` の下での" +"み効果を持つため、引数なしの `bca check`(ハードティア)は `headroom` キーの" +"有無にかかわらず正確な CI ミラーのままです。メトリクスごとのソフト制限には、" +"スカラーよりも `[thresholds.soft]` テーブル(後述)を優先してください。選ん" +"だバンドを実行時の乗数に委ねるのではなく、ハード制限の隣に記録できます。" #: src/recipes/local-gates.md:172 msgid "With that file in place the four recipes collapse to one flag each:" -msgstr "このファイルを置けば、4 つのレシピはそれぞれフラグ 1 つに集約されます:" +msgstr "" +"このファイルを置けば、4 つのレシピはそれぞれフラグ 1 つに集約されます:" #: src/recipes/local-gates.md:187 msgid "soft=0.95 --write-baseline" @@ -16010,18 +16591,18 @@ msgstr "発見と優先順位" msgid "" "`bca` climbs from the working directory to the repo root (the directory " "containing `.git`) looking for `bca.toml`; the first match wins. Relative " -"paths inside the manifest resolve against the manifest's own directory, so a " -"`bca.toml` above the current directory still points at the right files." +"paths inside the manifest resolve against the manifest's own directory, so " +"a `bca.toml` above the current directory still points at the right files." msgstr "" -"`bca` は作業ディレクトリからリポジトリルート(`.git` を含むディレクトリ)まで" -"遡って `bca.toml` を探し、最初に見つかったものが使われます。マニフェスト内の" -"相対パスはマニフェスト自身のディレクトリを基準に解決されるため、現在のディレ" -"クトリより上にある `bca.toml` でも正しいファイルを指します。" +"`bca` は作業ディレクトリからリポジトリルート(`.git` を含むディレクトリ)ま" +"で遡って `bca.toml` を探し、最初に見つかったものが使われます。マニフェスト内" +"の相対パスはマニフェスト自身のディレクトリを基準に解決されるため、現在のディ" +"レクトリより上にある `bca.toml` でも正しいファイルを指します。" #: src/recipes/local-gates.md:199 msgid "" -"**Scalars and positive scope keys: CLI wins.** Any explicit `--baseline`, `--" -"tier`, `--jobs`, etc. overrides the corresponding manifest key, and the " +"**Scalars and positive scope keys: CLI wins.** Any explicit `--baseline`, " +"`--tier`, `--jobs`, etc. overrides the corresponding manifest key, and the " "_positive scope_ list keys (`paths`, `include`) are **replaced** by any " "explicit CLI value (`bca check one.rs` with manifest `paths = [\"src\"]` " "checks just `one.rs`). `--config ` _merges_ on top of the manifest " @@ -16031,32 +16612,54 @@ msgid "" "(`[thresholds.soft]` or the soft `RATIO` scaling, only under `--tier=soft`) " "→ `--threshold` overrides — is shared across all of `--config` / `--tier` / " "the manifest." -msgstr "**スカラーと肯定的スコープキー: CLI が勝ちます。** 明示的な `--baseline`、`--tier`、`--jobs` などは対応するマニフェストキーを上書きし、「肯定的スコープ」のリストキー(`paths`、`include`)は明示的な CLI 値によって*「置き換え」*られます(マニフェストに `paths = [\"src\"]` があっても `bca check one.rs` は `one.rs` だけをチェックします)。`--config ` はマニフェストの `[thresholds]` テーブルの上に「マージ」され(衝突時は config のキーが勝ちます)、繰り返し指定した `--threshold name=value` フラグは絶対制限として最後に適用されます。完全な解決順序 — `[thresholds]` → `--config` → ティア解決(`[thresholds.soft]` またはソフト `RATIO` スケーリング。`--tier=soft` の下でのみ) → `--threshold` オーバーライド — は `--config` / `--tier` / マニフェストのすべてに共通です。" +msgstr "" +"**スカラーと肯定的スコープキー: CLI が勝ちます。** 明示的な `--baseline`、" +"`--tier`、`--jobs` などは対応するマニフェストキーを上書きし、「肯定的スコー" +"プ」のリストキー(`paths`、`include`)は明示的な CLI 値によって*「置き換え」" +"*られます(マニフェストに `paths = [\"src\"]` があっても `bca check one.rs` " +"は `one.rs` だけをチェックします)。`--config ` はマニフェストの " +"`[thresholds]` テーブルの上に「マージ」され(衝突時は config のキーが勝ちま" +"す)、繰り返し指定した `--threshold name=value` フラグは絶対制限として最後に" +"適用されます。完全な解決順序 — `[thresholds]` → `--config` → ティア解決" +"(`[thresholds.soft]` またはソフト `RATIO` スケーリング。`--tier=soft` の下" +"でのみ) → `--threshold` オーバーライド — は `--config` / `--tier` / マニ" +"フェストのすべてに共通です。" #: src/recipes/local-gates.md:211 msgid "" "**Negative filter keys: CLI unions with the manifest.** The _exclude_ list " "keys (top-level `exclude`, `[check] exclude`) are **merged**, not replaced: " -"a CLI `--exclude` / `--check-exclude` is _added to_ the manifest's deny-set. " -"This way a command-line filter can never silently un-exclude a directory the " -"project config deliberately skipped (e.g. `vendor/`). Duplicates across the " -"two sources collapse; CLI patterns sort first. This mirrors ruff/ESLint's " -"`exclude` (replace) vs `extend-exclude` (add), generalized: **targets " -"replace, filters add.** As always, `--x` and `--x-from` union with each " -"other regardless. Reach for `--no-config` when you need the manifest " -"excludes gone entirely." -msgstr "**否定的フィルタキー: CLI はマニフェストと合併します。** 「除外」のリストキー(トップレベルの `exclude`、`[check] exclude`)は置き換えではなく*「マージ」*されます。CLI の `--exclude` / `--check-exclude` はマニフェストの拒否セットに「追加」されます。こうすることで、プロジェクト設定が意図的にスキップしたディレクトリ(例: `vendor/`)を、コマンドラインのフィルタが黙って除外解除することは決してありません。2 つのソースにまたがる重複は畳み込まれ、CLI のパターンが先にソートされます。これは ruff/ESLint の `exclude`(置換)と `extend-exclude`(追加)の一般化です。**ターゲットは置き換え、フィルタは追加。** 従来どおり、`--x` と `--x-from` は常に互いに合併します。マニフェストの除外を完全に消したい場合は `--no-config` を使ってください。" +"a CLI `--exclude` / `--check-exclude` is _added to_ the manifest's deny-" +"set. This way a command-line filter can never silently un-exclude a " +"directory the project config deliberately skipped (e.g. `vendor/`). " +"Duplicates across the two sources collapse; CLI patterns sort first. This " +"mirrors ruff/ESLint's `exclude` (replace) vs `extend-exclude` (add), " +"generalized: **targets replace, filters add.** As always, `--x` and `--x-" +"from` union with each other regardless. Reach for `--no-config` when you " +"need the manifest excludes gone entirely." +msgstr "" +"**否定的フィルタキー: CLI はマニフェストと合併します。** 「除外」のリスト" +"キー(トップレベルの `exclude`、`[check] exclude`)は置き換えではなく*「マー" +"ジ」*されます。CLI の `--exclude` / `--check-exclude` はマニフェストの拒否" +"セットに「追加」されます。こうすることで、プロジェクト設定が意図的にスキップ" +"したディレクトリ(例: `vendor/`)を、コマンドラインのフィルタが黙って除外解" +"除することは決してありません。2 つのソースにまたがる重複は畳み込まれ、CLI の" +"パターンが先にソートされます。これは ruff/ESLint の `exclude`(置換)と " +"`extend-exclude`(追加)の一般化です。**ターゲットは置き換え、フィルタは追" +"加。** 従来どおり、`--x` と `--x-from` は常に互いに合併します。マニフェスト" +"の除外を完全に消したい場合は `--no-config` を使ってください。" #: src/recipes/local-gates.md:222 msgid "" "`--no-config` skips discovery entirely, for reproducible fully-explicit " -"invocations that must not pick up repo-level config. `bca init` also ignores " -"any existing manifest — it scaffolds config rather than consuming it." +"invocations that must not pick up repo-level config. `bca init` also " +"ignores any existing manifest — it scaffolds config rather than consuming " +"it." msgstr "" "`--no-config` は発見を完全にスキップします。リポジトリレベルの設定を拾っては" -"ならない、再現可能で完全に明示的な呼び出しのためのものです。`bca init` も既存" -"のマニフェストを無視します — 設定を消費するのではなく、スキャフォールドするた" -"めです。" +"ならない、再現可能で完全に明示的な呼び出しのためのものです。`bca init` も既" +"存のマニフェストを無視します — 設定を消費するのではなく、スキャフォールドす" +"るためです。" #: src/recipes/local-gates.md:226 msgid "" @@ -16065,7 +16668,12 @@ msgid "" "at all_. They are distinct from the `[check] exclude` table (analysed-and-" "reported but ungated paths; see [Exempting whole file categories](../" "commands/check.md#exempting-whole-file-categories-checkexclude))." -msgstr "トップレベルの `include` / `exclude` キーは、どのファイルを「そもそも解析するか」を決めるグローバルなファイルフィルタのグロブ(`--include` / `--exclude` フラグ)です。これらは `[check] exclude` テーブル(解析され報告されるがゲートされないパス。[ファイルカテゴリ全体の除外](../commands/check.md#exempting-whole-file-categories-checkexclude)を参照)とは別物です。" +msgstr "" +"トップレベルの `include` / `exclude` キーは、どのファイルを「そもそも解析す" +"るか」を決めるグローバルなファイルフィルタのグロブ(`--include` / `--" +"exclude` フラグ)です。これらは `[check] exclude` テーブル(解析され報告され" +"るがゲートされないパス。[ファイルカテゴリ全体の除外](../commands/check." +"md#exempting-whole-file-categories-checkexclude)を参照)とは別物です。" #: src/recipes/local-gates.md:231 msgid "" @@ -16087,13 +16695,13 @@ msgstr "" "write-baseline`)からは除外されます。`exclude_from` は同じグロブを並べた `." "gitignore` 形式のファイルを指します(どちらも `--check-exclude` / `--check-" "exclude-from` フラグに対応します)。`exit_codes = \"tiered\"` はより細かい終" -"了コードにオプトインします(`--exit-codes=tiered` に対応。[終了コード](#exit-" -"codes)を参照)。`\"default\"`(暗黙の値)は安定した `0`/`1`/`2` の契約を維持" -"します。ベースラインとヘッドルームのキーもゲート専用なのでここに置かれます: " -"`baseline`(`bca check` が読み、引数なしの `--write-baseline` が書き込むファ" -"イル)、`baseline_line_tolerance`、`baseline_fuzzy_match`、そして `headroom`" -"(ソフトティアのスケール比率。`--tier=soft=` に対応)。いずれのキーも、ど" -"ちらの方向でも CLI の値がテーブルの値を上書きします。" +"了コードにオプトインします(`--exit-codes=tiered` に対応。[終了コード]" +"(#exit-codes)を参照)。`\"default\"`(暗黙の値)は安定した `0`/`1`/`2` の契" +"約を維持します。ベースラインとヘッドルームのキーもゲート専用なのでここに置か" +"れます: `baseline`(`bca check` が読み、引数なしの `--write-baseline` が書き" +"込むファイル)、`baseline_line_tolerance`、`baseline_fuzzy_match`、そして " +"`headroom`(ソフトティアのスケール比率。`--tier=soft=` に対応)。いずれの" +"キーも、どちらの方向でも CLI の値がテーブルの値を上書きします。" #: src/recipes/local-gates.md:244 msgid "" @@ -16103,11 +16711,12 @@ msgid "" "`baseline_line_tolerance`, `baseline_fuzzy_match`, and `headroom` under " "`[check]`. When a key is set in both places, the `[check]` value wins." msgstr "" -"これら 4 つのキーは以前トップレベルにありました。その綴りは**非推奨**(#599)" -"で、一度だけ警告が出ます。1 リリースサイクルの間は尊重され、その後の次のメ" -"ジャーバージョンで削除されます。`baseline`、`baseline_line_tolerance`、" -"`baseline_fuzzy_match`、`headroom` を `[check]` の下へ移してください。キーが" -"両方に設定されている場合は `[check]` の値が勝ちます。" +"これら 4 つのキーは以前トップレベルにありました。その綴りは**非推奨**" +"(#599)で、一度だけ警告が出ます。1 リリースサイクルの間は尊重され、その後の" +"次のメジャーバージョンで削除されます。`baseline`、" +"`baseline_line_tolerance`、`baseline_fuzzy_match`、`headroom` を `[check]` " +"の下へ移してください。キーが両方に設定されている場合は `[check]` の値が勝ち" +"ます。" #: src/recipes/local-gates.md:250 msgid "" @@ -16117,12 +16726,12 @@ msgid "" "scope key, an explicit `--file-types` CLI flag **replaces** it (see [`bca " "vcs` file-type scope](../commands/vcs.md#file-type-scope))." msgstr "" -"`[vcs]` テーブルは `bca vcs` の変更履歴ランキングのオプションを設定します。そ" -"の `file_types` キー(デフォルトの `\"metrics\"` / `\"all\"` / `\"rs,py\"` 形" -"式の拡張子リスト)は、どのファイルをランク付けするかを絞り込みます。肯定的ス" -"コープキーなので、明示的な `--file-types` CLI フラグはそれを*「置き換え」*ます" -"([`bca vcs` のファイルタイプスコープ](../commands/vcs.md#file-type-scope)を" -"参照)。" +"`[vcs]` テーブルは `bca vcs` の変更履歴ランキングのオプションを設定します。" +"その `file_types` キー(デフォルトの `\"metrics\"` / `\"all\"` / `\"rs," +"py\"` 形式の拡張子リスト)は、どのファイルをランク付けするかを絞り込みます。" +"肯定的スコープキーなので、明示的な `--file-types` CLI フラグはそれを*「置き" +"換え」*ます([`bca vcs` のファイルタイプスコープ](../commands/vcs.md#file-" +"type-scope)を参照)。" #: src/recipes/local-gates.md:255 msgid "" @@ -16136,19 +16745,19 @@ msgid "" msgstr "" "`cyclomatic_count_try` と `exclude_tests` は、`--cyclomatic-count-try` / `--" "exclude-tests` フラグに対応するウォーカー調整用のブール値です。" -"`exclude_tests = true` は、メトリクス計算の前に Rust のインラインテストのサブ" -"ツリー(`#[test]`、`#[cfg(test)]` など)を刈り取ります。どちらも Rust 専用" +"`exclude_tests = true` は、メトリクス計算の前に Rust のインラインテストのサ" +"ブツリー(`#[test]`、`#[cfg(test)]` など)を刈り取ります。どちらも Rust 専用" "で、他の文法では効果がありません。`--exclude-tests` は存在のみのフラグ" -"(`=false` 形式なし)なので、マニフェストキーは刈り取りを**オン**にすることし" -"かできません。CLI の `--exclude-tests` は勝ちますが、CLI が設定していないキー" -"をマニフェストがオフにすることはできません。" +"(`=false` 形式なし)なので、マニフェストキーは刈り取りを**オン**にすること" +"しかできません。CLI の `--exclude-tests` は勝ちますが、CLI が設定していない" +"キーをマニフェストがオフにすることはできません。" #: src/recipes/local-gates.md:263 msgid "" -"A `[thresholds.soft]` table sets per-metric soft-tier limits (consumed by `--" -"tier=soft`; see [Two-tier thresholds](#two-tier-thresholds)). Unrecognized " -"keys are ignored with a one-line warning, so you can pre-adopt forthcoming " -"schema additions without breaking older `bca` builds." +"A `[thresholds.soft]` table sets per-metric soft-tier limits (consumed by " +"`--tier=soft`; see [Two-tier thresholds](#two-tier-thresholds)). " +"Unrecognized keys are ignored with a one-line warning, so you can pre-adopt " +"forthcoming schema additions without breaking older `bca` builds." msgstr "" "`[thresholds.soft]` テーブルは、メトリクスごとのソフトティア制限を設定します" "(`--tier=soft` によって消費されます。[2 ティアのしきい値](#two-tier-" @@ -16170,10 +16779,11 @@ msgid "" "drop a file at the repo root, or when one CI job needs a different layout " "than the committed manifest (pair the flags with `--no-config`)." msgstr "" -"以下の明示フラグのスケルトンは引き続き完全にサポートされます — マニフェストは" -"同じフラグの糖衣であって、置き換えではありません。リポジトリルートにファイル" -"を置けない場合や、ある CI ジョブがコミット済みマニフェストと異なるレイアウト" -"を必要とする場合(フラグを `--no-config` と組み合わせます)に使ってください。" +"以下の明示フラグのスケルトンは引き続き完全にサポートされます — マニフェスト" +"は同じフラグの糖衣であって、置き換えではありません。リポジトリルートにファイ" +"ルを置けない場合や、ある CI ジョブがコミット済みマニフェストと異なるレイアウ" +"トを必要とする場合(フラグを `--no-config` と組み合わせます)に使ってくださ" +"い。" #: src/recipes/local-gates.md:278 msgid "Skeleton: GNU Make (explicit flags)" @@ -16184,14 +16794,14 @@ msgid "" "The four recipes below are a self-contained drop-in that thread every flag " "explicitly — the long form of the manifest recipe above. Adjust the `BCA` " "variable to point at whatever invocation gives you the checker (a pinned " -"release binary, `cargo run --release`, an npm / pip wrapper). Adjust `PATHS` " -"and `EXCLUDE_FROM` to match your layout." +"release binary, `cargo run --release`, an npm / pip wrapper). Adjust " +"`PATHS` and `EXCLUDE_FROM` to match your layout." msgstr "" -"以下の 4 つのレシピは、すべてのフラグを明示的に渡す自己完結のドロップインで、" -"上記のマニフェストレシピのロングフォームです。`BCA` 変数は、チェッカーを提供" -"する呼び出し(ピン留めしたリリースバイナリ、`cargo run --release`、npm / pip " -"のラッパー)を指すように調整してください。`PATHS` と `EXCLUDE_FROM` はあなた" -"のレイアウトに合わせて調整します。" +"以下の 4 つのレシピは、すべてのフラグを明示的に渡す自己完結のドロップイン" +"で、上記のマニフェストレシピのロングフォームです。`BCA` 変数は、チェッカーを" +"提供する呼び出し(ピン留めしたリリースバイナリ、`cargo run --release`、" +"npm / pip のラッパー)を指すように調整してください。`PATHS` と " +"`EXCLUDE_FROM` はあなたのレイアウトに合わせて調整します。" #: src/recipes/local-gates.md:290 msgid "" @@ -16242,7 +16852,8 @@ msgstr "# `--jobs` のデフォルトは OS が報告する実効 CPU 数" #: src/recipes/local-gates.md:308 msgid "# (cgroup-/cpuset-aware on Linux), so no `$(nproc)` plumbing is" -msgstr "# (Linux では cgroup / cpuset を考慮)なので、`$(nproc)` の引き回しは" +msgstr "" +"# (Linux では cgroup / cpuset を考慮)なので、`$(nproc)` の引き回しは" #: src/recipes/local-gates.md:312 msgid "--paths $(BCA_PATHS) --exclude-from $(BCA_EXCLUDE_FROM)" @@ -16276,50 +16887,51 @@ msgstr "" msgid "" "`bca check --tier=soft=` scales every limit from `--config` by the " "ratio (default `0.95` for a bare `--tier=soft`) before the offender " -"comparison, then filters against the same `.bca-baseline.toml` the hard tier " -"writes. Explicit `--threshold name=value` overrides are absolute and are not " -"rescaled. There is no separate helper script or second TOML file to maintain " -"— the soft tier is the hard-tier invocation plus one flag." +"comparison, then filters against the same `.bca-baseline.toml` the hard " +"tier writes. Explicit `--threshold name=value` overrides are absolute and " +"are not rescaled. There is no separate helper script or second TOML file to " +"maintain — the soft tier is the hard-tier invocation plus one flag." msgstr "" "`bca check --tier=soft=` は、違反判定の前に `--config` のすべての限度" "値を指定した比率(引数なしの `--tier=soft` ではデフォルトの `0.95`)でスケー" "リングし、その後、ハードティアが書き込むものと同じ `.bca-baseline.toml` に対" "してフィルタリングします。明示的な `--threshold name=value` による上書きは絶" -"対値で、再スケーリングされません。維持が必要な補助スクリプトや 2 つ目の TOML " -"ファイルはありません — ソフトティアは、ハードティアの呼び出しにフラグを 1 つ" -"追加しただけのものです。" +"対値で、再スケーリングされません。維持が必要な補助スクリプトや 2 つ目の " +"TOML ファイルはありません — ソフトティアは、ハードティアの呼び出しにフラグ" +"を 1 つ追加しただけのものです。" #: src/recipes/local-gates.md:368 msgid "" -"The gate exit codes propagate verbatim from `bca check`: **`0` clean, `2` on " -"any threshold violation (hard or soft), `1` on tool error**. The soft tier " -"is a real gate — never wrap `make self-scan-headroom` in `|| true` thinking " -"it's advisory; the non-zero exit is the whole point of the encroachment band." +"The gate exit codes propagate verbatim from `bca check`: **`0` clean, `2` " +"on any threshold violation (hard or soft), `1` on tool error**. The soft " +"tier is a real gate — never wrap `make self-scan-headroom` in `|| true` " +"thinking it's advisory; the non-zero exit is the whole point of the " +"encroachment band." msgstr "" "ゲートの終了コードは `bca check` からそのまま伝播します。**`0` はクリーン、" "`2` はしきい値違反(ハード・ソフトを問わず)、`1` はツールエラー**です。ソフ" "トティアは本物のゲートです — 助言的なものだと考えて `make self-scan-" -"headroom` を `|| true` でラップしてはいけません。非ゼロの終了コードこそが、こ" -"の接近警告バンドの眼目です。" +"headroom` を `|| true` でラップしてはいけません。非ゼロの終了コードこそが、" +"この接近警告バンドの眼目です。" #: src/recipes/local-gates.md:374 msgid "" "Pass `--exit-codes=tiered` (or set `[check] exit_codes = \"tiered\"`) to " -"split the single violation code `2` by severity: `2` new offenders only, `3` " -"regressions only, `4` both, `5` a `--tier=soft` violation that also breaches " -"the hard limit. The tiered codes are opt-in; the default stays `0`/`1`/`2`, " -"and every fail-state remains non-zero. Use them when CI needs to route \"a " -"new offender appeared\" differently from \"a baselined offender got worse\" " -"without parsing the `[new]` / `[regr +N%]` stderr tags." -msgstr "" -"`--exit-codes=tiered` を渡す(または `[check] exit_codes = \"tiered\"` を設定" -"する)と、単一の違反コード `2` が重大度別に分割されます。`2` は新規の違反の" -"み、`3` はリグレッションのみ、`4` は両方、`5` は `--tier=soft` の違反がハード" -"限度も超えている場合です。段階化されたコードはオプトインで、デフォルトは `0`/" -"`1`/`2` のまま、すべての失敗状態は非ゼロのままです。stderr の `[new]` / " -"`[regr +N%]` タグをパースせずに、CI で「新しい違反が現れた」と「ベースライン" -"化済みの違反が悪化した」を別々にルーティングする必要がある場合に使ってくださ" -"い。" +"split the single violation code `2` by severity: `2` new offenders only, " +"`3` regressions only, `4` both, `5` a `--tier=soft` violation that also " +"breaches the hard limit. The tiered codes are opt-in; the default stays `0`/" +"`1`/`2`, and every fail-state remains non-zero. Use them when CI needs to " +"route \"a new offender appeared\" differently from \"a baselined offender " +"got worse\" without parsing the `[new]` / `[regr +N%]` stderr tags." +msgstr "" +"`--exit-codes=tiered` を渡す(または `[check] exit_codes = \"tiered\"` を設" +"定する)と、単一の違反コード `2` が重大度別に分割されます。`2` は新規の違反" +"のみ、`3` はリグレッションのみ、`4` は両方、`5` は `--tier=soft` の違反が" +"ハード限度も超えている場合です。段階化されたコードはオプトインで、デフォルト" +"は `0`/`1`/`2` のまま、すべての失敗状態は非ゼロのままです。stderr の " +"`[new]` / `[regr +N%]` タグをパースせずに、CI で「新しい違反が現れた」と" +"「ベースライン化済みの違反が悪化した」を別々にルーティングする必要がある場合" +"に使ってください。" #: src/recipes/local-gates.md:383 msgid "Wiring into pre-commit and CI" @@ -16335,10 +16947,10 @@ msgid "" msgstr "" "開発者がプッシュ前にすでに実行している統括ターゲットに、ソフトゲートを追加し" "てください。ハードゲートはその前提条件として実行される(上記の `self-scan-" -"headroom: self-scan` のエッジを参照)ため、ソフトターゲットだけを列挙すれば十" -"分です — そして重要なことに、これは `make -j` にも耐えます。前提条件のエッジ" -"がなければ、両方のリーフが並列にスケジュールされ、出力が交互に混ざってしまう" -"ところです:" +"headroom: self-scan` のエッジを参照)ため、ソフトターゲットだけを列挙すれば" +"十分です — そして重要なことに、これは `make -j` にも耐えます。前提条件のエッ" +"ジがなければ、両方のリーフが並列にスケジュールされ、出力が交互に混ざってしま" +"うところです:" #: src/recipes/local-gates.md:393 src/recipes/local-gates.md:543 #: src/recipes/local-gates.md:549 @@ -16351,9 +16963,9 @@ msgstr "fmt-check clippy test self-scan-headroom" #: src/recipes/local-gates.md:397 msgid "" -"Ordering matters: the hard tier names a true regression with the 100% limit, " -"not the scaled one. The prerequisite edge enforces that order even under " -"parallel Make." +"Ordering matters: the hard tier names a true regression with the 100% " +"limit, not the scaled one. The prerequisite edge enforces that order even " +"under parallel Make." msgstr "" "順序が重要です。ハードティアは、スケーリング後ではなく 100% の限度に対する真" "のリグレッションを指摘します。前提条件のエッジは、並列 Make の下でもその順序" @@ -16374,15 +16986,15 @@ msgstr "make self-scan" #: src/recipes/local-gates.md:408 msgid "" "The soft tier is a developer feedback knob, not a release gate. Running it " -"in CI either duplicates the hard tier (when nothing has encroached) or fires " -"noisily on a baseline-absorbed offender that crept upward without crossing " -"100% — neither buys you anything CI doesn't already cover." +"in CI either duplicates the hard tier (when nothing has encroached) or " +"fires noisily on a baseline-absorbed offender that crept upward without " +"crossing 100% — neither buys you anything CI doesn't already cover." msgstr "" "ソフトティアは開発者向けのフィードバック用ノブであり、リリースゲートではあり" -"ません。CI で実行すると、(何も接近していなければ)ハードティアと重複するか、" -"100% を超えないままじわじわ悪化しているベースライン吸収済みの違反に対して騒が" -"しく発火するかのどちらかで、いずれも CI がすでにカバーしている以上のものは得" -"られません。" +"ません。CI で実行すると、(何も接近していなければ)ハードティアと重複する" +"か、100% を超えないままじわじわ悪化しているベースライン吸収済みの違反に対し" +"て騒がしく発火するかのどちらかで、いずれも CI がすでにカバーしている以上のも" +"のは得られません。" #: src/recipes/local-gates.md:414 msgid "The headroom knob" @@ -16393,8 +17005,8 @@ msgid "" "`BCA_HEADROOM` is a single scalar in `(0, 1]`. The interesting band is " "narrow:" msgstr "" -"`BCA_HEADROOM` は `(0, 1]` の範囲の単一のスカラー値です。意味のあるバンドは狭" -"い範囲に限られます:" +"`BCA_HEADROOM` は `(0, 1]` の範囲の単一のスカラー値です。意味のあるバンドは" +"狭い範囲に限られます:" #: src/recipes/local-gates.md:419 msgid "`BCA_HEADROOM`" @@ -16442,8 +17054,8 @@ msgstr "いずれかの限度の 90%" #: src/recipes/local-gates.md:423 msgid "" -"Wider band — useful immediately after raising a limit, while the new ceiling " -"settles." +"Wider band — useful immediately after raising a limit, while the new " +"ceiling settles." msgstr "" "より広いバンド。限度を引き上げた直後、新しい上限が落ち着くまでの間に有用で" "す。" @@ -16462,15 +17074,15 @@ msgstr "2 つのティアが一致していることを確認するサニティ #: src/recipes/local-gates.md:426 msgid "" -"Values below ~0.80 turn the soft tier into a second hard tier with arbitrary " -"numbers and stop being useful: every threshold has _some_ function near 80% " -"of it on a real codebase, and the soft tier becomes a permanent baseline-" -"management chore rather than an early-warning signal." +"Values below ~0.80 turn the soft tier into a second hard tier with " +"arbitrary numbers and stop being useful: every threshold has _some_ " +"function near 80% of it on a real codebase, and the soft tier becomes a " +"permanent baseline-management chore rather than an early-warning signal." msgstr "" -"およそ 0.80 を下回る値では、ソフトティアは恣意的な数値による第 2 のハードティ" -"アと化し、有用でなくなります。現実のコードベースでは、どのしきい値にもその " -"80% 付近にある関数が _何かしら_ 存在するため、ソフトティアは早期警告シグナル" -"ではなく、恒常的なベースライン管理の雑務になってしまいます。" +"およそ 0.80 を下回る値では、ソフトティアは恣意的な数値による第 2 のハード" +"ティアと化し、有用でなくなります。現実のコードベースでは、どのしきい値にもそ" +"の 80% 付近にある関数が _何かしら_ 存在するため、ソフトティアは早期警告シグ" +"ナルではなく、恒常的なベースライン管理の雑務になってしまいます。" #: src/recipes/local-gates.md:432 msgid "When the soft tier fires" @@ -16500,30 +17112,30 @@ msgstr "" msgid "" "**Raise the limit.** Edit the `[thresholds]` table (in `bca.toml` for this " "repo, or your own threshold file), leave a why-comment explaining what " -"changed (a new language module, a genuine algorithmic floor, a re-classified " -"macro). Re-run `make self-scan-headroom` to confirm the new value covers the " -"offender with room to spare." +"changed (a new language module, a genuine algorithmic floor, a re-" +"classified macro). Re-run `make self-scan-headroom` to confirm the new " +"value covers the offender with room to spare." msgstr "" "**限度を引き上げる。** `[thresholds]` テーブル(このリポジトリでは `bca." -"toml`、それ以外では各自のしきい値ファイル)を編集し、何が変わったのか(新しい" -"言語モジュール、真にアルゴリズム上の下限、再分類されたマクロなど)を説明する " -"why コメントを残してください。`make self-scan-headroom` を再実行し、新しい値" -"が余裕をもって違反箇所をカバーしていることを確認します。" +"toml`、それ以外では各自のしきい値ファイル)を編集し、何が変わったのか(新し" +"い言語モジュール、真にアルゴリズム上の下限、再分類されたマクロなど)を説明す" +"る why コメントを残してください。`make self-scan-headroom` を再実行し、新し" +"い値が余裕をもって違反箇所をカバーしていることを確認します。" #: src/recipes/local-gates.md:447 msgid "" "**Absorb into the baseline.** Run `make self-scan-write-baseline` (hard " -"tier) or `make self-scan-write-baseline-headroom` (soft tier) when the value " -"is legitimate forever — a parser dispatch arm whose width matches the " +"tier) or `make self-scan-write-baseline-headroom` (soft tier) when the " +"value is legitimate forever — a parser dispatch arm whose width matches the " "grammar it covers, a stable state machine, generated code. Commit the diff " "in `.bca-baseline.toml` in the same PR as the code that produced it." msgstr "" "**ベースラインに吸収する。** その値が今後もずっと正当である場合 — カバーする" "文法に見合った幅を持つパーサーのディスパッチアーム、安定した状態機械、生成" -"コードなど — は、`make self-scan-write-baseline`(ハードティア)または `make " -"self-scan-write-baseline-headroom`(ソフトティア)を実行してください。`.bca-" -"baseline.toml` の差分は、それを生んだコードと同じプルリクエストでコミットしま" -"す。" +"コードなど — は、`make self-scan-write-baseline`(ハードティア)または " +"`make self-scan-write-baseline-headroom`(ソフトティア)を実行してください。" +"`.bca-baseline.toml` の差分は、それを生んだコードと同じプルリクエストでコ" +"ミットします。" #: src/recipes/local-gates.md:455 msgid "" @@ -16532,8 +17144,8 @@ msgid "" "it the bumped limit looks indistinguishable from neglect." msgstr "" "ゲートを黙らせるためだけに「限度を引き上げる」を無言で選んではいけません。コ" -"ミットされた why コメントは、次の読者にとって唯一の監査証跡です。それがなけれ" -"ば、引き上げられた限度は怠慢と見分けがつきません。" +"ミットされた why コメントは、次の読者にとって唯一の監査証跡です。それがなけ" +"れば、引き上げられた限度は怠慢と見分けがつきません。" #: src/recipes/local-gates.md:460 msgid "Skeleton: `justfile`" @@ -16630,11 +17242,11 @@ msgid "" "identical `bca check` invocations as Make / `just`. Pass `--jobs 1` " "explicitly only when debugging:" msgstr "" -"`npx` またはピン留めしたバイナリで `bca` を取り込む JavaScript プロジェクト向" -"けです。`--jobs` のデフォルトは実効 CPU 数(Linux では cgroup / cpuset を考" -"慮)なので、npm 側でも Make / `just` とバイト単位で同一の `bca check` 呼び出" -"しを生成するために `BCA_NUM_JOBS` 環境変数はもう必要ありません。`--jobs 1` を" -"明示的に渡すのはデバッグ時だけにしてください:" +"`npx` またはピン留めしたバイナリで `bca` を取り込む JavaScript プロジェクト" +"向けです。`--jobs` のデフォルトは実効 CPU 数(Linux では cgroup / cpuset を" +"考慮)なので、npm 側でも Make / `just` とバイト単位で同一の `bca check` 呼び" +"出しを生成するために `BCA_NUM_JOBS` 環境変数はもう必要ありません。`--jobs " +"1` を明示的に渡すのはデバッグ時だけにしてください:" #: src/recipes/local-gates.md:509 msgid "\"scripts\"" @@ -16690,18 +17302,19 @@ msgstr "" #: src/recipes/local-gates.md:518 msgid "" -"Because the soft tier is now a plain `bca check` invocation, the npm scripts " -"are byte-identical across shells — no helper script, no `python3`\\-vs-`py` " -"alias to paper over, no env-var-vs-shell-expansion portability traps. To " -"widen the band, edit the literal `0.95` in the script (or wire it through " -"your task runner of choice); the flag parses the same on every platform." +"Because the soft tier is now a plain `bca check` invocation, the npm " +"scripts are byte-identical across shells — no helper script, no `python3`\\-" +"vs-`py` alias to paper over, no env-var-vs-shell-expansion portability " +"traps. To widen the band, edit the literal `0.95` in the script (or wire it " +"through your task runner of choice); the flag parses the same on every " +"platform." msgstr "" -"ソフトティアはいまや素の `bca check` 呼び出しなので、npm スクリプトはどのシェ" -"ルでもバイト単位で同一です — 補助スクリプトも、取り繕うべき `python3`\\-vs-" -"`py` エイリアスも、環境変数とシェル展開の移植性の罠もありません。バンドを広げ" -"るには、スクリプト内のリテラル `0.95` を編集する(またはお好みのタスクラン" -"ナー経由で配線する)だけです。このフラグはどのプラットフォームでも同じように" -"パースされます。" +"ソフトティアはいまや素の `bca check` 呼び出しなので、npm スクリプトはどの" +"シェルでもバイト単位で同一です — 補助スクリプトも、取り繕うべき `python3`\\-" +"vs-`py` エイリアスも、環境変数とシェル展開の移植性の罠もありません。バンドを" +"広げるには、スクリプト内のリテラル `0.95` を編集する(またはお好みのタスクラ" +"ンナー経由で配線する)だけです。このフラグはどのプラットフォームでも同じよう" +"にパースされます。" #: src/recipes/local-gates.md:525 msgid "" @@ -16709,8 +17322,8 @@ msgid "" "(https://pre-commit.com/) so the same scripts run on `git commit`." msgstr "" "[`husky`](https://typicode.github.io/husky/) や [`pre-commit`](https://pre-" -"commit.com/) と組み合わせて、同じスクリプトが `git commit` 時に実行されるよう" -"にしてください。" +"commit.com/) と組み合わせて、同じスクリプトが `git commit` 時に実行されるよ" +"うにしてください。" #: src/recipes/local-gates.md:529 msgid "Skeleton: `pre-commit` hook" @@ -16722,9 +17335,9 @@ msgid "" "3.2.0 or newer** — see the version note below), both tiers are local hooks " "that shell out to `make`:" msgstr "" -"[`pre-commit`](https://pre-commit.com/) フレームワーク(**バージョン 3.2.0 以" -"降** — 下記のバージョン注記を参照)を使っている場合、両ティアとも `make` を呼" -"び出すローカルフックになります:" +"[`pre-commit`](https://pre-commit.com/) フレームワーク(**バージョン 3.2.0 " +"以降** — 下記のバージョン注記を参照)を使っている場合、両ティアとも `make` " +"を呼び出すローカルフックになります:" #: src/recipes/local-gates.md:536 msgid "repo" @@ -16782,31 +17395,33 @@ msgid "" "a baseline refresh." msgstr "" "`pass_filenames: false` は意図的です — `bca` は `--paths` とベースラインから" -"自分で入力を発見します。`pre-commit` に変更ファイルを渡させると、スキャンがそ" -"れらのファイルだけに縮小され、ベースライン更新のファイル横断的な影響を見逃し" -"てしまいます。" +"自分で入力を発見します。`pre-commit` に変更ファイルを渡させると、スキャンが" +"それらのファイルだけに縮小され、ベースライン更新のファイル横断的な影響を見逃" +"してしまいます。" #: src/recipes/local-gates.md:557 msgid "" -"**Minimum `pre-commit` version 3.2.0.** The `stages:` vocabulary was renamed " -"in [pre-commit 3.2.0](https://github.com/pre-commit/pre-commit/releases/tag/" -"v3.2.0) (March 2024) — `commit` → `pre-commit`, `push` → `pre-push`, etc. " -"Older installs (notably RHEL 8 EPEL, Ubuntu 20.04 default packages, and any " -"`.pre-commit-config.yaml` pinned to the legacy vocabulary) reject `stages: " -"[pre-commit]` as an unknown stage name and the hook never registers. If you " -"must support older installations, substitute `stages: [commit]`; in mixed " -"fleets, pin the framework with `pre-commit --version` ≥ 3.2.0 in the dev-" -"tooling docs so this contradiction does not surface silently." +"**Minimum `pre-commit` version 3.2.0.** The `stages:` vocabulary was " +"renamed in [pre-commit 3.2.0](https://github.com/pre-commit/pre-commit/" +"releases/tag/v3.2.0) (March 2024) — `commit` → `pre-commit`, `push` → `pre-" +"push`, etc. Older installs (notably RHEL 8 EPEL, Ubuntu 20.04 default " +"packages, and any `.pre-commit-config.yaml` pinned to the legacy " +"vocabulary) reject `stages: [pre-commit]` as an unknown stage name and the " +"hook never registers. If you must support older installations, substitute " +"`stages: [commit]`; in mixed fleets, pin the framework with `pre-commit --" +"version` ≥ 3.2.0 in the dev-tooling docs so this contradiction does not " +"surface silently." msgstr "" "**`pre-commit` の最低バージョンは 3.2.0 です。** `stages:` の語彙は [pre-" "commit 3.2.0](https://github.com/pre-commit/pre-commit/releases/tag/v3.2.0)" "(2024 年 3 月)で改名されました — `commit` → `pre-commit`、`push` → `pre-" -"push` など。古いインストール(特に RHEL 8 EPEL、Ubuntu 20.04 のデフォルトパッ" -"ケージ、レガシー語彙にピン留めされた `.pre-commit-config.yaml`)は `stages: " -"[pre-commit]` を未知のステージ名として拒否し、フックが登録されません。古いイ" -"ンストールをサポートする必要がある場合は `stages: [commit]` に置き換えてくだ" -"さい。混在環境では、この矛盾が黙って表面化しないよう、開発ツールのドキュメン" -"トでフレームワークを `pre-commit --version` ≥ 3.2.0 にピン留めしてください。" +"push` など。古いインストール(特に RHEL 8 EPEL、Ubuntu 20.04 のデフォルト" +"パッケージ、レガシー語彙にピン留めされた `.pre-commit-config.yaml`)は " +"`stages: [pre-commit]` を未知のステージ名として拒否し、フックが登録されませ" +"ん。古いインストールをサポートする必要がある場合は `stages: [commit]` に置き" +"換えてください。混在環境では、この矛盾が黙って表面化しないよう、開発ツールの" +"ドキュメントでフレームワークを `pre-commit --version` ≥ 3.2.0 にピン留めして" +"ください。" #: src/recipes/local-gates.md:570 msgid "Composition with the broader baseline workflow" @@ -16814,9 +17429,9 @@ msgstr "より広いベースラインワークフローとの組み合わせ" #: src/recipes/local-gates.md:572 msgid "" -"The four `self-scan*` targets above are not a replacement for the documented " -"[Baselines recipe](baselines.md) — they _are_ that recipe, mechanised into " -"developer-machine commands. The same ordering still applies:" +"The four `self-scan*` targets above are not a replacement for the " +"documented [Baselines recipe](baselines.md) — they _are_ that recipe, " +"mechanised into developer-machine commands. The same ordering still applies:" msgstr "" "上記の 4 つの `self-scan*` ターゲットは、ドキュメント化された[ベースラインの" "レシピ](baselines.md)の代替ではありません — それらはそのレシピ 「そのもの」 " @@ -16828,8 +17443,8 @@ msgid "" "**Bootstrap once.** Write the initial thresholds, write the initial " "baseline, commit both." msgstr "" -"**最初に一度ブートストラップする。** 初期のしきい値を書き、初期のベースライン" -"を書き、両方をコミットします。" +"**最初に一度ブートストラップする。** 初期のしきい値を書き、初期のベースライ" +"ンを書き、両方をコミットします。" #: src/recipes/local-gates.md:579 msgid "" @@ -16844,8 +17459,9 @@ msgid "" "**Refresh during focused refactors.** When a function legitimately moved " "(someone _did_ pay down debt), regenerate the baseline and review the diff." msgstr "" -"**集中的なリファクタリング中に更新する。** 関数の値が正当に動いた(誰かが _実" -"際に_ 負債を返済した)場合は、ベースラインを再生成して差分をレビューします。" +"**集中的なリファクタリング中に更新する。** 関数の値が正当に動いた(誰かが _" +"実際に_ 負債を返済した)場合は、ベースラインを再生成して差分をレビューしま" +"す。" #: src/recipes/local-gates.md:584 msgid "" @@ -16853,19 +17469,19 @@ msgid "" "5` (the bare schema stamp with no offender entries), drop the `--baseline` " "flag and delete the file. The thresholds now stand on their own." msgstr "" -"**空になったら退役させる。** `.bca-baseline.toml` が `version = 5` だけ(違反" -"エントリのない素のスキーマスタンプ)に縮んだら、`--baseline` フラグを外して" -"ファイルを削除します。以後はしきい値が単独で機能します。" +"**空になったら退役させる。** `.bca-baseline.toml` が `version = 5` だけ(違" +"反エントリのない素のスキーマスタンプ)に縮んだら、`--baseline` フラグを外し" +"てファイルを削除します。以後はしきい値が単独で機能します。" #: src/recipes/local-gates.md:589 msgid "" "The local tiers shorten the feedback loop on steps 2 and 3 from \"red CI on " -"a pull request\" to \"red Make recipe before `git commit` returns\". That is " -"the whole pitch." +"a pull request\" to \"red Make recipe before `git commit` returns\". That " +"is the whole pitch." msgstr "" "ローカルのティアは、ステップ 2 と 3 のフィードバックループを「プルリクエスト" -"で CI が赤くなる」から「`git commit` が返る前に Make レシピが赤くなる」へと短" -"縮します。それがこの仕組みの売りのすべてです。" +"で CI が赤くなる」から「`git commit` が返る前に Make レシピが赤くなる」へと" +"短縮します。それがこの仕組みの売りのすべてです。" #: src/recipes/local-gates.md:593 msgid "Related industry patterns" @@ -16873,8 +17489,8 @@ msgstr "関連する業界パターン" #: src/recipes/local-gates.md:595 msgid "" -"The hard / soft tier split is one instance of a broader pattern. If you have " -"used any of the following, the mental model carries over:" +"The hard / soft tier split is one instance of a broader pattern. If you " +"have used any of the following, the mental model carries over:" msgstr "" "ハード / ソフトのティア分割は、より広いパターンの一例です。以下のいずれかを" "使ったことがあれば、そのメンタルモデルがそのまま通用します:" @@ -16895,21 +17511,25 @@ msgstr "" #: src/recipes/local-gates.md:604 msgid "" -"**clippy's `warn`\\-vs-`deny` lint levels.** A `warn` lint surfaces in local " -"builds; the same lint denied with `-D warnings` fails CI. The two-tier " -"configuration gives you a place to land experimental tighter rules." +"**clippy's `warn`\\-vs-`deny` lint levels.** A `warn` lint surfaces in " +"local builds; the same lint denied with `-D warnings` fails CI. The two-" +"tier configuration gives you a place to land experimental tighter rules." msgstr "" -"**clippy の `warn`\\-vs-`deny` リントレベル。** `warn` リントはローカルビルド" -"で表面化し、同じリントを `-D warnings` で deny すると CI が失敗します。2 段構" -"えの設定は、実験的により厳しいルールを導入する場所を与えてくれます。" +"**clippy の `warn`\\-vs-`deny` リントレベル。** `warn` リントはローカルビル" +"ドで表面化し、同じリントを `-D warnings` で deny すると CI が失敗します。2 " +"段構えの設定は、実験的により厳しいルールを導入する場所を与えてくれます。" #: src/recipes/local-gates.md:608 msgid "" "**The [ratchet pattern](https://github.com/stewartjarod/baseline)** in " -"general migration tooling: record today's count, fail on increase, lower the " -"ceiling as the count drops. `bca check` ratchets per-function rather than " -"per-pattern, but the monotonicity guarantee is the same." -msgstr "一般的な移行ツーリングにおける **[ラチェットパターン](https://github.com/stewartjarod/baseline)**。今日のカウントを記録し、増加で失敗させ、カウントが減るにつれ上限を下げていきます。`bca check` はパターン単位ではなく関数単位でラチェットしますが、単調性の保証は同じです。" +"general migration tooling: record today's count, fail on increase, lower " +"the ceiling as the count drops. `bca check` ratchets per-function rather " +"than per-pattern, but the monotonicity guarantee is the same." +msgstr "" +"一般的な移行ツーリングにおける **[ラチェットパターン](https://github.com/" +"stewartjarod/baseline)**。今日のカウントを記録し、増加で失敗させ、カウントが" +"減るにつれ上限を下げていきます。`bca check` はパターン単位ではなく関数単位で" +"ラチェットしますが、単調性の保証は同じです。" #: src/recipes/local-gates.md:614 msgid "" @@ -16929,8 +17549,8 @@ msgstr "エージェント型コーディングツールへのメトリクスの msgid "" "An agentic coding tool — Claude Code, opencode, and the like — is a fast-" "growing consumer of maintainability feedback, and it wants that feedback in " -"a different shape than a human in an editor does. A human keystrokes, so the " -"editor loop reaches for a language server: parse on `didChange`, render " +"a different shape than a human in an editor does. A human keystrokes, so " +"the editor loop reaches for a language server: parse on `didChange`, render " "complexity in the margin, update on every character. An agent does not " "keystroke. It writes a whole edit through a tool call and yields the turn. " "The right feedback for that consumer is **batch, after-edit, structured** — " @@ -16959,15 +17579,15 @@ msgid "" "report-format sarif | code-climate | clang-warning | msvc-warning | " "checkstyle` for a structured document)." msgstr "" -"機械的にパース可能な違反リスト(stderr への違反ごとの行、または構造化ドキュメ" -"ントとしての `--report-format sarif | code-climate | clang-warning | msvc-" +"機械的にパース可能な違反リスト(stderr への違反ごとの行、または構造化ドキュ" +"メントとしての `--report-format sarif | code-climate | clang-warning | msvc-" "warning | checkstyle`)。" #: src/recipes/agent-feedback.md:19 msgid "" "A tiered exit code — `2` when offenders are present, `0` clean, `1` on tool " -"error — so a hook can branch on \"did this edit make the code too complex?\" " -"without parsing anything." +"error — so a hook can branch on \"did this edit make the code too complex?" +"\" without parsing anything." msgstr "" "段階化された終了コード — 違反があれば `2`、クリーンなら `0`、ツールエラーな" "ら `1` — により、フックは何もパースせずに「この編集はコードを複雑にしすぎた" @@ -16976,7 +17596,8 @@ msgstr "" #: src/recipes/agent-feedback.md:22 msgid "" "Baseline filtering, in-source suppression markers, and `[check.exclude]` " -"globs, so the signal an agent sees is the same ratcheted signal a human sees." +"globs, so the signal an agent sees is the same ratcheted signal a human " +"sees." msgstr "" "ベースラインによるフィルタリング、ソース内の抑制マーカー、`[check.exclude]` " "グロブにより、エージェントが見るシグナルは人間が見るのと同じラチェット済みの" @@ -17080,9 +17701,9 @@ msgid "" "editing. Wiring an agent through the LSP's incremental `didChange` path " "would pay for machinery the agent never uses." msgstr "" -"人が入力しているときは LSP を、エージェントが編集しているときはこちらを選んで" -"ください。エージェントを LSP のインクリメンタルな `didChange` 経路につなぐの" -"は、エージェントが決して使わない機構の代価を払うことになります。" +"人が入力しているときは LSP を、エージェントが編集しているときはこちらを選ん" +"でください。エージェントを LSP のインクリメンタルな `didChange` 経路につなぐ" +"のは、エージェントが決して使わない機構の代価を払うことになります。" #: src/recipes/agent-feedback.md:48 msgid "" @@ -17110,10 +17731,11 @@ msgid "" "unnecessary — a bare `bca check ` reads the committed limits, " "baseline, and excludes, so the agent loop gates on exactly what CI gates on." msgstr "" -"リポジトリルートに `bca.toml` があれば([ローカルしきい値ゲート](local-gates." -"md#zero-config-the-bcatoml-manifest) を参照)、`--threshold` フラグは不要で" -"す。素の `bca check ` がコミット済みの限度値・ベースライン・除外設定を" -"読み込むため、エージェントのループは CI とまったく同じ条件でゲートします。" +"リポジトリルートに `bca.toml` があれば([ローカルしきい値ゲート](local-" +"gates.md#zero-config-the-bcatoml-manifest) を参照)、`--threshold` フラグは" +"不要です。素の `bca check ` がコミット済みの限度値・ベースライン・除外" +"設定を読み込むため、エージェントのループは CI とまったく同じ条件でゲートしま" +"す。" #: src/recipes/agent-feedback.md:64 msgid "Claude Code" @@ -17121,9 +17743,9 @@ msgstr "Claude Code" #: src/recipes/agent-feedback.md:66 msgid "" -"**Mechanism:** a [`PostToolUse` hook](https://code.claude.com/docs/en/hooks) " -"in `.claude/settings.json`, with the `matcher` scoped to the file-editing " -"tools." +"**Mechanism:** a [`PostToolUse` hook](https://code.claude.com/docs/en/" +"hooks) in `.claude/settings.json`, with the `matcher` scoped to the file-" +"editing tools." msgstr "" "**仕組み:** `.claude/settings.json` 内の [`PostToolUse` フック](https://" "code.claude.com/docs/en/hooks)。`matcher` はファイル編集ツールにスコープしま" @@ -17134,14 +17756,15 @@ msgid "" "**Feedback channel:** this is the strongest fit of any agentic tool. A " "`PostToolUse` hook fires the instant an edit lands, and it can inject text " "straight back into the model — either by **exiting `2` with the message on " -"stderr** (Claude reads stderr as context about what happened) or by emitting " -"JSON with `hookSpecificOutput.additionalContext`. Feedback arrives at the " -"exact edit boundary and costs zero tokens until there is something to say." -msgstr "" -"**フィードバックチャネル:** これはあらゆるエージェント型ツールの中で最も強力" -"な適合です。`PostToolUse` フックは編集が反映された瞬間に発火し、テキストを直" -"接モデルへ注入できます — **メッセージを stderr に出して終了コード `2` で終了" -"する**(Claude は stderr を何が起きたかのコンテキストとして読みます)か、" +"stderr** (Claude reads stderr as context about what happened) or by " +"emitting JSON with `hookSpecificOutput.additionalContext`. Feedback arrives " +"at the exact edit boundary and costs zero tokens until there is something " +"to say." +msgstr "" +"**フィードバックチャネル:** これはあらゆるエージェント型ツールの中で最も強" +"力な適合です。`PostToolUse` フックは編集が反映された瞬間に発火し、テキストを" +"直接モデルへ注入できます — **メッセージを stderr に出して終了コード `2` で終" +"了する**(Claude は stderr を何が起きたかのコンテキストとして読みます)か、" "`hookSpecificOutput.additionalContext` を含む JSON を出力するかのいずれかで" "す。フィードバックは編集境界そのものに届き、言うべきことが生じるまでトークン" "コストはゼロです。" @@ -17181,10 +17804,10 @@ msgid "" "the offender list followed by the agent-guidance block on stderr and exits " "`2`:" msgstr "" -"ラッパースクリプトは、フックの stdin に届く JSON から編集されたファイルのパス" -"を読み取り、そのファイルだけに `bca check` を実行し、ゲートに引っかかったとき" -"に限り、違反リストとそれに続くエージェント向けガイダンスブロックを stderr に" -"出力して `2` で終了します:" +"ラッパースクリプトは、フックの stdin に届く JSON から編集されたファイルのパ" +"スを読み取り、そのファイルだけに `bca check` を実行し、ゲートに引っかかった" +"ときに限り、違反リストとそれに続くエージェント向けガイダンスブロックを " +"stderr に出力して `2` で終了します:" #: src/recipes/agent-feedback.md:105 msgid "" @@ -17243,8 +17866,8 @@ msgid "" "# bca check exits 0 clean, 2 on offenders, 1 on tool error. Branch on 2\n" "# specifically so a config/IO error is not mislabelled as \"complexity\".\n" msgstr "" -"# bca check の終了コードは、クリーンなら 0、違反ありなら 2、ツールエラーなら " -"1。\n" +"# bca check の終了コードは、クリーンなら 0、違反ありなら 2、ツールエラーな" +"ら 1。\n" "# 設定や IO のエラーが「複雑度」と誤ラベルされないよう、2 に限定して分岐しま" "す。\n" @@ -17265,19 +17888,30 @@ msgid "'bca check could not run (exit %s):\\n%s\\n' \"$status\" \"$report\"" msgstr "'bca check could not run (exit %s):\\n%s\\n' \"$status\" \"$report\"" #: src/recipes/agent-feedback.md:129 -msgid "# Exit 2 makes Claude read stderr as context about the edit.\n" +msgid "" +"# Exit 2 makes Claude read stderr as context about the edit. Default\n" +"# CLAUDE_PROJECT_DIR and test the guidance file: under `set -u` an unset\n" +"# variable aborts the hook, and a missing file would emit a bare `cat`\n" +"# error where the guidance should be.\n" msgstr "" -"# 終了コード 2 により Claude は stderr を編集に関するコンテキストとして読み取" -"る。\n" +"# 終了コード 2 により、Claude は stderr を編集に関する文脈として読みます。\n" +"# `set -u` の下では未設定の変数がフックを中断させ、ファイルが無い場合は\n" +"# 案内文の代わりに素の `cat` エラーが出るため、CLAUDE_PROJECT_DIR に既定値" +"を\n" +"# 与え、案内ファイルの存在を確認します。\n" -#: src/recipes/agent-feedback.md:131 +#: src/recipes/agent-feedback.md:134 +msgid "\"${CLAUDE_PROJECT_DIR:-$PWD}/.claude/hooks/bca-guidance.txt\"" +msgstr "\"${CLAUDE_PROJECT_DIR:-$PWD}/.claude/hooks/bca-guidance.txt\"" + +#: src/recipes/agent-feedback.md:135 msgid "" "< 25\" " "reliably triggers the gaming move — the agent extracts a semantically empty " @@ -17591,19 +18236,19 @@ msgid "" "present both as standing policy and at the moment of the violation:" msgstr "" "フィードバックチャネルはレシピの半分にすぎません。素の「cognitive 26 > 25」" -"は、確実にメトリクスゲーミングの動きを誘発します — エージェントは関数ごとの数" -"値を削るために意味的に空のヘルパーを抽出し、関数単位の複雑度を _下げ_ ながら" -"ファイル単位の `nom`/`nargs` を _上げ_、コードを悪化させます。緩和策は、違反" -"が何を意味し、どう対処すべきかをエージェントに伝えることです。このブロックを" -"エージェントルールファイル(`CLAUDE.md`、opencode の `AGENTS.md`)**と**フッ" -"クのフィードバックテキストの両方に貼り付け、恒常的なポリシーとしても違反の瞬" -"間にも指示が存在するようにしてください:" - -#: src/recipes/agent-feedback.md:306 +"は、確実にメトリクスゲーミングの動きを誘発します — エージェントは関数ごとの" +"数値を削るために意味的に空のヘルパーを抽出し、関数単位の複雑度を _下げ_ なが" +"らファイル単位の `nom`/`nargs` を _上げ_、コードを悪化させます。緩和策は、違" +"反が何を意味し、どう対処すべきかをエージェントに伝えることです。このブロック" +"をエージェントルールファイル(`CLAUDE.md`、opencode の `AGENTS.md`)**と**" +"フックのフィードバックテキストの両方に貼り付け、恒常的なポリシーとしても違反" +"の瞬間にも指示が存在するようにしてください:" + +#: src/recipes/agent-feedback.md:316 msgid "Honest suppression (exact syntax)" msgstr "誠実な抑制(正確な構文)" -#: src/recipes/agent-feedback.md:308 +#: src/recipes/agent-feedback.md:318 msgid "" "The guidance above tells the agent that suppression is a legitimate move. " "For that to work the agent has to spell the marker correctly — and the " @@ -17611,31 +18256,31 @@ msgid "" "(full reference: [Suppression markers](../commands/suppression.md)):" msgstr "" "上記のガイダンスは、抑制が正当な手段であることをエージェントに伝えます。それ" -"が機能するには、エージェントがマーカーを正しく綴る必要があります — マーカー構" -"文は静かな no-op の頻出原因です。正確に教えてください(完全なリファレンス: " -"[抑制マーカー](../commands/suppression.md)):" +"が機能するには、エージェントがマーカーを正しく綴る必要があります — マーカー" +"構文は静かな no-op の頻出原因です。正確に教えてください(完全なリファレン" +"ス: [抑制マーカー](../commands/suppression.md)):" -#: src/recipes/agent-feedback.md:314 +#: src/recipes/agent-feedback.md:324 msgid "" "**Per function** — place the marker in a comment inside the function body, " "naming the metric(s): `// bca: suppress(cyclomatic, abc)`. A bare `// bca: " "suppress` (no list) silences _every_ metric for that function." msgstr "" -"**関数ごと** — 関数本体内のコメントにマーカーを置き、対象のメトリクスを列挙し" -"ます: `// bca: suppress(cyclomatic, abc)`。リストのない素の `// bca: " +"**関数ごと** — 関数本体内のコメントにマーカーを置き、対象のメトリクスを列挙" +"します: `// bca: suppress(cyclomatic, abc)`。リストのない素の `// bca: " "suppress` は、その関数の _すべての_ メトリクスを抑制します。" -#: src/recipes/agent-feedback.md:318 +#: src/recipes/agent-feedback.md:328 msgid "" "**Whole file** — `// bca: suppress-file(halstead, nargs, nexits)` anywhere " "in the file; the bare `// bca: suppress-file` form silences every metric " "file-wide." msgstr "" "**ファイル全体** — `// bca: suppress-file(halstead, nargs, nexits)` をファイ" -"ル内の任意の場所に置きます。リストのない `// bca: suppress-file` 形式は、ファ" -"イル全体ですべてのメトリクスを抑制します。" +"ル内の任意の場所に置きます。リストのない `// bca: suppress-file` 形式は、" +"ファイル全体ですべてのメトリクスを抑制します。" -#: src/recipes/agent-feedback.md:321 +#: src/recipes/agent-feedback.md:331 msgid "" "**Use canonical metric names.** The accepted identifiers are `abc`, " "`cognitive`, `cyclomatic`, `halstead`, `loc`, `mi`, `nargs`, `nexits`, " @@ -17651,36 +18296,36 @@ msgstr "" "にマーカー全体を無効化し_、列挙したすべてを静かに抑制解除します。`tokens` は" "意図的に抑制 _不可_ です。ハードなリソース上限として扱ってください。" -#: src/recipes/agent-feedback.md:328 +#: src/recipes/agent-feedback.md:338 msgid "" -"**Always pair a suppression with a rationale comment** so a reviewer — human " -"or agent — can later tell an honest exemption from a dodge. `bca exemptions` " -"lists every marker in the tree for exactly this audit." +"**Always pair a suppression with a rationale comment** so a reviewer — " +"human or agent — can later tell an honest exemption from a dodge. `bca " +"exemptions` lists every marker in the tree for exactly this audit." msgstr "" "**抑制には必ず理由コメントを添えてください。** そうすることで、後からレビュ" -"アー(人間でもエージェントでも)が誠実な例外とごまかしを見分けられます。`bca " -"exemptions` はまさにこの監査のためにツリー内のすべてのマーカーを一覧表示しま" -"す。" +"アー(人間でもエージェントでも)が誠実な例外とごまかしを見分けられます。" +"`bca exemptions` はまさにこの監査のためにツリー内のすべてのマーカーを一覧表" +"示します。" -#: src/recipes/agent-feedback.md:333 +#: src/recipes/agent-feedback.md:343 msgid "Gate at the task boundary, not per edit" msgstr "編集ごとではなくタスク境界でゲートする" -#: src/recipes/agent-feedback.md:335 +#: src/recipes/agent-feedback.md:345 msgid "" -"The per-edit hooks above are an early-warning convenience, not the gate. The " -"gate is the same check a human runs before declaring a task done: the two-" -"tier [`make self-scan` / pre-commit pattern](local-gates.md) (hard tier " -"mirroring CI, soft tier as a 95%-of-limit headroom band). Point the agent at " -"that as its \"before I'm finished\" step." +"The per-edit hooks above are an early-warning convenience, not the gate. " +"The gate is the same check a human runs before declaring a task done: the " +"two-tier [`make self-scan` / pre-commit pattern](local-gates.md) (hard tier " +"mirroring CI, soft tier as a 95%-of-limit headroom band). Point the agent " +"at that as its \"before I'm finished\" step." msgstr "" "上記の編集ごとのフックは早期警告のための利便機能であり、ゲートではありませ" "ん。ゲートは、人間がタスク完了を宣言する前に実行するのと同じチェック、すなわ" "ち 2 段構えの [`make self-scan` / pre-commit パターン](local-gates.md)(ハー" -"ド層は CI をミラーし、ソフト層は上限の 95% のヘッドルーム帯)です。エージェン" -"トには「完了と言う前」のステップとしてこれを指し示してください。" +"ド層は CI をミラーし、ソフト層は上限の 95% のヘッドルーム帯)です。エージェ" +"ントには「完了と言う前」のステップとしてこれを指し示してください。" -#: src/recipes/agent-feedback.md:342 +#: src/recipes/agent-feedback.md:352 msgid "" "Going finer-grained than the task boundary is low- or negative-value for an " "agent. A complexity threshold is a proxy, not a correctness gate (see the " @@ -17692,42 +18337,59 @@ msgstr "" "タスク境界より細かい粒度は、エージェントにとって価値が低いか、むしろ逆効果で" "す。複雑度のしきい値は正しさのゲートではなくプロキシなので(下記の注意点を参" "照)、リファクタリング途中の _あらゆる_ 微小編集の後に再実行しても、数編集後" -"には自然に解消される一時的な違反が生まれるだけです — エージェントはそのノイズ" -"の「修正」に 1 ターンを浪費します。エージェントに一貫した変更を仕上げさせ、そ" -"れから一度だけゲートしてください。" - -#: src/recipes/agent-feedback.md:349 src/python/flat-records.md:130 +"には自然に解消される一時的な違反が生まれるだけです — エージェントはそのノイ" +"ズの「修正」に 1 ターンを浪費します。エージェントに一貫した変更を仕上げさ" +"せ、それから一度だけゲートしてください。" + +#: src/recipes/agent-feedback.md:359 +msgid "" +"One instruction to leave out of the rules file: a standing \"verify your " +"fix, then re-check the metrics\" step layered on top of the hook. Current " +"models re-read and re-check their own edits without being asked, and an " +"explicit instruction compounds with that — the loop spends turns re-running " +"a gate whose input has not changed. The hook already fires on its own when " +"an edit lands. Let that be the signal." +msgstr "" +"ルールファイルに書かないほうがよい指示が 1 つあります。フックの上に重ねて" +"「修正を検証し、メトリクスを再チェックする」という常設の手順を置くことです。" +"現在のモデルは、指示されなくても自分の編集を読み直し、再チェックします。明示" +"的な指示はその挙動と重なり、入力が変わっていないゲートの再実行にループがター" +"ンを費やすことになります。編集が着地すれば、フックは自ら発火します。それを合" +"図としてください。" + +#: src/recipes/agent-feedback.md:366 src/python/flat-records.md:130 msgid "Caveats" msgstr "注意点" -#: src/recipes/agent-feedback.md:351 +#: src/recipes/agent-feedback.md:368 msgid "" -"Two caveats the recipe depends on; ignore them and the loop does more harm " -"than good." +"Three caveats the recipe depends on; ignore them and the loop does more " +"harm than good." msgstr "" -"本レシピが依存する 2 つの注意点です。無視すると、このループは益より害をもたら" -"します。" +"本レシピが依存する 3 つの注意点です。無視すると、このループは益より害をもた" +"らします。" -#: src/recipes/agent-feedback.md:354 +#: src/recipes/agent-feedback.md:371 msgid "" "**Goodhart's law / metric-gaming.** \"Make this number smaller\" is not the " "same instruction as \"make this code simpler\", and an LLM told the former " "will satisfy it the cheapest way it can — usually by shuffling complexity " "across a function boundary rather than removing it. The [agent-guidance " "block](#agent-guidance-ship-this-verbatim) and the [honest-suppression " -"section](#honest-suppression-exact-syntax) are the mitigation; they are load-" -"bearing, not optional polish. Ship them with the hook or expect the gaming " -"move." +"section](#honest-suppression-exact-syntax) are the mitigation; they are " +"load-bearing, not optional polish. Ship them with the hook or expect the " +"gaming move." msgstr "" "**グッドハートの法則 / メトリクスゲーミング。** 「この数値を小さくせよ」は" -"「このコードを簡潔にせよ」と同じ指示ではなく、前者を告げられた LLM は最も安上" -"がりな方法でそれを満たします — 通常は複雑さを取り除くのではなく、関数境界の向" -"こうへ動かすだけです。[エージェント向けガイダンスブロック](#agent-guidance-" -"ship-this-verbatim) と [誠実な抑制のセクション](#honest-suppression-exact-" -"syntax) がその緩和策であり、これらは任意の飾りではなく構造上不可欠です。フッ" -"クと一緒に出荷しなければ、ゲーミングの動きを覚悟してください。" +"「このコードを簡潔にせよ」と同じ指示ではなく、前者を告げられた LLM は最も安" +"上がりな方法でそれを満たします — 通常は複雑さを取り除くのではなく、関数境界" +"の向こうへ動かすだけです。[エージェント向けガイダンスブロック](#agent-" +"guidance-ship-this-verbatim) と [誠実な抑制のセクション](#honest-" +"suppression-exact-syntax) がその緩和策であり、これらは任意の飾りではなく構造" +"上不可欠です。フックと一緒に出荷しなければ、ゲーミングの動きを覚悟してくださ" +"い。" -#: src/recipes/agent-feedback.md:362 +#: src/recipes/agent-feedback.md:379 msgid "" "**Thresholds are proxies, not correctness gates.** A failing compile or a " "red test is unambiguous — a tight agent loop on those converges. A " @@ -17736,13 +18398,31 @@ msgid "" "Set expectations accordingly — wire complexity feedback as advice the agent " "weighs, not a pass/fail it must drive to zero at any cost." msgstr "" -"**しきい値はプロキシであり、正しさのゲートではありません。** コンパイル失敗や" -"赤いテストには曖昧さがなく、それらに対するタイトなエージェントループは収束し" -"ます。複雑度のしきい値はもっと柔らかいものです。しきい値超過は「これがまだ読" -"みやすいか人間が確認すべき」という意味であり、判断の問題であって欠陥ではあり" -"ません。それに応じて期待値を設定してください — 複雑度フィードバックは、何とし" -"てもゼロに追い込むべき合否判定ではなく、エージェントが重み付けして考慮する助" -"言として配線します。" +"**しきい値はプロキシであり、正しさのゲートではありません。** コンパイル失敗" +"や赤いテストには曖昧さがなく、それらに対するタイトなエージェントループは収束" +"します。複雑度のしきい値はもっと柔らかいものです。しきい値超過は「これがまだ" +"読みやすいか人間が確認すべき」という意味であり、判断の問題であって欠陥ではあ" +"りません。それに応じて期待値を設定してください — 複雑度フィードバックは、何" +"としてもゼロに追い込むべき合否判定ではなく、エージェントが重み付けして考慮す" +"る助言として配線します。" + +#: src/recipes/agent-feedback.md:386 +msgid "" +"**Complexity feedback invites scope creep.** \"This function is hard to " +"follow\" reads to an agent as an invitation to restructure, and the " +"restructuring does not reliably stop at the function the hook named — a two-" +"line fix becomes a module rewrite nobody asked to review. Bound it in the " +"rules file: the violation is scoped to the edit that triggered it. Fix it " +"where it was flagged, mention anything larger you noticed, and do not widen " +"the change to chase the number." +msgstr "" +"**複雑度フィードバックはスコープクリープを招きます。** 「この関数は追いにく" +"い」という指摘は、エージェントには再構成への誘いとして読まれます。そしてその" +"再構成は、フックが名指しした関数で確実に止まるとは限りません — 2 行の修正" +"が、誰もレビューを頼んでいないモジュール書き換えになります。ルールファイルで" +"範囲を区切ってください。違反は、それを引き起こした編集に限定されます。指摘さ" +"れた場所で直し、それより大きな気づきがあれば言及するにとどめ、数字を追って変" +"更を広げないでください。" #: src/recipes/ast-queries.md:3 msgid "" @@ -17760,9 +18440,9 @@ msgid "" "metrics with custom AST analysis in one parse." msgstr "" "**ライブラリ側の同等物。** 以下の各レシピには、[AST を直接歩く](../library/" -"ast-traversal.md) にプロセス内で動く Rust 版の対応物があります — ファイルごと" -"のシェル起動が遅すぎる場合や、1 回のパースでメトリクスとカスタム AST 分析を組" -"み合わせたい場合に有用です。" +"ast-traversal.md) にプロセス内で動く Rust 版の対応物があります — ファイルご" +"とのシェル起動が遅すぎる場合や、1 回のパースでメトリクスとカスタム AST 分析" +"を組み合わせたい場合に有用です。" #: src/recipes/ast-queries.md:12 msgid "Detect parse errors before committing" @@ -17783,8 +18463,8 @@ msgid "" "\"*.rs\" --include \"*.py\"`). A positional path that follows is never " "swallowed. The `=` form (`--include=\"*.rs\"`) also works." msgstr "" -"**1 回の指定につきグロブ 1 つ。** `--include` と `--exclude` は出現ごとにちょ" -"うど 1 つの値を取ります。複数のグロブにはフラグを繰り返してください(`--" +"**1 回の指定につきグロブ 1 つ。** `--include` と `--exclude` は出現ごとに" +"ちょうど 1 つの値を取ります。複数のグロブにはフラグを繰り返してください(`--" "include \"*.rs\" --include \"*.py\"`)。後続の位置引数パスが飲み込まれること" "はありません。`=` 形式(`--include=\"*.rs\"`)も使えます。" @@ -17816,9 +18496,9 @@ msgid "" "discover them, dump the AST of a small sample file (see below) and read the " "node names off the tree." msgstr "" -"正確なノード型名は下層の tree-sitter 文法に由来します。見つけるには、小さなサ" -"ンプルファイルの AST をダンプし(下記参照)、ツリーからノード名を読み取ってく" -"ださい。" +"正確なノード型名は下層の tree-sitter 文法に由来します。見つけるには、小さな" +"サンプルファイルの AST をダンプし(下記参照)、ツリーからノード名を読み取っ" +"てください。" #: src/recipes/ast-queries.md:50 msgid "Find all `unsafe` blocks in a Rust crate" @@ -17842,12 +18522,12 @@ msgstr "" #: src/recipes/ast-queries.md:70 msgid "" -"To narrow the dump to a specific function or block, add line bounds with the " -"`--line-start` and `--line-end` flags (they must follow the `dump` " +"To narrow the dump to a specific function or block, add line bounds with " +"the `--line-start` and `--line-end` flags (they must follow the `dump` " "subcommand):" msgstr "" -"ダンプを特定の関数やブロックに絞るには、`--line-start` と `--line-end` フラグ" -"で行範囲を追加します(`dump` サブコマンドの後に置く必要があります):" +"ダンプを特定の関数やブロックに絞るには、`--line-start` と `--line-end` フラ" +"グで行範囲を追加します(`dump` サブコマンドの後に置く必要があります):" #: src/recipes/ast-queries.md:80 msgid "" @@ -17862,8 +18542,8 @@ msgid "" "The short `--ls` / `--le` spellings remain as deprecated aliases and are " "slated for removal in the next major." msgstr "" -"短縮形の `--ls` / `--le` は非推奨エイリアスとして残っていますが、次のメジャー" -"リリースで削除される予定です。" +"短縮形の `--ls` / `--le` は非推奨エイリアスとして残っていますが、次のメ" +"ジャーリリースで削除される予定です。" #: src/recipes/ast-queries.md:92 msgid "List every function or method" @@ -17875,9 +18555,9 @@ msgstr "人間が読むための簡単なインベントリには:" #: src/recipes/ast-queries.md:102 msgid "" -"The output is a tree per file: an `In file …` header followed by an indented " -"row per function with name and line span. It is intended for reading, not " -"parsing." +"The output is a tree per file: an `In file …` header followed by an " +"indented row per function with name and line span. It is intended for " +"reading, not parsing." msgstr "" "出力はファイルごとのツリーです。`In file …` ヘッダーに続き、関数ごとに名前と" "行スパンを持つインデントされた行が並びます。読むためのものであり、パースする" @@ -17886,9 +18566,9 @@ msgstr "" #: src/recipes/ast-queries.md:106 msgid "" "For tooling that needs a structured inventory — coverage mapping, " -"documentation generation, code-owner reports — use the JSON `metrics` output " -"instead and walk `.spaces[]` recursively, taking entries whose `kind` is " -"`function`:" +"documentation generation, code-owner reports — use the JSON `metrics` " +"output instead and walk `.spaces[]` recursively, taking entries whose " +"`kind` is `function`:" msgstr "" "構造化されたインベントリが必要なツール(カバレッジマッピング、ドキュメント生" "成、コードオーナーレポート)には、代わりに JSON の `metrics` 出力を使い、`." @@ -17915,8 +18595,8 @@ msgid "" "This emits one JSON object per function and is safe to pipe into downstream " "tooling." msgstr "" -"これは関数ごとに 1 つの JSON オブジェクトを出力し、下流のツールへ安全にパイプ" -"できます。" +"これは関数ごとに 1 つの JSON オブジェクトを出力し、下流のツールへ安全にパイ" +"プできます。" #: src/recipes/exporting-data.md:3 msgid "" @@ -17926,9 +18606,9 @@ msgid "" "feed them into a database or dashboard." msgstr "" "`metrics`、`ops`、`preproc` の各サブコマンドはいずれも、機械処理向けの構造化" -"出力フォーマットをサポートします。アドホックな分析には [`jq`](https://jqlang." -"github.io/jq/) のような JSON プロセッサと組み合わせるか、データベースやダッ" -"シュボードに投入してください。" +"出力フォーマットをサポートします。アドホックな分析には [`jq`](https://" +"jqlang.github.io/jq/) のような JSON プロセッサと組み合わせるか、データベース" +"やダッシュボードに投入してください。" #: src/recipes/exporting-data.md:8 msgid "Export per-file metrics as JSON" @@ -17943,8 +18623,8 @@ msgid "" msgstr "" "これは解析対象のソースファイルごとに 1 つの JSON ファイルを `/tmp/metrics/` " "以下に書き出します。出力ファイル名は入力パスにフォーマットの拡張子を付加した" -"ものです — `src/lib.rs` は `src/lib.json` ではなく `src/lib.rs.json` になりま" -"す。手で読むつもりなら `--pretty` を使ってください:" +"ものです — `src/lib.rs` は `src/lib.json` ではなく `src/lib.rs.json` になり" +"ます。手で読むつもりなら `--pretty` を使ってください:" #: src/recipes/exporting-data.md:27 msgid "" @@ -17964,8 +18644,8 @@ msgid "" "pipelines." msgstr "" "CBOR(`-O cbor`)は最もコンパクトなフォーマットですが、バイナリのため出力先" -"(`--output` または `--output-dir`)が必要です。JSON、TOML、YAML は出力先が指" -"定されない場合いずれも stdout にストリームでき、パイプラインに便利です。" +"(`--output` または `--output-dir`)が必要です。JSON、TOML、YAML は出力先が" +"指定されない場合いずれも stdout にストリームでき、パイプラインに便利です。" #: src/recipes/exporting-data.md:40 msgid "Compare two metric runs with `bca diff`" @@ -17981,11 +18661,11 @@ msgid "" "directories:" msgstr "" "`bca diff` は 2 つの JSON メトリクス実行を比較し、メトリクスごとに、どのファ" -"イルが変化したか(旧 → 新)に加えて、2 つのセット間で追加・削除されたファイル" -"を報告します。各サイドは単一のファイル別 JSON ドキュメント、またはそれらの" -"ディレクトリツリー全体(`metrics -O json --output-dir ` 形式が書き出すも" -"の)なので、一般的なワークフローは 2 回の `bca metrics` 実行を別々のディレク" -"トリへ出力することです:" +"イルが変化したか(旧 → 新)に加えて、2 つのセット間で追加・削除されたファイ" +"ルを報告します。各サイドは単一のファイル別 JSON ドキュメント、またはそれらの" +"ディレクトリツリー全体(`metrics -O json --output-dir ` 形式が書き出す" +"もの)なので、一般的なワークフローは 2 回の `bca metrics` 実行を別々のディレ" +"クトリへ出力することです:" #: src/recipes/exporting-data.md:50 msgid "# Capture the \"before\" state.\n" @@ -18001,8 +18681,8 @@ msgstr "# 「変更後」の状態を取得して diff を取る。\n" #: src/recipes/exporting-data.md:60 msgid "" -"The output buckets every per-file delta by metric name — the same names `bca " -"list-metrics` prints (`cyclomatic`, `cognitive`, `sloc`, …):" +"The output buckets every per-file delta by metric name — the same names " +"`bca list-metrics` prints (`cyclomatic`, `cognitive`, `sloc`, …):" msgstr "" "出力はファイルごとの差分をメトリクス名でまとめます — `bca list-metrics` が出" "力するのと同じ名前です(`cyclomatic`、`cognitive`、`sloc`、…):" @@ -18021,8 +18701,8 @@ msgstr "" #: src/recipes/exporting-data.md:81 msgid "" -"`--min-change ` reports only deltas whose absolute change is at least `N` " -"(the default `0` reports any change)." +"`--min-change ` reports only deltas whose absolute change is at least " +"`N` (the default `0` reports any change)." msgstr "" "`--min-change ` は絶対変化量が `N` 以上の差分のみを報告します(デフォルト" "の `0` はあらゆる変化を報告します)。" @@ -18039,12 +18719,12 @@ msgstr "`--since` で git ref と比較する" #: src/recipes/exporting-data.md:87 msgid "" "For the interactive \"what did my uncommitted change do to the metrics?\" " -"case, `--since ` skips the two-capture dance: it analyzes the tree **at " -"a git ref** for the before side, and diffs it against the current working " -"tree (or an explicit after-side tree):" +"case, `--since ` skips the two-capture dance: it analyzes the tree " +"**at a git ref** for the before side, and diffs it against the current " +"working tree (or an explicit after-side tree):" msgstr "" -"「コミットしていない変更はメトリクスに何をしたか?」という対話的なケースでは、" -"`--since ` が 2 回キャプチャする手間を省きます。変更前サイドとして " +"「コミットしていない変更はメトリクスに何をしたか?」という対話的なケースで" +"は、`--since ` が 2 回キャプチャする手間を省きます。変更前サイドとして " "**git ref 時点の**ツリーを解析し、現在の作業ツリー(または明示的に指定した変" "更後サイドのツリー)と比較します:" @@ -18066,22 +18746,22 @@ msgid "" "`--since` materializes the ref's tree into a temporary directory (via `git " "archive`), runs the same metric walk against it, then diffs — the temp tree " "is removed automatically, including on error. The same `-p/--paths`, `-I/--" -"include`, and `-X/--exclude` selection applies to both sides so they analyze " -"the same file set. Selection paths are **repo-root-relative** and must be " -"relative: the working-tree side is anchored at the repository root (matching " -"the whole-tree `git archive` of the ref), so `bca diff --since` produces the " -"same result from any subdirectory. An absolute `--paths` is rejected (exit " -"1) — it cannot address the extracted ref tree." -msgstr "" -"`--since` は ref のツリーを一時ディレクトリに実体化し(`git archive` 経由)、" -"それに対して同じメトリクスウォークを実行してから diff を取ります — 一時ツリー" -"はエラー時も含めて自動的に削除されます。同じ `-p/--paths`、`-I/--include`、`-" -"X/--exclude` の選択が両サイドに適用されるため、同一のファイルセットを解析しま" -"す。選択パスは**リポジトリルート相対**で、相対パスでなければなりません。作業" -"ツリー側は(ref の全ツリー `git archive` に合わせて)リポジトリルートに固定さ" -"れるため、`bca diff --since` はどのサブディレクトリから実行しても同じ結果にな" -"ります。絶対パスの `--paths` は拒否されます(終了コード 1)— 展開された ref " -"ツリーを指せないためです。" +"include`, and `-X/--exclude` selection applies to both sides so they " +"analyze the same file set. Selection paths are **repo-root-relative** and " +"must be relative: the working-tree side is anchored at the repository root " +"(matching the whole-tree `git archive` of the ref), so `bca diff --since` " +"produces the same result from any subdirectory. An absolute `--paths` is " +"rejected (exit 1) — it cannot address the extracted ref tree." +msgstr "" +"`--since` は ref のツリーを一時ディレクトリに実体化し(`git archive` 経" +"由)、それに対して同じメトリクスウォークを実行してから diff を取ります — 一" +"時ツリーはエラー時も含めて自動的に削除されます。同じ `-p/--paths`、`-I/--" +"include`、`-X/--exclude` の選択が両サイドに適用されるため、同一のファイル" +"セットを解析します。選択パスは**リポジトリルート相対**で、相対パスでなければ" +"なりません。作業ツリー側は(ref の全ツリー `git archive` に合わせて)リポジ" +"トリルートに固定されるため、`bca diff --since` はどのサブディレクトリから実" +"行しても同じ結果になります。絶対パスの `--paths` は拒否されます(終了コード " +"1)— 展開された ref ツリーを指せないためです。" #: src/recipes/exporting-data.md:112 msgid "" @@ -18092,23 +18772,24 @@ msgid "" msgstr "" "ベストエフォートの `bca check --since` とは異なり、`bca diff --since` は明示" "的な要求です。解決できない ref、`git` の欠如、git 管理外の作業ディレクトリは" -"ハードエラー(終了コード 1)になります。`--since` は位置引数を最大 1 つ(変更" -"後サイド)しか取りません。2 つ渡すとエラーです。" +"ハードエラー(終了コード 1)になります。`--since` は位置引数を最大 1 つ(変" +"更後サイド)しか取りません。2 つ渡すとエラーです。" #: src/recipes/exporting-data.md:117 msgid "" -"`bca diff` exits 0 on success — it is informational, not a gate — unless the " -"opt-in `--exit-code` flag is passed, which exits 2 when the filtered diff is " -"non-empty. It replaces the former `json-minimal-tests` + `split-minimal-" -"tests.py` chain used to validate that a grammar bump did not regress " -"metrics; the `check-grammar-crate.py` helper now calls `bca diff` internally." +"`bca diff` exits 0 on success — it is informational, not a gate — unless " +"the opt-in `--exit-code` flag is passed, which exits 2 when the filtered " +"diff is non-empty. It replaces the former `json-minimal-tests` + `split-" +"minimal-tests.py` chain used to validate that a grammar bump did not " +"regress metrics; the `utils/check-grammar-crate.py` helper now calls `bca " +"diff` internally." msgstr "" "`bca diff` は成功時に 0 で終了します — ゲートではなく情報提供です — ただしオ" "プトインの `--exit-code` フラグを渡すと、フィルタ後の diff が空でない場合に " "2 で終了します。これは、文法バンプがメトリクスを退行させていないことの検証に" -"使われていた、かつての `json-minimal-tests` + `split-minimal-tests.py` チェー" -"ンを置き換えるものです。`check-grammar-crate.py` ヘルパーは現在、内部で `bca " -"diff` を呼び出します。" +"使われていた、かつての `json-minimal-tests` + `split-minimal-tests.py` " +"チェーンを置き換えるものです。`utils/check-grammar-crate.py` ヘルパーは現" +"在、内部で `bca diff` を呼び出します。" #: src/recipes/exporting-data.md:124 msgid "Pull a single metric across an entire tree" @@ -18117,8 +18798,8 @@ msgstr "ツリー全体から単一のメトリクスを取り出す" #: src/recipes/exporting-data.md:126 msgid "Combine streamed JSON output with `jq` to extract one value per file:" msgstr "" -"ストリームされた JSON 出力を `jq` と組み合わせて、ファイルごとに 1 つの値を抽" -"出します:" +"ストリームされた JSON 出力を `jq` と組み合わせて、ファイルごとに 1 つの値を" +"抽出します:" #: src/recipes/exporting-data.md:130 msgid "'{file: .name, mi: .metrics.mi.visual_studio}'" @@ -18126,8 +18807,9 @@ msgstr "'{file: .name, mi: .metrics.mi.visual_studio}'" #: src/recipes/exporting-data.md:133 msgid "" -"The same idea works for any metric — `cyclomatic.sum`, `cognitive.sum`, `loc." -"sloc`, and so on. Run `bca list-metrics descriptions` to see the catalog." +"The same idea works for any metric — `cyclomatic.sum`, `cognitive.sum`, " +"`loc.sloc`, and so on. Run `bca list-metrics descriptions` to see the " +"catalog." msgstr "" "同じ考え方はどのメトリクスにも使えます — `cyclomatic.sum`、`cognitive.sum`、" "`loc.sloc` など。カタログを見るには `bca list-metrics descriptions` を実行し" @@ -18139,7 +18821,8 @@ msgstr "実行時にメトリクスカタログを発見する" #: src/recipes/exporting-data.md:139 msgid "" -"Tooling that drives the CLI shouldn't hard-code metric names. Ask the binary:" +"Tooling that drives the CLI shouldn't hard-code metric names. Ask the " +"binary:" msgstr "" "CLI を駆動するツールはメトリクス名をハードコードすべきではありません。バイナ" "リに尋ねてください:" @@ -18176,87 +18859,100 @@ msgid "Each output file mirrors the input path under `/tmp/ops/`." msgstr "各出力ファイルは入力パスを `/tmp/ops/` 以下にミラーします。" #: src/recipes/exporting-data.md:172 +msgid "" +"Both lists are sorted, so re-running `ops` over unchanged sources produces " +"byte-identical output — safe to diff between runs, check into a repository, " +"or use as a cache key." +msgstr "" +"どちらのリストもソート済みなので、変更のないソースに対して `ops` を再実行す" +"るとバイト単位で同一の出力が得られます — 実行間で差分を取ったり、リポジトリ" +"にコミットしたり、キャッシュキーとして使ったりしても安全です。" + +#: src/recipes/exporting-data.md:176 msgid "Strip comments from a tree" msgstr "ツリーからコメントを除去する" -#: src/recipes/exporting-data.md:174 +#: src/recipes/exporting-data.md:178 msgid "" "`strip-comments` rewrites source so that downstream tools that don't " "understand comment syntax can still consume the code. Output routing has " "three modes:" msgstr "" -"`strip-comments` は、コメント構文を理解しない下流のツールでもコードを利用でき" -"るようにソースを書き換えます。出力ルーティングには 3 つのモードがあります:" +"`strip-comments` は、コメント構文を理解しない下流のツールでもコードを利用で" +"きるようにソースを書き換えます。出力ルーティングには 3 つのモードがありま" +"す:" -#: src/recipes/exporting-data.md:178 +#: src/recipes/exporting-data.md:182 msgid "" "**stdout (default).** With neither flag, the stripped source streams to " "stdout — best for a single file in a pipeline." msgstr "" -"**stdout(デフォルト)。** どちらのフラグもない場合、除去済みソースは stdout " -"にストリームされます — パイプライン内の単一ファイルに最適です。" +"**stdout(デフォルト)。** どちらのフラグもない場合、除去済みソースは " +"stdout にストリームされます — パイプライン内の単一ファイルに最適です。" -#: src/recipes/exporting-data.md:180 +#: src/recipes/exporting-data.md:184 msgid "" "**`--output` / `-o ` (single file).** Writes the stripped source to " "``, leaving the input untouched. Only meaningful for one input file; " "mutually exclusive with `--in-place`." msgstr "" -"**`--output` / `-o `(単一ファイル)。** 除去済みソースを `` に書" -"き出し、入力はそのまま残します。入力ファイルが 1 つの場合にのみ意味を持ち、" -"`--in-place` とは相互排他です。" +"**`--output` / `-o `(単一ファイル)。** 除去済みソースを `` に" +"書き出し、入力はそのまま残します。入力ファイルが 1 つの場合にのみ意味を持" +"ち、`--in-place` とは相互排他です。" -#: src/recipes/exporting-data.md:183 +#: src/recipes/exporting-data.md:187 msgid "" -"**`--in-place` (multi-file).** Rewrites each matched input file on disk. Use " -"this for a whole tree; mutually exclusive with `--output`." +"**`--in-place` (multi-file).** Rewrites each matched input file on disk. " +"Use this for a whole tree; mutually exclusive with `--output`." msgstr "" -"**`--in-place`(複数ファイル)。** マッチした各入力ファイルをディスク上で書き" -"換えます。ツリー全体にはこれを使ってください。`--output` とは相互排他です。" +"**`--in-place`(複数ファイル)。** マッチした各入力ファイルをディスク上で書" +"き換えます。ツリー全体にはこれを使ってください。`--output` とは相互排他で" +"す。" -#: src/recipes/exporting-data.md:187 +#: src/recipes/exporting-data.md:191 msgid "# Stream a single file with comments removed.\n" msgstr "# コメントを除去した単一ファイルをストリーム出力する。\n" -#: src/recipes/exporting-data.md:189 +#: src/recipes/exporting-data.md:193 msgid "# Write a single stripped file to a new path (input untouched).\n" -msgstr "# 除去済みの単一ファイルを新しいパスに書き出す(入力は変更しない)。\n" +msgstr "" +"# 除去済みの単一ファイルを新しいパスに書き出す(入力は変更しない)。\n" -#: src/recipes/exporting-data.md:192 +#: src/recipes/exporting-data.md:196 msgid "# Rewrite every Python file in src/ in place.\n" msgstr "# src/ 内のすべての Python ファイルをインプレースで書き換える。\n" -#: src/recipes/exporting-data.md:198 +#: src/recipes/exporting-data.md:202 msgid "" "`--in-place` is destructive — make sure the tree is committed or backed up " "first. Passing both `--in-place` and `--output` is a usage error." msgstr "" "`--in-place` は破壊的です — 事前にツリーがコミット済みまたはバックアップ済み" -"であることを確認してください。`--in-place` と `--output` の両方を渡すのは使用" -"方法エラーです。" +"であることを確認してください。`--in-place` と `--output` の両方を渡すのは使" +"用方法エラーです。" #: src/recipes/rest-api.md:3 msgid "" "`bca-web` exposes the same analysis primitives over HTTP. Use it when the " -"consumer is a long-running service (an editor plugin, CI worker, or web app) " -"that should not pay the cost of spawning the CLI per file." +"consumer is a long-running service (an editor plugin, CI worker, or web " +"app) that should not pay the cost of spawning the CLI per file." msgstr "" "`bca-web` は同じ分析プリミティブを HTTP 経由で公開します。コンシューマーが長" -"時間稼働するサービス(エディタープラグイン、CI ワーカー、Web アプリ)で、ファ" -"イルごとに CLI を起動するコストを払うべきでない場合に使ってください。" +"時間稼働するサービス(エディタープラグイン、CI ワーカー、Web アプリ)で、" +"ファイルごとに CLI を起動するコストを払うべきでない場合に使ってください。" #: src/recipes/rest-api.md:8 msgid "" "For the full endpoint reference, see [Rest API](../commands/rest.md). The " -"recipes below show practical end-to-end calls with `curl`. Every endpoint is " -"mounted under the `/v1` prefix; the old unprefixed paths were removed at the " -"2.0 release (#637) and now return `404`." +"recipes below show practical end-to-end calls with `curl`. Every endpoint " +"is mounted under the `/v1` prefix; the old unprefixed paths were removed at " +"the 2.0 release (#637) and now return `404`." msgstr "" -"エンドポイントの完全なリファレンスは [Rest API](../commands/rest.md) を参照し" -"てください。以下のレシピは `curl` を使った実践的なエンドツーエンドの呼び出し" -"を示します。すべてのエンドポイントは `/v1` プレフィックスの下にマウントされま" -"す。旧来のプレフィックスなしパスは 2.0 リリース(#637)で削除され、現在は " -"`404` を返します。" +"エンドポイントの完全なリファレンスは [Rest API](../commands/rest.md) を参照" +"してください。以下のレシピは `curl` を使った実践的なエンドツーエンドの呼び出" +"しを示します。すべてのエンドポイントは `/v1` プレフィックスの下にマウントさ" +"れます。旧来のプレフィックスなしパスは 2.0 リリース(#637)で削除され、現在" +"は `404` を返します。" #: src/recipes/rest-api.md:13 msgid "Start the server" @@ -18283,14 +18979,14 @@ msgid "" "`/ping` returns `200 OK` with an empty body — `curl -sf` exits 0 on success " "and non-zero on any HTTP error, which is what scripts want." msgstr "" -"`/ping` は空のボディで `200 OK` を返します — `curl -sf` は成功時に 0、HTTP エ" -"ラー時に非ゼロで終了し、これはまさにスクリプトが望む挙動です。" +"`/ping` は空のボディで `200 OK` を返します — `curl -sf` は成功時に 0、HTTP " +"エラー時に非ゼロで終了し、これはまさにスクリプトが望む挙動です。" #: src/recipes/rest-api.md:29 msgid "" -"For building, flag and environment-variable tuning, resource limits, and the " -"security posture of the daemon itself, see [Operating bca-web](../commands/" -"web-server.md)." +"For building, flag and environment-variable tuning, resource limits, and " +"the security posture of the daemon itself, see [Operating bca-web](../" +"commands/web-server.md)." msgstr "" "ビルド、フラグや環境変数のチューニング、リソース制限、デーモン自体のセキュリ" "ティ態勢については、[bca-web の運用](../commands/web-server.md) を参照してく" @@ -18327,8 +19023,8 @@ msgid "" "language from `file_name`, so the extension matters." msgstr "" "`scope: \"file\"` はトップレベルのメトリクスのみを返します。`\"full\"`(デ" -"フォルト)はスニペット内のすべての関数・クラススペースを歩きます。サーバーは " -"`file_name` から言語を推測するため、拡張子が重要です。" +"フォルト)はスニペット内のすべての関数・クラススペースを歩きます。サーバー" +"は `file_name` から言語を推測するため、拡張子が重要です。" #: src/recipes/rest-api.md:51 msgid "Compute metrics for a file from disk" @@ -18336,8 +19032,8 @@ msgstr "ディスク上のファイルのメトリクスを計算する" #: src/recipes/rest-api.md:53 msgid "" -"`curl --data-binary` plus `jq` makes it easy to package a real file into the " -"JSON envelope the server expects:" +"`curl --data-binary` plus `jq` makes it easy to package a real file into " +"the JSON envelope the server expects:" msgstr "" "`curl --data-binary` と `jq` を組み合わせれば、実ファイルをサーバーが期待す" "る JSON エンベロープへ簡単に詰め込めます:" @@ -18360,13 +19056,13 @@ msgstr "'.root.metrics.cyclomatic, .root.metrics.cognitive'" #: src/recipes/rest-api.md:68 msgid "" -"This pattern — `jq -n --rawfile` to build the request, `curl --data-binary @-" -"` to stream it — is the easiest way to avoid quoting problems with multi-" +"This pattern — `jq -n --rawfile` to build the request, `curl --data-binary " +"@-` to stream it — is the easiest way to avoid quoting problems with multi-" "line source code." msgstr "" "このパターン — リクエストを組み立てる `jq -n --rawfile` と、それをストリーム" -"する `curl --data-binary @-` — は、複数行のソースコードでの引用符の問題を避け" -"る最も簡単な方法です。" +"する `curl --data-binary @-` — は、複数行のソースコードでの引用符の問題を避" +"ける最も簡単な方法です。" #: src/recipes/rest-api.md:72 msgid "Strip comments through the API" @@ -18377,8 +19073,8 @@ msgid "" "The endpoint is `/comment` (singular). It has two variants selected by " "`Content-Type`:" msgstr "" -"エンドポイントは `/comment`(単数形)です。`Content-Type` で選択される 2 つの" -"バリアントがあります:" +"エンドポイントは `/comment`(単数形)です。`Content-Type` で選択される 2 つ" +"のバリアントがあります:" #: src/recipes/rest-api.md:77 msgid "" @@ -18386,9 +19082,9 @@ msgid "" "`code` field is a **byte array**, not a string, because the underlying API " "is byte-oriented." msgstr "" -"`application/json` — リクエストとレスポンスを JSON でラップします。レスポンス" -"の `code` フィールドは文字列ではなく**バイト配列**です。下層の API がバイト指" -"向のためです。" +"`application/json` — リクエストとレスポンスを JSON でラップします。レスポン" +"スの `code` フィールドは文字列ではなく**バイト配列**です。下層の API がバイ" +"ト指向のためです。" #: src/recipes/rest-api.md:80 msgid "" @@ -18396,9 +19092,9 @@ msgid "" "returns the stripped source as the raw response body. This is by far the " "easiest variant to use from the shell." msgstr "" -"`application/octet-stream` — ソースを生のリクエストボディとして受け取り、除去" -"済みソースを生のレスポンスボディとして返します。シェルから使うには断然これが" -"最も簡単なバリアントです。" +"`application/octet-stream` — ソースを生のリクエストボディとして受け取り、除" +"去済みソースを生のレスポンスボディとして返します。シェルから使うには断然これ" +"が最も簡単なバリアントです。" #: src/recipes/rest-api.md:84 msgid "Octet-stream form (recommended for one-off shell use):" @@ -18422,11 +19118,12 @@ msgstr "# => print(\"hi\")\n" #: src/recipes/rest-api.md:93 msgid "" -"JSON form (use when your client speaks JSON natively). Decode the byte array " -"with `jq … | implode` for ASCII / UTF-8 source:" +"JSON form (use when your client speaks JSON natively). Decode the byte " +"array with `jq … | implode` for ASCII / UTF-8 source:" msgstr "" -"JSON 形式(クライアントがネイティブに JSON を扱う場合に使用します)。ASCII / " -"UTF-8 のソースであれば、バイト配列は `jq … | implode` でデコードできます:" +"JSON 形式(クライアントがネイティブに JSON を扱う場合に使用します)。" +"ASCII / UTF-8 のソースであれば、バイト配列は `jq … | implode` でデコードでき" +"ます:" #: src/recipes/rest-api.md:99 msgid "" @@ -18451,8 +19148,8 @@ msgid "" "The JSON response carries the same `id` you sent, so a client that " "multiplexes many requests can correlate them." msgstr "" -"JSON レスポンスには送信した `id` がそのまま含まれるため、多数のリクエストを多" -"重化するクライアントでも対応付けができます。" +"JSON レスポンスには送信した `id` がそのまま含まれるため、多数のリクエストを" +"多重化するクライアントでも対応付けができます。" #: src/recipes/rest-api.md:110 msgid "Extract function spans for an editor plugin" @@ -18482,9 +19179,9 @@ msgstr "'.spans'" #: src/recipes/rest-api.md:125 msgid "" -"Each entry has `name`, `start_line`, `end_line`, and an `error` boolean (set " -"when the parser flagged the function span as malformed) — enough for an " -"editor to draw a function navigator without re-parsing the file locally." +"Each entry has `name`, `start_line`, `end_line`, and an `error` boolean " +"(set when the parser flagged the function span as malformed) — enough for " +"an editor to draw a function navigator without re-parsing the file locally." msgstr "" "各エントリには `name`、`start_line`、`end_line`、および `error` ブール値" "(パーサーが関数スパンを不正と判定した場合に設定されます)が含まれます。エ" @@ -18511,15 +19208,15 @@ msgstr "" msgid "" "**Security:** unlike the other endpoints, `/vcs` takes a server-side " "`repo_path` and will walk any git repository the server process can read, " -"returning that repo's file paths and change signals. Do not expose `/vcs` to " -"untrusted clients without an authorization layer; the default `127.0.0.1` " -"bind keeps it local." +"returning that repo's file paths and change signals. Do not expose `/vcs` " +"to untrusted clients without an authorization layer; the default " +"`127.0.0.1` bind keeps it local." msgstr "" "**セキュリティ:** 他のエンドポイントと異なり、`/vcs` はサーバー側の " -"`repo_path` を受け取り、サーバープロセスが読み取れる任意の git リポジトリを走" -"査して、そのリポジトリのファイルパスと変更シグナルを返します。認可レイヤーな" -"しで `/vcs` を信頼できないクライアントに公開しないでください。デフォルトの " -"`127.0.0.1` バインドであればローカルに閉じたままになります。" +"`repo_path` を受け取り、サーバープロセスが読み取れる任意の git リポジトリを" +"走査して、そのリポジトリのファイルパスと変更シグナルを返します。認可レイヤー" +"なしで `/vcs` を信頼できないクライアントに公開しないでください。デフォルト" +"の `127.0.0.1` バインドであればローカルに閉じたままになります。" #: src/recipes/rest-api.md:147 msgid "" @@ -18542,14 +19239,14 @@ msgstr "'.files[] | {path, risk_score, churn_recent}'" #: src/recipes/rest-api.md:155 msgid "" "The body accepts the same knobs as `bca vcs` (`long_window`, " -"`recent_window`, `top`, `ref`, `risk_formula`, `file_types`, `full_history`, " -"`include_merges`, `follow_renames`, `exclude_bots`, `bot_pattern`, `as_of`, " -"`emit_author_details`, `include_deleted`, `bus_factor_threshold`, " -"`no_cache`, `cache_dir`) as optional fields. `file_types` scopes the ranking " -"(`metrics` — the default — / `all` / a `rs,py`\\-style extension list), " -"mirroring the CLI `--file-types`. A `repo_path` that is not a git working " -"tree, or a malformed window / timestamp / formula / scope, returns `400` " -"with the uniform JSON error body." +"`recent_window`, `top`, `ref`, `risk_formula`, `file_types`, " +"`full_history`, `include_merges`, `follow_renames`, `exclude_bots`, " +"`bot_pattern`, `as_of`, `emit_author_details`, `include_deleted`, " +"`bus_factor_threshold`, `no_cache`, `cache_dir`) as optional fields. " +"`file_types` scopes the ranking (`metrics` — the default — / `all` / a `rs," +"py`\\-style extension list), mirroring the CLI `--file-types`. A " +"`repo_path` that is not a git working tree, or a malformed window / " +"timestamp / formula / scope, returns `400` with the uniform JSON error body." msgstr "" "本文には `bca vcs` と同じ調整項目(`long_window`、`recent_window`、`top`、" "`ref`、`risk_formula`、`file_types`、`full_history`、`include_merges`、" @@ -18558,8 +19255,8 @@ msgstr "" "`no_cache`、`cache_dir`)を省略可能なフィールドとして指定できます。" "`file_types` はランキングの対象範囲を絞り込み(デフォルトの `metrics` / " "`all` / `rs,py` 形式の拡張子リスト)、CLI の `--file-types` に対応します。" -"git 作業ツリーでない `repo_path` や、不正なウィンドウ / タイムスタンプ / 計算" -"式 / 対象範囲を指定した場合は、統一 JSON エラー本文とともに `400` が返りま" +"git 作業ツリーでない `repo_path` や、不正なウィンドウ / タイムスタンプ / 計" +"算式 / 対象範囲を指定した場合は、統一 JSON エラー本文とともに `400` が返りま" "す。" #: src/recipes/rest-api.md:166 @@ -18605,8 +19302,8 @@ msgid "" "A point count below 2 (or above the supported maximum) returns `400` with " "the uniform JSON error body, like the other bad-request cases." msgstr "" -"ポイント数が 2 未満(またはサポートされる上限を超える場合)は、他の不正リクエ" -"ストの場合と同様に、統一 JSON エラー本文とともに `400` が返ります。" +"ポイント数が 2 未満(またはサポートされる上限を超える場合)は、他の不正リク" +"エストの場合と同様に、統一 JSON エラー本文とともに `400` が返ります。" #: src/recipes/rest-api.md:190 msgid "Just-in-time commit / diff scoring" @@ -18620,9 +19317,9 @@ msgid "" "`recent_window` / `full_history` / `include_merges` / `follow_renames` / " "`as_of` knobs; it returns the commit `JitReport` JSON with the echoed `id`." msgstr "" -"`POST /vcs/jit` は単一のコミットをスコアリングします([ジャストインタイムスコ" -"アリング](../commands/vcs.md#just-in-time-commit-level-scoring)を参照)。本文" -"には `repo_path`、`commit`(デフォルト `HEAD`)と、`long_window` / " +"`POST /vcs/jit` は単一のコミットをスコアリングします([ジャストインタイムス" +"コアリング](../commands/vcs.md#just-in-time-commit-level-scoring)を参照)。" +"本文には `repo_path`、`commit`(デフォルト `HEAD`)と、`long_window` / " "`recent_window` / `full_history` / `include_merges` / `follow_renames` / " "`as_of` の各調整項目を指定します。エコーバックされた `id` を含むコミットの " "`JitReport` JSON が返ります。" @@ -18641,9 +19338,9 @@ msgstr "'{risk_score, purpose: .commit.purpose}'" #: src/recipes/rest-api.md:207 msgid "" -"To score an arbitrary diff instead, send a `diff` field carrying the unified " -"diff (no `repo_path` needed). The response is then the _partial_ report — " -"`source: \"diff\"`, a `partial_risk_score`, and **no** history / " +"To score an arbitrary diff instead, send a `diff` field carrying the " +"unified diff (no `repo_path` needed). The response is then the _partial_ " +"report — `source: \"diff\"`, a `partial_risk_score`, and **no** history / " "experience / purpose groups, which are absent rather than zero. The partial " "score is **not comparable** to a commit score." msgstr "" @@ -18676,8 +19373,8 @@ msgstr "CI から API を呼び出す" #: src/recipes/rest-api.md:225 msgid "" "The server starts in milliseconds, so for short-lived CI jobs it's often " -"simplest to start it as a background process inside the job and tear it down " -"at the end:" +"simplest to start it as a background process inside the job and tear it " +"down at the end:" msgstr "" "サーバーはミリ秒単位で起動するため、短時間で終わる CI ジョブでは、ジョブ内で" "バックグラウンドプロセスとして起動し、最後に停止するのが最も簡単なことが多い" @@ -18704,13 +19401,13 @@ msgid "" "For longer-lived workers, run the server as a systemd unit (or container) " "and point your jobs at its host/port." msgstr "" -"長時間稼働するワーカーでは、サーバーを systemd ユニット(またはコンテナ)とし" -"て実行し、ジョブからそのホスト / ポートを参照してください。" +"長時間稼働するワーカーでは、サーバーを systemd ユニット(またはコンテナ)と" +"して実行し、ジョブからそのホスト / ポートを参照してください。" #: src/library/index.md:3 msgid "" -"`big-code-analysis` is published on [crates.io](https://crates.io/crates/big-" -"code-analysis) as a Rust library. The CLI (`bca`) and REST server (`bca-" +"`big-code-analysis` is published on [crates.io](https://crates.io/crates/" +"big-code-analysis) as a Rust library. The CLI (`bca`) and REST server (`bca-" "web`) are both thin wrappers around the same public API, so anything they " "can do you can do directly from your own crate." msgstr "" @@ -18746,29 +19443,29 @@ msgid "" "when scoring thousands of files in a custom tool, IDE plugin, or static-" "analysis pipeline." msgstr "" -"**インプロセス分析。** カスタムツール、IDE プラグイン、静的解析パイプラインで" -"数千のファイルをスコアリングする際に、ファイルごとにサブプロセスを起動するコ" -"ストを回避します。" +"**インプロセス分析。** カスタムツール、IDE プラグイン、静的解析パイプライン" +"で数千のファイルをスコアリングする際に、ファイルごとにサブプロセスを起動する" +"コストを回避します。" #: src/library/index.md:22 msgid "" "**In-memory source.** Score generated, pre-processed, or streamed source " -"without writing it to disk first. See [Analyzing in-memory source](in-memory." -"md)." +"without writing it to disk first. See [Analyzing in-memory source](in-" +"memory.md)." msgstr "" -"**インメモリソース。** 生成された、前処理済みの、あるいはストリーミングされた" -"ソースを、先にディスクへ書き出すことなくスコアリングします。[インメモリソース" -"の分析](in-memory.md)を参照してください。" +"**インメモリソース。** 生成された、前処理済みの、あるいはストリーミングされ" +"たソースを、先にディスクへ書き出すことなくスコアリングします。[インメモリ" +"ソースの分析](in-memory.md)を参照してください。" #: src/library/index.md:25 msgid "" -"**Selective walking.** Drive a custom traversal over the `FuncSpace` tree to " -"extract per-function metrics on your own schedule. See [Walking FuncSpace " -"results](walking-funcspace.md)." +"**Selective walking.** Drive a custom traversal over the `FuncSpace` tree " +"to extract per-function metrics on your own schedule. See [Walking " +"FuncSpace results](walking-funcspace.md)." msgstr "" -"**選択的な走査。** `FuncSpace` ツリーを独自に走査し、関数ごとのメトリクスを任" -"意のタイミングで抽出します。[FuncSpace 結果の走査](walking-funcspace.md)を参" -"照してください。" +"**選択的な走査。** `FuncSpace` ツリーを独自に走査し、関数ごとのメトリクスを" +"任意のタイミングで抽出します。[FuncSpace 結果の走査](walking-funcspace.md)を" +"参照してください。" #: src/library/index.md:28 msgid "" @@ -18794,8 +19491,8 @@ msgstr "現在提供している内容" #: src/library/index.md:37 msgid "" -"[Quick start](quick-start.md) — parse a string, get a `FuncSpace`, print the " -"cognitive complexity." +"[Quick start](quick-start.md) — parse a string, get a `FuncSpace`, print " +"the cognitive complexity." msgstr "" "[クイックスタート](quick-start.md) — 文字列をパースし、`FuncSpace` を取得し" "て、認知的複雑度を出力します。" @@ -18805,8 +19502,8 @@ msgid "" "[Analyzing in-memory source](in-memory.md) — feed source from a buffer " "rather than a file." msgstr "" -"[インメモリソースの分析](in-memory.md) — ファイルではなくバッファからソースを" -"与えます。" +"[インメモリソースの分析](in-memory.md) — ファイルではなくバッファからソース" +"を与えます。" #: src/library/index.md:41 msgid "" @@ -18831,9 +19528,9 @@ msgid "" "find nodes by kind, detect parse errors, or build a symbol table alongside " "the metrics walk." msgstr "" -"[AST を直接走査する](ast-traversal.md) — 構文要素のカウント、種類によるノード" -"の検索、パースエラーの検出、メトリクス走査と並行したシンボルテーブルの構築を" -"行います。" +"[AST を直接走査する](ast-traversal.md) — 構文要素のカウント、種類によるノー" +"ドの検索、パースエラーの検出、メトリクス走査と並行したシンボルテーブルの構築" +"を行います。" #: src/library/index.md:49 msgid "" @@ -18841,9 +19538,9 @@ msgid "" "need with `MetricsOptions::with_only`, including how dependent metrics pull " "in their inputs." msgstr "" -"[メトリクスの選択](selecting-metrics.md) — `MetricsOptions::with_only` で必要" -"なメトリクスだけを計算します。依存するメトリクスが入力をどう引き込むかも説明" -"します。" +"[メトリクスの選択](selecting-metrics.md) — `MetricsOptions::with_only` で必" +"要なメトリクスだけを計算します。依存するメトリクスが入力をどう引き込むかも説" +"明します。" #: src/library/index.md:52 msgid "" @@ -18855,19 +19552,19 @@ msgstr "" #: src/library/index.md:54 msgid "" -"[Error handling](error-handling.md) — what `Result` " -"means today and how to turn it into a useful diagnostic." +"[Error handling](error-handling.md) — what `Result` means today and how to turn it into a useful diagnostic." msgstr "" -"[エラー処理](error-handling.md) — 現在の `Result` の" -"意味と、それを有用な診断へ変換する方法です。" +"[エラー処理](error-handling.md) — 現在の `Result` " +"の意味と、それを有用な診断へ変換する方法です。" #: src/library/index.md:56 msgid "" "[Stability and versioning](stability.md) — what you can and cannot rely on " "across the `2.x` line." msgstr "" -"[安定性とバージョニング](stability.md) — `2.x` 系を通じて信頼できるもの・でき" -"ないものです。" +"[安定性とバージョニング](stability.md) — `2.x` 系を通じて信頼できるもの・で" +"きないものです。" #: src/library/index.md:59 msgid "A note on API stability" @@ -18881,11 +19578,11 @@ msgid "" "bump. Every example in this section compiles against the current published " "crate and is expected to keep compiling across `2.x` without edits." msgstr "" -"このライブラリは `2.x` 系にあり、明文化された[安定性契約](stability.md)のもと" -"で提供されています。公開 API の形状はパッチおよびマイナーバンプの間で安定に保" -"たれ、破壊的変更は次のメジャーバンプまで保留されます。このセクションのすべて" -"の例は現在公開中のクレートに対してコンパイルでき、`2.x` の間は修正なしでコン" -"パイルできることが期待されます。" +"このライブラリは `2.x` 系にあり、明文化された[安定性契約](stability.md)のも" +"とで提供されています。公開 API の形状はパッチおよびマイナーバンプの間で安定" +"に保たれ、破壊的変更は次のメジャーバンプまで保留されます。このセクションのす" +"べての例は現在公開中のクレートに対してコンパイルでき、`2.x` の間は修正なしで" +"コンパイルできることが期待されます。" #: src/library/index.md:68 msgid "" @@ -18897,14 +19594,14 @@ msgid "" msgstr "" "メトリクスの _値_ は、文法のピンが移動したりメトリクス定義が修正されたりする" "と、マイナーバンプの間でも変動することがあります。この例外については " -"[STABILITY.md § What is stable in value](https://github.com/dekobon/big-code-" -"analysis/blob/main/STABILITY.md#what-is-stable-in-value) を参照してください。" -"各変動は、それを導入する changelog エントリで明示されます。" +"[STABILITY.md § What is stable in value](https://github.com/dekobon/big-" +"code-analysis/blob/main/STABILITY.md#what-is-stable-in-value) を参照してくだ" +"さい。各変動は、それを導入する changelog エントリで明示されます。" #: src/library/quick-start.md:3 msgid "" -"This page walks through the minimum amount of code needed to compute metrics " -"from a string of source code." +"This page walks through the minimum amount of code needed to compute " +"metrics from a string of source code." msgstr "" "このページでは、ソースコードの文字列からメトリクスを計算するのに必要な最小限" "のコードを説明します。" @@ -18945,19 +19642,20 @@ msgstr "2. 文字列からメトリクスを計算する" #: src/library/quick-start.md:22 msgid "" -"The recommended entry point is [`analyze`](https://docs.rs/big-code-analysis/" -"*/big_code_analysis/fn.analyze.html): pass a [`Source`](https://docs.rs/big-" -"code-analysis/*/big_code_analysis/struct.Source.html) carrying the language, " -"source bytes, and an optional display name, plus a [`MetricsOptions`]" -"(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.MetricsOptions." -"html) for any per-traversal flags. No filesystem path is needed." +"The recommended entry point is [`analyze`](https://docs.rs/big-code-" +"analysis/*/big_code_analysis/fn.analyze.html): pass a [`Source`](https://" +"docs.rs/big-code-analysis/*/big_code_analysis/struct.Source.html) carrying " +"the language, source bytes, and an optional display name, plus a " +"[`MetricsOptions`](https://docs.rs/big-code-analysis/*/big_code_analysis/" +"struct.MetricsOptions.html) for any per-traversal flags. No filesystem path " +"is needed." msgstr "" "推奨エントリポイントは [`analyze`](https://docs.rs/big-code-analysis/*/" -"big_code_analysis/fn.analyze.html) です。言語、ソースバイト列、省略可能な表示" -"名を持つ [`Source`](https://docs.rs/big-code-analysis/*/big_code_analysis/" +"big_code_analysis/fn.analyze.html) です。言語、ソースバイト列、省略可能な表" +"示名を持つ [`Source`](https://docs.rs/big-code-analysis/*/big_code_analysis/" "struct.Source.html) と、走査ごとのフラグを指定する [`MetricsOptions`]" -"(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.MetricsOptions." -"html) を渡します。ファイルシステムのパスは不要です。" +"(https://docs.rs/big-code-analysis/*/big_code_analysis/struct." +"MetricsOptions.html) を渡します。ファイルシステムのパスは不要です。" #: src/library/quick-start.md:31 msgid "\"fn add(a: i32, b: i32) -> i32 { a + b }\"" @@ -18991,23 +19689,23 @@ msgid "" "matching patterns. `MetricsError` is `#[non_exhaustive]`, so always include " "a `_` arm when matching." msgstr "" -"`Source::name` はトップレベルの [`FuncSpace::name`](https://docs.rs/big-code-" -"analysis/*/big_code_analysis/struct.FuncSpace.html#structfield.name) になりま" -"す。`None` を渡すとトップレベルの名前は未設定のままです。戻り値の型は " +"`Source::name` はトップレベルの [`FuncSpace::name`](https://docs.rs/big-" +"code-analysis/*/big_code_analysis/struct.FuncSpace.html#structfield.name) に" +"なります。`None` を渡すとトップレベルの名前は未設定のままです。戻り値の型は " "[`Result`](https://docs.rs/big-code-analysis/*/" "big_code_analysis/enum.MetricsError.html) です。実際には、`Err` バリアントは" -"要求した言語の Cargo フィーチャがこのビルドで無効であることを意味します。パー" -"スの失敗は `Err` を生み**ません**(tree-sitter は `ERROR` ノードで復旧しま" -"す)。バリアントの一覧とマッチングのパターンは[エラー処理](error-handling.md)" -"を参照してください。`MetricsError` は `#[non_exhaustive]` なので、マッチする" -"際は必ず `_` アームを含めてください。" +"要求した言語の Cargo フィーチャがこのビルドで無効であることを意味します。" +"パースの失敗は `Err` を生み**ません**(tree-sitter は `ERROR` ノードで復旧し" +"ます)。バリアントの一覧とマッチングのパターンは[エラー処理](error-handling." +"md)を参照してください。`MetricsError` は `#[non_exhaustive]` なので、マッチ" +"する際は必ず `_` アームを含めてください。" #: src/library/quick-start.md:57 msgid "" "Tip: `use big_code_analysis::prelude::*;` brings the recommended entry " "points (`analyze`, `Ast`, `Source`, `MetricsOptions`, `MetricsError`, " -"`LANG`, `FuncSpace`, `CodeMetrics`, `SpaceKind`, `Metric`) into scope in one " -"line. Anything outside the prelude can still be reached by name — for " +"`LANG`, `FuncSpace`, `CodeMetrics`, `SpaceKind`, `Metric`) into scope in " +"one line. Anything outside the prelude can still be reached by name — for " "example `use big_code_analysis::guess_language;`." msgstr "" "ヒント: `use big_code_analysis::prelude::*;` で、推奨エントリポイント" @@ -19027,15 +19725,15 @@ msgid "" "analysis/*/big_code_analysis/struct.Ast.html#method.from_tree_sitter) (see " "[Reusing an existing tree-sitter Tree](reuse-tree.md))." msgstr "" -"一度のパースからメトリクス以外のもの(演算子 / オペランド、AST ダンプ、関数ス" -"パンの一覧)が必要ですか?その場合は [`Ast::parse`](https://docs.rs/big-code-" -"analysis/*/big_code_analysis/struct.Ast.html#method.parse) で一度だけパース" -"し、ハンドルに対してパスごとのメソッドを呼び出してください。[一度のパースでメ" -"トリクスを何度も実行する](parse-once.md)を参照してください。すでに独自の " -"`tree_sitter::Parser` を使用している場合は、生成されたツリーを [`Ast::" -"from_tree_sitter`](https://docs.rs/big-code-analysis/*/big_code_analysis/" -"struct.Ast.html#method.from_tree_sitter) で取り込みます([既存の tree-sitter " -"Tree の再利用](reuse-tree.md)を参照)。" +"一度のパースからメトリクス以外のもの(演算子 / オペランド、AST ダンプ、関数" +"スパンの一覧)が必要ですか?その場合は [`Ast::parse`](https://docs.rs/big-" +"code-analysis/*/big_code_analysis/struct.Ast.html#method.parse) で一度だけ" +"パースし、ハンドルに対してパスごとのメソッドを呼び出してください。[一度の" +"パースでメトリクスを何度も実行する](parse-once.md)を参照してください。すでに" +"独自の `tree_sitter::Parser` を使用している場合は、生成されたツリーを " +"[`Ast::from_tree_sitter`](https://docs.rs/big-code-analysis/*/" +"big_code_analysis/struct.Ast.html#method.from_tree_sitter) で取り込みます" +"([既存の tree-sitter Tree の再利用](reuse-tree.md)を参照)。" #: src/library/quick-start.md:75 msgid "3. What you got back" @@ -19050,10 +19748,10 @@ msgid "" "metric at any level of granularity." msgstr "" "`FuncSpace` はスペースのツリーです。トップレベルのノードはファイル全体を表" -"し、その `spaces` フィールドが入れ子の関数 / クラス / impl スペースを保持しま" -"す。すべてのノードが同じ [`CodeMetrics`](https://docs.rs/big-code-analysis/*/" -"big_code_analysis/struct.CodeMetrics.html) 構造体を持つため、どの粒度のレベル" -"でも任意のメトリクスを読み取れます。" +"し、その `spaces` フィールドが入れ子の関数 / クラス / impl スペースを保持し" +"ます。すべてのノードが同じ [`CodeMetrics`](https://docs.rs/big-code-" +"analysis/*/big_code_analysis/struct.CodeMetrics.html) 構造体を持つため、どの" +"粒度のレベルでも任意のメトリクスを読み取れます。" #: src/library/quick-start.md:86 msgid "" @@ -19097,8 +19795,8 @@ msgid "" "shebang in that order:" msgstr "" "言語が事前にわからない場合は [`guess_language`](https://docs.rs/big-code-" -"analysis/*/big_code_analysis/fn.guess_language.html) を使用してください。パス" -"の拡張子、バッファ内の Emacs モード行、シバンの順に調べます:" +"analysis/*/big_code_analysis/fn.guess_language.html) を使用してください。パ" +"スの拡張子、バッファ内の Emacs モード行、シバンの順に調べます:" #: src/library/quick-start.md:119 msgid "b\"print('hi')\\n\"" @@ -19126,8 +19824,8 @@ msgstr "いつ何が変わるか" #: src/library/quick-start.md:139 msgid "" -"The recommended entry point is `analyze(Source, MetricsOptions)` and returns " -"`Result`." +"The recommended entry point is `analyze(Source, MetricsOptions)` and " +"returns `Result`." msgstr "" "推奨エントリポイントは `analyze(Source, MetricsOptions)` で、" "`Result` を返します。" @@ -19137,11 +19835,18 @@ msgid "" "`big-code-analysis` never requires source to live on disk. The recommended " "entry point [`analyze`](https://docs.rs/big-code-analysis/*/" "big_code_analysis/fn.analyze.html) takes a [`Source`](https://docs.rs/big-" -"code-analysis/*/big_code_analysis/struct.Source.html) carrying the language, " -"source bytes, and an _optional_ caller-supplied display name; no filesystem " -"path is involved unless the C/C++ preprocessor lookup needs one (`Source::" -"preproc_path`)." -msgstr "`big-code-analysis` はソースがディスク上にあることを要求しません。推奨エントリポイント [`analyze`](https://docs.rs/big-code-analysis/*/big_code*analysis/fn.analyze.html) は、言語、ソースバイト列、* 省略可能な_ 呼び出し側指定の表示名を持つ [`Source`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct.Source.html) を受け取ります。C/C++ プリプロセッサの参照でパスが必要になる場合(`Source::preproc_path`)を除き、ファイルシステムのパスは関与しません。" +"code-analysis/*/big_code_analysis/struct.Source.html) carrying the " +"language, source bytes, and an _optional_ caller-supplied display name; no " +"filesystem path is involved unless the C/C++ preprocessor lookup needs one " +"(`Source::preproc_path`)." +msgstr "" +"`big-code-analysis` はソースがディスク上にあることを要求しません。推奨エント" +"リポイント [`analyze`](https://docs.rs/big-code-analysis/*/" +"big_code*analysis/fn.analyze.html) は、言語、ソースバイト列、* 省略可能な_ " +"呼び出し側指定の表示名を持つ [`Source`](https://docs.rs/big-code-analysis/*/" +"big_code_analysis/struct.Source.html) を受け取ります。C/C++ プリプロセッサの" +"参照でパスが必要になる場合(`Source::preproc_path`)を除き、ファイルシステム" +"のパスは関与しません。" #: src/library/in-memory.md:9 msgid "This is useful for:" @@ -19156,8 +19861,8 @@ msgid "" "Scoring **pre-processed** or **bundled** source (e.g. after a template " "expansion)." msgstr "" -"**前処理済み*「または」*バンドル済み**のソース(テンプレート展開後など)をスコ" -"アリングする。" +"**前処理済み*「または」*バンドル済み**のソース(テンプレート展開後など)をス" +"コアリングする。" #: src/library/in-memory.md:14 msgid "" @@ -19221,15 +19926,15 @@ msgstr "内容から言語を選択する" #: src/library/in-memory.md:74 msgid "" -"If you do not know the language up front, combine [`guess_language`](https://" -"docs.rs/big-code-analysis/*/big_code_analysis/fn.guess_language.html) with " -"`analyze`. `guess_language` peeks at the path extension, an Emacs mode-line, " -"and the shebang in that order:" +"If you do not know the language up front, combine [`guess_language`]" +"(https://docs.rs/big-code-analysis/*/big_code_analysis/fn.guess_language." +"html) with `analyze`. `guess_language` peeks at the path extension, an " +"Emacs mode-line, and the shebang in that order:" msgstr "" "言語が事前にわからない場合は、[`guess_language`](https://docs.rs/big-code-" "analysis/*/big_code_analysis/fn.guess_language.html) と `analyze` を組み合わ" -"せてください。`guess_language` はパスの拡張子、Emacs モード行、シバンの順に調" -"べます:" +"せてください。`guess_language` はパスの拡張子、Emacs モード行、シバンの順に" +"調べます:" #: src/library/in-memory.md:86 msgid "" @@ -19269,8 +19974,8 @@ msgstr "" msgid "" "**`Source::name` is `Option`.** Passing `None` leaves the top-level " "`FuncSpace::name` as `None` — useful for ad-hoc snippets that have no " -"meaningful identity. Downstream consumers that _require_ a stable identifier " -"should check for `None` explicitly." +"meaningful identity. Downstream consumers that _require_ a stable " +"identifier should check for `None` explicitly." msgstr "" "**`Source::name` は `Option` です。** `None` を渡すとトップレベルの " "`FuncSpace::name` は `None` のままになります。意味のある識別性を持たないアド" @@ -19283,9 +19988,9 @@ msgid "" "sibling files, follow `#include`s, or interpret a `.gitignore`. Feed it " "exactly the bytes you want analyzed." msgstr "" -"**ファイルシステムへのフォールバックはありません。** CLI と異なり、ライブラリ" -"は隣接ファイルを読んだり、`#include` を辿ったり、`.gitignore` を解釈したりし" -"ません。分析したいバイト列を正確に与えてください。" +"**ファイルシステムへのフォールバックはありません。** CLI と異なり、ライブラ" +"リは隣接ファイルを読んだり、`#include` を辿ったり、`.gitignore` を解釈したり" +"しません。分析したいバイト列を正確に与えてください。" #: src/library/in-memory.md:117 msgid "Reusing one parse for several passes" @@ -19293,24 +19998,26 @@ msgstr "一度のパースを複数のパスで再利用する" #: src/library/in-memory.md:119 msgid "" -"[`analyze`](https://docs.rs/big-code-analysis/*/big_code_analysis/fn.analyze." -"html) is the one-shot entry point: bytes in, [`FuncSpace`](https://docs.rs/" -"big-code-analysis/*/big_code_analysis/struct.FuncSpace.html) out. When you " -"need more than metrics from a single parse — operators and operands, an AST " -"dump, a function-span list — parse once with [`Ast::parse`](https://docs.rs/" -"big-code-analysis/*/big_code_analysis/struct.Ast.html#method.parse) and call " -"the per-pass methods on the returned handle (`metrics`, `ops`, `dump`, " -"`functions`, …). See [Parse once, run metrics many times](parse-once.md)." -msgstr "" -"[`analyze`](https://docs.rs/big-code-analysis/*/big_code_analysis/fn.analyze." -"html) はワンショットのエントリポイントです。バイト列を入れると [`FuncSpace`]" -"(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.FuncSpace." -"html) が返ります。一度のパースからメトリクス以外のもの(演算子とオペランド、" -"AST ダンプ、関数スパンの一覧)が必要な場合は、[`Ast::parse`](https://docs.rs/" -"big-code-analysis/*/big_code_analysis/struct.Ast.html#method.parse) で一度だ" -"けパースし、返されたハンドルに対してパスごとのメソッド(`metrics`、`ops`、" -"`dump`、`functions` など)を呼び出してください。[一度のパースでメトリクスを何" -"度も実行する](parse-once.md)を参照してください。" +"[`analyze`](https://docs.rs/big-code-analysis/*/big_code_analysis/fn." +"analyze.html) is the one-shot entry point: bytes in, [`FuncSpace`](https://" +"docs.rs/big-code-analysis/*/big_code_analysis/struct.FuncSpace.html) out. " +"When you need more than metrics from a single parse — operators and " +"operands, an AST dump, a function-span list — parse once with [`Ast::parse`]" +"(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.Ast." +"html#method.parse) and call the per-pass methods on the returned handle " +"(`metrics`, `ops`, `dump`, `functions`, …). See [Parse once, run metrics " +"many times](parse-once.md)." +msgstr "" +"[`analyze`](https://docs.rs/big-code-analysis/*/big_code_analysis/fn." +"analyze.html) はワンショットのエントリポイントです。バイト列を入れると " +"[`FuncSpace`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." +"FuncSpace.html) が返ります。一度のパースからメトリクス以外のもの(演算子とオ" +"ペランド、AST ダンプ、関数スパンの一覧)が必要な場合は、[`Ast::parse`]" +"(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.Ast." +"html#method.parse) で一度だけパースし、返されたハンドルに対してパスごとのメ" +"ソッド(`metrics`、`ops`、`dump`、`functions` など)を呼び出してください。" +"[一度のパースでメトリクスを何度も実行する](parse-once.md)を参照してくださ" +"い。" #: src/library/reuse-tree.md:3 msgid "" @@ -19323,8 +20030,8 @@ msgid "" msgstr "" "よくある課題として、構文ハイライト、コード折りたたみ、クエリのためにすでに " "[tree-sitter](https://tree-sitter.github.io/tree-sitter/) を利用している呼び" -"出し側は、すべてのファイルを 2 回パースすることになります。自分のツリーのため" -"に 1 回、メトリクスウォーカーの内部でもう 1 回です。パースシームを使うと、" +"出し側は、すべてのファイルを 2 回パースすることになります。自分のツリーのた" +"めに 1 回、メトリクスウォーカーの内部でもう 1 回です。パースシームを使うと、" "パース済みの `tree_sitter::Tree` を `big-code-analysis` に渡し、再パースなし" "で同じ `FuncSpace` を得られます。" @@ -19334,25 +20041,27 @@ msgid "" "big_code_analysis/struct.Ast.html#method.from_tree_sitter).** It adopts a " "caller-built `tree_sitter::Tree` and lets you run the metric walker more " "than once against the same parse (different [`MetricsOptions::with_only`]" -"(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.MetricsOptions." -"html#method.with_only) selections, custom tree-sitter walks interleaved with " -"metrics, `Ast::ops` for operator/operand extraction, etc.). See [Parse once, " -"run metrics many times](parse-once.md). It carries an explicit `name: " -"Option` rather than deriving the top-level [`FuncSpace::name`]" -"(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.FuncSpace." -"html#structfield.name) from a path via lossy UTF-8 conversion." +"(https://docs.rs/big-code-analysis/*/big_code_analysis/struct." +"MetricsOptions.html#method.with_only) selections, custom tree-sitter walks " +"interleaved with metrics, `Ast::ops` for operator/operand extraction, " +"etc.). See [Parse once, run metrics many times](parse-once.md). It carries " +"an explicit `name: Option` rather than deriving the top-level " +"[`FuncSpace::name`](https://docs.rs/big-code-analysis/*/big_code_analysis/" +"struct.FuncSpace.html#structfield.name) from a path via lossy UTF-8 " +"conversion." msgstr "" "**[`Ast::from_tree_sitter`](https://docs.rs/big-code-analysis/*/" "big_code_analysis/struct.Ast.html#method.from_tree_sitter) を使用してくださ" "い。** 呼び出し側で構築した `tree_sitter::Tree` を取り込み、同じパース結果に" -"対してメトリクスウォーカーを複数回実行できます([`MetricsOptions::with_only`]" -"(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.MetricsOptions." -"html#method.with_only) の選択の切り替え、メトリクスと交互に行うカスタム tree-" -"sitter 走査、演算子 / オペランド抽出のための `Ast::ops` など)。[一度のパース" -"でメトリクスを何度も実行する](parse-once.md)を参照してください。トップレベル" -"の [`FuncSpace::name`](https://docs.rs/big-code-analysis/*/big_code_analysis/" -"struct.FuncSpace.html#structfield.name) を損失のある UTF-8 変換でパスから導出" -"するのではなく、明示的な `name: Option` を受け取ります。" +"対してメトリクスウォーカーを複数回実行できます([`MetricsOptions::" +"with_only`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." +"MetricsOptions.html#method.with_only) の選択の切り替え、メトリクスと交互に行" +"うカスタム tree-sitter 走査、演算子 / オペランド抽出のための `Ast::ops` な" +"ど)。[一度のパースでメトリクスを何度も実行する](parse-once.md)を参照してく" +"ださい。トップレベルの [`FuncSpace::name`](https://docs.rs/big-code-" +"analysis/*/big_code_analysis/struct.FuncSpace.html#structfield.name) を損失" +"のある UTF-8 変換でパスから導出するのではなく、明示的な `name: " +"Option` を受け取ります。" #: src/library/reuse-tree.md:26 src/library/parse-once.md:18 #: src/library/ast-traversal.md:15 @@ -19369,9 +20078,9 @@ msgid "" "server, custom static-analysis pipeline) and want to reuse that parse for " "metrics rather than paying the byte-based cost again." msgstr "" -"開いているバッファごとに `tree_sitter::Tree` をすでに保持しており(エディタ、" -"LSP、言語サーバー、カスタム静的解析パイプライン)、バイトベースのコストを再度" -"払わずにそのパースをメトリクスに再利用したい。" +"開いているバッファごとに `tree_sitter::Tree` をすでに保持しており(エディ" +"タ、LSP、言語サーバー、カスタム静的解析パイプライン)、バイトベースのコスト" +"を再度払わずにそのパースをメトリクスに再利用したい。" #: src/library/reuse-tree.md:34 msgid "" @@ -19385,26 +20094,26 @@ msgstr "" msgid "" "Intend to pin `tree-sitter` on your side without taking a separate " "dependency from this library. The re-exported `big_code_analysis::" -"tree_sitter` module is the same crate we link against, so the types agree by " -"definition." +"tree_sitter` module is the same crate we link against, so the types agree " +"by definition." msgstr "" -"このライブラリとは別の依存関係を取らずに、自分の側で `tree-sitter` をピン留め" -"したい。再エクスポートされた `big_code_analysis::tree_sitter` モジュールはリ" -"ンク対象と同一のクレートなので、型は定義上一致します。" +"このライブラリとは別の依存関係を取らずに、自分の側で `tree-sitter` をピン留" +"めしたい。再エクスポートされた `big_code_analysis::tree_sitter` モジュールは" +"リンク対象と同一のクレートなので、型は定義上一致します。" #: src/library/reuse-tree.md:41 msgid "" -"Use the byte-based entry point [`analyze`](https://docs.rs/big-code-analysis/" -"*/big_code_analysis/fn.analyze.html) (with a [`Source`](https://docs.rs/big-" -"code-analysis/*/big_code_analysis/struct.Source.html)) if you do not already " -"have a tree — it constructs the parser internally and owns the parse end to " -"end." +"Use the byte-based entry point [`analyze`](https://docs.rs/big-code-" +"analysis/*/big_code_analysis/fn.analyze.html) (with a [`Source`](https://" +"docs.rs/big-code-analysis/*/big_code_analysis/struct.Source.html)) if you " +"do not already have a tree — it constructs the parser internally and owns " +"the parse end to end." msgstr "" "ツリーをまだ持っていない場合は、バイトベースのエントリポイント [`analyze`]" "(https://docs.rs/big-code-analysis/*/big_code_analysis/fn.analyze.html)" "([`Source`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." -"Source.html) を渡す)を使用してください。内部でパーサーを構築し、パースを最初" -"から最後まで管理します。" +"Source.html) を渡す)を使用してください。内部でパーサーを構築し、パースを最" +"初から最後まで管理します。" #: src/library/reuse-tree.md:48 msgid "Working example" @@ -19467,16 +20176,16 @@ msgid "" "The same shape works for any [`LANG`](https://docs.rs/big-code-analysis/*/" "big_code_analysis/enum.LANG.html) variant — pass the matching grammar to " "`tree_sitter::Parser::set_language` (via [`LANG::tree_sitter_language`]" -"(https://docs.rs/big-code-analysis/*/big_code_analysis/enum.LANG.html#method." -"tree_sitter_language)) and the metric walker will produce the same " -"`FuncSpace` it would have produced from bytes." +"(https://docs.rs/big-code-analysis/*/big_code_analysis/enum.LANG." +"html#method.tree_sitter_language)) and the metric walker will produce the " +"same `FuncSpace` it would have produced from bytes." msgstr "" "同じ形はどの [`LANG`](https://docs.rs/big-code-analysis/*/big_code_analysis/" "enum.LANG.html) バリアントでも機能します。対応する文法を([`LANG::" -"tree_sitter_language`](https://docs.rs/big-code-analysis/*/big_code_analysis/" -"enum.LANG.html#method.tree_sitter_language) 経由で)`tree_sitter::Parser::" -"set_language` に渡せば、メトリクスウォーカーはバイト列から生成した場合と同じ " -"`FuncSpace` を生成します。" +"tree_sitter_language`](https://docs.rs/big-code-analysis/*/" +"big_code_analysis/enum.LANG.html#method.tree_sitter_language) 経由で)" +"`tree_sitter::Parser::set_language` に渡せば、メトリクスウォーカーはバイト列" +"から生成した場合と同じ `FuncSpace` を生成します。" #: src/library/reuse-tree.md:103 msgid "The single tree-adoption seam" @@ -19494,7 +20203,16 @@ msgid "" "analysis/blob/main/STABILITY.md). Library consumers should adopt a tree " "through `Ast::from_tree_sitter`, which does not expose any per-language tag " "types or trait bounds." -msgstr "[`Ast::from_tree_sitter`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct.Ast.html#method.from_tree*sitter) がツリー再利用の *唯一の_ エントリポイントです。実行時に `LANG` でディスパッチし、パーサーの配管を完全に隠蔽します。かつての低レベル経路(ジェネリックな `Parser` / `ParserTrait` と言語ごとの `*Parser` / `*Code` タグ型)は現在クレート内限定(`pub(crate)`)であり、公開サーフェスには含まれません。[STABILITY.md](https://github.com/dekobon/big-code-analysis/blob/main/STABILITY.md) を参照してください。ライブラリ利用者は `Ast::from_tree_sitter` を通じてツリーを取り込むべきです。この経路は言語ごとのタグ型やトレイト境界を一切露出しません。" +msgstr "" +"[`Ast::from_tree_sitter`](https://docs.rs/big-code-analysis/*/" +"big_code_analysis/struct.Ast.html#method.from_tree*sitter) がツリー再利用の " +"*唯一の_ エントリポイントです。実行時に `LANG` でディスパッチし、パーサーの" +"配管を完全に隠蔽します。かつての低レベル経路(ジェネリックな `Parser` / " +"`ParserTrait` と言語ごとの `*Parser` / `*Code` タグ型)は現在クレート内限定" +"(`pub(crate)`)であり、公開サーフェスには含まれません。[STABILITY.md]" +"(https://github.com/dekobon/big-code-analysis/blob/main/STABILITY.md) を参照" +"してください。ライブラリ利用者は `Ast::from_tree_sitter` を通じてツリーを取" +"り込むべきです。この経路は言語ごとのタグ型やトレイト境界を一切露出しません。" #: src/library/reuse-tree.md:116 src/library/parse-once.md:176 #: src/library/ast-traversal.md:306 @@ -19505,8 +20223,8 @@ msgstr "対象外" msgid "" "**Incremental re-computation.** Applying a `tree_sitter::InputEdit` and re-" "querying only the changed spans is not supported yet — the metric walker " -"still walks the entire tree on every call. The parse seam is the first step; " -"making the walker itself incremental is a follow-up." +"still walks the entire tree on every call. The parse seam is the first " +"step; making the walker itself incremental is a follow-up." msgstr "" "**インクリメンタルな再計算。** `tree_sitter::InputEdit` を適用して変更された" "スパンだけを再クエリすることはまだサポートされていません。メトリクスウォー" @@ -19519,9 +20237,9 @@ msgid "" "exposes its inner `tree_sitter::Node` through the public `.0` field for ad-" "hoc traversal; the wrapper helpers remain crate-private." msgstr "" -"**`Node` の `pub(crate)` 走査メソッドすべての公開。** `Node` はアドホックな走" -"査のために内部の `tree_sitter::Node` を公開フィールド `.0` として露出したまま" -"ですが、ラッパーヘルパーはクレート内限定のままです。" +"**`Node` の `pub(crate)` 走査メソッドすべての公開。** `Node` はアドホックな" +"走査のために内部の `tree_sitter::Node` を公開フィールド `.0` として露出した" +"ままですが、ラッパーヘルパーはクレート内限定のままです。" #: src/library/parse-once.md:3 msgid "" @@ -19536,16 +20254,16 @@ msgstr "" "rs/big-code-analysis/*/big_code_analysis/fn.analyze.html) は、呼び出しのたび" "に [`Source`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." "Source.html) を再パースします。異なるメトリクスサブセット、交互に行うカスタ" -"ム tree-sitter 走査、設定変更後のメトリクス再実行など、ファイルを複数回スコア" -"リングするパイプラインでは、その再パースは無駄な作業です。" +"ム tree-sitter 走査、設定変更後のメトリクス再実行など、ファイルを複数回スコ" +"アリングするパイプラインでは、その再パースは無駄な作業です。" #: src/library/parse-once.md:9 msgid "" -"The [`Ast`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct.Ast." -"html) type, added in `1.1.0`, exposes the seam: parse the source once, then " -"call [`Ast::metrics`](https://docs.rs/big-code-analysis/*/big_code_analysis/" -"struct.Ast.html#method.metrics) as many times as you need against the held " -"parse." +"The [`Ast`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." +"Ast.html) type, added in `1.1.0`, exposes the seam: parse the source once, " +"then call [`Ast::metrics`](https://docs.rs/big-code-analysis/*/" +"big_code_analysis/struct.Ast.html#method.metrics) as many times as you need " +"against the held parse." msgstr "" "`1.1.0` で追加された [`Ast`](https://docs.rs/big-code-analysis/*/" "big_code_analysis/struct.Ast.html) 型がこのシームを公開します。ソースを一度" @@ -19559,11 +20277,11 @@ msgstr "次のいずれかに当てはまる場合は `Ast` を使用してく #: src/library/parse-once.md:22 msgid "" -"**Selective metric runs.** You compute one set of metrics for a report, then " -"another for a CI threshold gate, against the same file." +"**Selective metric runs.** You compute one set of metrics for a report, " +"then another for a CI threshold gate, against the same file." msgstr "" -"**選択的なメトリクス実行。** 同じファイルに対して、レポート用にあるメトリクス" -"の集合を計算し、次に CI のしきい値ゲート用に別の集合を計算する。" +"**選択的なメトリクス実行。** 同じファイルに対して、レポート用にあるメトリク" +"スの集合を計算し、次に CI のしきい値ゲート用に別の集合を計算する。" #: src/library/parse-once.md:24 msgid "" @@ -19572,8 +20290,8 @@ msgid "" "walker into the same parse." msgstr "" "**カスタム tree-sitter 走査。** クエリ / ハイライト / シンボル抽出のためにす" -"でに `tree_sitter::Tree` を駆動しており、同じパースにメトリクスウォーカーを組" -"み込みたい。" +"でに `tree_sitter::Tree` を駆動しており、同じパースにメトリクスウォーカーを" +"組み込みたい。" #: src/library/parse-once.md:27 msgid "" @@ -19588,14 +20306,14 @@ msgstr "" #: src/library/parse-once.md:31 msgid "" "If you only ever compute every metric once per file, stick with [`analyze`]" -"(https://docs.rs/big-code-analysis/*/big_code_analysis/fn.analyze.html) — it " -"now delegates to `Ast` internally, so the shapes line up but the one-shot " -"API stays simpler." +"(https://docs.rs/big-code-analysis/*/big_code_analysis/fn.analyze.html) — " +"it now delegates to `Ast` internally, so the shapes line up but the one-" +"shot API stays simpler." msgstr "" "ファイルごとにすべてのメトリクスを 1 回だけ計算するのであれば、[`analyze`]" "(https://docs.rs/big-code-analysis/*/big_code_analysis/fn.analyze.html) を使" -"い続けてください。現在は内部で `Ast` に委譲しているため両者の形状は一致します" -"が、ワンショット API のほうがシンプルなままです。" +"い続けてください。現在は内部で `Ast` に委譲しているため両者の形状は一致しま" +"すが、ワンショット API のほうがシンプルなままです。" #: src/library/parse-once.md:35 msgid "Selective metrics across calls" @@ -19626,9 +20344,9 @@ msgstr "\"ccn = {}\"" #: src/library/parse-once.md:57 msgid "" "Each `metrics` call walks the tree once. The savings versus calling " -"[`analyze`](https://docs.rs/big-code-analysis/*/big_code_analysis/fn.analyze." -"html) twice come from skipping the parse, which dominates runtime for " -"everything except the very largest source files." +"[`analyze`](https://docs.rs/big-code-analysis/*/big_code_analysis/fn." +"analyze.html) twice come from skipping the parse, which dominates runtime " +"for everything except the very largest source files." msgstr "" "各 `metrics` 呼び出しはツリーを 1 回走査します。[`analyze`](https://docs.rs/" "big-code-analysis/*/big_code_analysis/fn.analyze.html) を 2 回呼ぶ場合と比べ" @@ -19643,28 +20361,29 @@ msgstr "同じパース上でのカスタム tree-sitter 走査とメトリク msgid "" "`Ast::as_tree_sitter` borrows the underlying `tree_sitter::Tree`. The " "returned reference is valid for the lifetime of the `Ast`; nodes obtained " -"from it resolve against `Ast::source` (see the [note on the C++ preprocessor]" -"(#c-preprocessor) below for what `source` returns under macro expansion)." +"from it resolve against `Ast::source` (see the [note on the C++ " +"preprocessor](#c-preprocessor) below for what `source` returns under macro " +"expansion)." msgstr "" -"`Ast::as_tree_sitter` は基盤となる `tree_sitter::Tree` を借用します。返される" -"参照は `Ast` のライフタイムの間有効で、そこから得られるノードは `Ast::" +"`Ast::as_tree_sitter` は基盤となる `tree_sitter::Tree` を借用します。返され" +"る参照は `Ast` のライフタイムの間有効で、そこから得られるノードは `Ast::" "source` に対して解決されます(マクロ展開時に `source` が何を返すかについて" -"は、下記の [C++ プリプロセッサに関する注記](#c-preprocessor) を参照してくださ" -"い)。" +"は、下記の [C++ プリプロセッサに関する注記](#c-preprocessor) を参照してくだ" +"さい)。" #: src/library/parse-once.md:69 msgid "" "**For realistic AST work** — counting node kinds, finding constructs by " -"name, detecting parse errors, building a symbol table — see [Walking the AST " -"directly](ast-traversal.md). The example below is a minimal smoke test; the " -"dedicated chapter shows the full pattern (reusable depth-first walker, field-" -"name lookup, error detection)." +"name, detecting parse errors, building a symbol table — see [Walking the " +"AST directly](ast-traversal.md). The example below is a minimal smoke test; " +"the dedicated chapter shows the full pattern (reusable depth-first walker, " +"field-name lookup, error detection)." msgstr "" -"**現実的な AST 作業**(ノード種別のカウント、名前による構文要素の検索、パース" -"エラーの検出、シンボルテーブルの構築など)については、[AST を直接走査する]" -"(ast-traversal.md) を参照してください。以下の例は最小限のスモークテストです。" -"専用の章では完全なパターン(再利用可能な深さ優先ウォーカー、フィールド名によ" -"る検索、エラー検出)を示します。" +"**現実的な AST 作業**(ノード種別のカウント、名前による構文要素の検索、パー" +"スエラーの検出、シンボルテーブルの構築など)については、[AST を直接走査する]" +"(ast-traversal.md) を参照してください。以下の例は最小限のスモークテストで" +"す。専用の章では完全なパターン(再利用可能な深さ優先ウォーカー、フィールド名" +"による検索、エラー検出)を示します。" #: src/library/parse-once.md:78 src/library/parse-once.md:129 #: src/library/selecting-metrics.md:72 @@ -19691,16 +20410,17 @@ msgstr "同じパース上のオペレーターとオペランド" msgid "" "[`Ast::ops`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." "Ast.html#method.ops) returns the per-space operator/operand `Ops` tree (the " -"data behind the Halstead metrics). The top-level `Ops::name` is the `Source::" -"name` you supplied — carried explicitly, including the `None` case — rather " -"than a lossy-path string, so `Ops::name_was_lossy` is never set on this path." +"data behind the Halstead metrics). The top-level `Ops::name` is the " +"`Source::name` you supplied — carried explicitly, including the `None` case " +"— rather than a lossy-path string, so `Ops::name_was_lossy` is never set on " +"this path." msgstr "" "[`Ast::ops`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." -"Ast.html#method.ops) は、スペースごとのオペレーター/オペランドの `Ops` ツリー" -"(Halstead メトリクスの背後にあるデータ)を返します。トップレベルの `Ops::" -"name` は、損失のあるパス文字列ではなく、呼び出し側が渡した `Source::name` が" -"(`None` の場合も含めて)明示的にそのまま引き継がれたものです。そのため、この" -"経路で `Ops::name_was_lossy` が設定されることはありません。" +"Ast.html#method.ops) は、スペースごとのオペレーター/オペランドの `Ops` ツ" +"リー(Halstead メトリクスの背後にあるデータ)を返します。トップレベルの " +"`Ops::name` は、損失のあるパス文字列ではなく、呼び出し側が渡した `Source::" +"name` が(`None` の場合も含めて)明示的にそのまま引き継がれたものです。その" +"ため、この経路で `Ops::name_was_lossy` が設定されることはありません。" #: src/library/parse-once.md:104 msgid "b\"fn f() { let x = 1 + 2; }\"" @@ -19726,8 +20446,8 @@ msgstr "" "すでに自分で `tree_sitter::Tree` を構築している場合(たとえばエディタや LSP " "が独自のパーサープールを持っている場合)は、[`Ast::from_tree_sitter`]" "(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.Ast." -"html#method.from_tree_sitter) がツリー取り込みの継ぎ目になります。損失のある " -"UTF-8 変換でパスから名前を導出するのではなく、明示的な `name: " +"html#method.from_tree_sitter) がツリー取り込みの継ぎ目になります。損失のあ" +"る UTF-8 変換でパスから名前を導出するのではなく、明示的な `name: " "Option` をエンドツーエンドで引き継ぎます。" #: src/library/parse-once.md:137 @@ -19743,8 +20463,8 @@ msgid "" "`kind_id` values that come from the language's enum, so values from a " "different grammar yield nonsensical results." msgstr "" -"ツリーは、`lang` に対して [`LANG::tree_sitter_language`](https://docs.rs/big-" -"code-analysis/*/big_code_analysis/enum.LANG.html#method." +"ツリーは、`lang` に対して [`LANG::tree_sitter_language`](https://docs.rs/" +"big-code-analysis/*/big_code_analysis/enum.LANG.html#method." "tree_sitter_language) が返す文法を使って `code` から生成されたものでなければ" "なりません。不一致は `unsafe` ではありませんが、メトリクスウォーカーはその言" "語の enum に由来する tree-sitter の `kind_id` 値でマッチするため、別の文法か" @@ -19765,11 +20485,12 @@ msgid "" "actually saw, not the original input." msgstr "" "プリプロセッサ入力(`Source::with_preproc_path` + `Source::with_preproc`)を" -"持つ [`Source`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." -"Source.html) に対して `Ast::parse` が呼ばれ、言語が [`LANG::Cpp`](https://" -"docs.rs/big-code-analysis/*/big_code_analysis/enum.LANG.html) の場合、`tree-" -"sitter` より前にマクロの事前パスが実行されます。そして `Ast::source` は、元の" -"入力ではなく、パーサーが実際に見た _展開後_ のバイト列を返します。" +"持つ [`Source`](https://docs.rs/big-code-analysis/*/big_code_analysis/" +"struct.Source.html) に対して `Ast::parse` が呼ばれ、言語が [`LANG::Cpp`]" +"(https://docs.rs/big-code-analysis/*/big_code_analysis/enum.LANG.html) の場" +"合、`tree-sitter` より前にマクロの事前パスが実行されます。そして `Ast::" +"source` は、元の入力ではなく、パーサーが実際に見た _展開後_ のバイト列を返し" +"ます。" #: src/library/parse-once.md:163 msgid "" @@ -19787,9 +20508,10 @@ msgstr "並行性" #: src/library/parse-once.md:171 msgid "" -"`Ast` is `Send + Sync`. Running `Ast::metrics` from multiple threads against " -"the same `&Ast` is safe — the walker only reads from the held `tree_sitter::" -"Tree`. (Benchmarking parallel metric runs is a separate follow-up.)" +"`Ast` is `Send + Sync`. Running `Ast::metrics` from multiple threads " +"against the same `&Ast` is safe — the walker only reads from the held " +"`tree_sitter::Tree`. (Benchmarking parallel metric runs is a separate " +"follow-up.)" msgstr "" "`Ast` は `Send + Sync` です。同じ `&Ast` に対して複数スレッドから `Ast::" "metrics` を実行しても安全です。ウォーカーは保持している `tree_sitter::Tree` " @@ -19798,43 +20520,43 @@ msgstr "" #: src/library/parse-once.md:178 msgid "" -"**Incremental reparse via `tree_sitter::InputEdit`.** Caching a stable `Ast` " -"across an analysis pipeline is in scope; editing the held tree is not." +"**Incremental reparse via `tree_sitter::InputEdit`.** Caching a stable " +"`Ast` across an analysis pipeline is in scope; editing the held tree is not." msgstr "" "**`tree_sitter::InputEdit` による増分再パース。** 解析パイプライン全体で安定" -"した `Ast` をキャッシュすることはスコープ内ですが、保持しているツリーを編集す" -"ることはスコープ外です。" +"した `Ast` をキャッシュすることはスコープ内ですが、保持しているツリーを編集" +"することはスコープ外です。" #: src/library/parse-once.md:181 msgid "" -"**Parallel-by-default APIs.** `Ast::metrics` does not internally parallelize " -"across the metric set. Callers that want one thread per subset are free to " -"do so." +"**Parallel-by-default APIs.** `Ast::metrics` does not internally " +"parallelize across the metric set. Callers that want one thread per subset " +"are free to do so." msgstr "" "**デフォルトで並列な API。** `Ast::metrics` はメトリクス集合をまたいで内部的" -"に並列化しません。サブセットごとに 1 スレッドを使いたい呼び出し側は、自由にそ" -"うできます。" +"に並列化しません。サブセットごとに 1 スレッドを使いたい呼び出し側は、自由に" +"そうできます。" #: src/library/ast-traversal.md:3 msgid "" "[`Ast::parse`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." -"Ast.html#method.parse) gives you a parsed [`tree_sitter::Tree`](https://docs." -"rs/tree-sitter/*/tree_sitter/struct.Tree.html) together with the source " -"bytes it was parsed from; [`Ast::as_tree_sitter`](https://docs.rs/big-code-" -"analysis/*/big_code_analysis/struct.Ast.html#method.as_tree_sitter) hands " -"that tree out as a borrowed reference. This chapter shows how to use it to " -"drive your own syntax-tree analysis — counting node kinds, finding " -"constructs by name, detecting parse errors, or pulling out a symbol table — " -"without paying for a second parse." +"Ast.html#method.parse) gives you a parsed [`tree_sitter::Tree`](https://" +"docs.rs/tree-sitter/*/tree_sitter/struct.Tree.html) together with the " +"source bytes it was parsed from; [`Ast::as_tree_sitter`](https://docs.rs/" +"big-code-analysis/*/big_code_analysis/struct.Ast.html#method." +"as_tree_sitter) hands that tree out as a borrowed reference. This chapter " +"shows how to use it to drive your own syntax-tree analysis — counting node " +"kinds, finding constructs by name, detecting parse errors, or pulling out a " +"symbol table — without paying for a second parse." msgstr "" "[`Ast::parse`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." "Ast.html#method.parse) は、パース済みの [`tree_sitter::Tree`](https://docs." -"rs/tree-sitter/*/tree_sitter/struct.Tree.html) を、そのパース元となったソース" -"のバイト列とともに提供します。[`Ast::as_tree_sitter`](https://docs.rs/big-" -"code-analysis/*/big_code_analysis/struct.Ast.html#method.as_tree_sitter) は、" -"そのツリーを借用参照として渡します。本章では、これを使って独自の構文木解析" -"(ノード種別のカウント、名前による構文要素の検索、パースエラーの検出、シンボ" -"ルテーブルの抽出など)を、2 回目のパースのコストを払わずに行う方法を示しま" +"rs/tree-sitter/*/tree_sitter/struct.Tree.html) を、そのパース元となったソー" +"スのバイト列とともに提供します。[`Ast::as_tree_sitter`](https://docs.rs/big-" +"code-analysis/*/big_code_analysis/struct.Ast.html#method.as_tree_sitter) " +"は、そのツリーを借用参照として渡します。本章では、これを使って独自の構文木解" +"析(ノード種別のカウント、名前による構文要素の検索、パースエラーの検出、シン" +"ボルテーブルの抽出など)を、2 回目のパースのコストを払わずに行う方法を示しま" "す。" #: src/library/ast-traversal.md:17 @@ -19870,9 +20592,9 @@ msgstr "" #: src/library/ast-traversal.md:28 msgid "" -"You want to **mix metrics with custom analysis** in one parse — e.g. capture " -"metric values _and_ a list of function names for a coverage mapping, an IDE " -"outline, or a code-owner report." +"You want to **mix metrics with custom analysis** in one parse — e.g. " +"capture metric values _and_ a list of function names for a coverage " +"mapping, an IDE outline, or a code-owner report." msgstr "" "1 回のパースで**メトリクスとカスタム解析を組み合わせ**たい場合。たとえば、カ" "バレッジマッピング、IDE のアウトライン、コードオーナーレポートのために、メト" @@ -19880,8 +20602,8 @@ msgstr "" #: src/library/ast-traversal.md:32 msgid "" -"If you only need standard metrics, stay with [`analyze`](https://docs.rs/big-" -"code-analysis/*/big_code_analysis/fn.analyze.html) or [`Ast::metrics`]" +"If you only need standard metrics, stay with [`analyze`](https://docs.rs/" +"big-code-analysis/*/big_code_analysis/fn.analyze.html) or [`Ast::metrics`]" "(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.Ast." "html#method.metrics) — they walk the tree for you. The direct path is for " "things the metric walker does not already compute." @@ -19889,9 +20611,9 @@ msgstr "" "標準のメトリクスだけが必要なら、[`analyze`](https://docs.rs/big-code-" "analysis/*/big_code_analysis/fn.analyze.html) または [`Ast::metrics`]" "(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.Ast." -"html#method.metrics) を使い続けてください。これらはツリーの走査を代行してくれ" -"ます。直接走査は、メトリクスウォーカーがまだ計算していないものを求める場合の" -"ための手段です。" +"html#method.metrics) を使い続けてください。これらはツリーの走査を代行してく" +"れます。直接走査は、メトリクスウォーカーがまだ計算していないものを求める場合" +"のための手段です。" #: src/library/ast-traversal.md:40 msgid "Use the re-exported `tree_sitter`" @@ -19899,22 +20621,22 @@ msgstr "再エクスポートされた `tree_sitter` を使う" #: src/library/ast-traversal.md:42 msgid "" -"Import `tree_sitter` from [`big_code_analysis::tree_sitter`](https://docs.rs/" -"big-code-analysis/*/big_code_analysis/tree_sitter/index.html) rather than " -"adding a sibling `tree-sitter` dependency. The re-export is pinned to the " -"exact version the metric walker was built against, so the `Tree` types agree " -"by definition. See [Reusing an existing tree-sitter Tree](reuse-tree." +"Import `tree_sitter` from [`big_code_analysis::tree_sitter`](https://docs." +"rs/big-code-analysis/*/big_code_analysis/tree_sitter/index.html) rather " +"than adding a sibling `tree-sitter` dependency. The re-export is pinned to " +"the exact version the metric walker was built against, so the `Tree` types " +"agree by definition. See [Reusing an existing tree-sitter Tree](reuse-tree." "md#working-example) and [Stability and versioning](stability.md) for the " "value-not-stable posture this re-export carries." msgstr "" "別途 `tree-sitter` 依存を追加するのではなく、[`big_code_analysis::" "tree_sitter`](https://docs.rs/big-code-analysis/*/big_code_analysis/" -"tree_sitter/index.html) から `tree_sitter` をインポートしてください。この再エ" -"クスポートはメトリクスウォーカーのビルドに使われた正確なバージョンに固定され" -"ているため、`Tree` 型は定義上一致します。この再エクスポートが持つ「値は安定で" -"はない」という姿勢については、[既存の tree-sitter Tree を再利用する](reuse-" -"tree.md#working-example) と [安定性とバージョニング](stability.md) を参照して" -"ください。" +"tree_sitter/index.html) から `tree_sitter` をインポートしてください。この再" +"エクスポートはメトリクスウォーカーのビルドに使われた正確なバージョンに固定さ" +"れているため、`Tree` 型は定義上一致します。この再エクスポートが持つ「値は安" +"定ではない」という姿勢については、[既存の tree-sitter Tree を再利用する]" +"(reuse-tree.md#working-example) と [安定性とバージョニング](stability.md) を" +"参照してください。" #: src/library/ast-traversal.md:53 msgid "A reusable DFS walker" @@ -19922,16 +20644,17 @@ msgstr "再利用可能な DFS ウォーカー" #: src/library/ast-traversal.md:55 msgid "" -"Most of the examples below need a depth-first traversal of every descendant. " -"Tree-sitter ships a [`TreeCursor`](https://docs.rs/tree-sitter/*/tree_sitter/" -"struct.TreeCursor.html) that does this in O(1) per step (no allocations " -"beyond the cursor itself). The canonical walk is short enough to inline:" +"Most of the examples below need a depth-first traversal of every " +"descendant. Tree-sitter ships a [`TreeCursor`](https://docs.rs/tree-sitter/" +"*/tree_sitter/struct.TreeCursor.html) that does this in O(1) per step (no " +"allocations beyond the cursor itself). The canonical walk is short enough " +"to inline:" msgstr "" "以下の例の多くは、すべての子孫を深さ優先で走査する必要があります。tree-" -"sitter には、これを 1 ステップあたり O(1) で行う [`TreeCursor`](https://docs." -"rs/tree-sitter/*/tree_sitter/struct.TreeCursor.html) が付属しています(カーソ" -"ル自体以外のアロケーションはありません)。標準的な走査はインラインで書けるほ" -"ど短いものです。" +"sitter には、これを 1 ステップあたり O(1) で行う [`TreeCursor`](https://" +"docs.rs/tree-sitter/*/tree_sitter/struct.TreeCursor.html) が付属しています" +"(カーソル自体以外のアロケーションはありません)。標準的な走査はインラインで" +"書けるほど短いものです。" #: src/library/ast-traversal.md:62 msgid "" @@ -19939,14 +20662,14 @@ msgid "" "/// node to `visit`. Allocation-free apart from the cursor itself.\n" msgstr "" "/// `tree` のすべてのノードをルートから先行順(pre-order)で訪問し、\n" -"/// 各ノードを `visit` に渡します。カーソル自体を除きアロケーションはありませ" -"ん。\n" +"/// 各ノードを `visit` に渡します。カーソル自体を除きアロケーションはありま" +"せん。\n" #: src/library/ast-traversal.md:87 msgid "" "The pattern is: visit, descend, climb back up while there is no next " -"sibling, repeat. Every example in this chapter is a thin wrapper around this " -"walker — the code fences below are marked `ignore` because they assume " +"sibling, repeat. Every example in this chapter is a thin wrapper around " +"this walker — the code fences below are marked `ignore` because they assume " "`walk_preorder` is already in scope; the matching set of tests in [`tests/" "book_ast_traversal_examples.rs`](https://github.com/dekobon/big-code-" "analysis/blob/main/tests/book_ast_traversal_examples.rs) keeps them honest, " @@ -19954,9 +20677,9 @@ msgid "" msgstr "" "パターンは「訪問し、下降し、次の兄弟がない間は上へ戻る」の繰り返しです。本章" "のすべての例はこのウォーカーの薄いラッパーです。以下のコードフェンスに " -"`ignore` が付いているのは、`walk_preorder` がすでにスコープ内にあることを前提" -"としているためです。対応するテスト群 [`tests/book_ast_traversal_examples.rs`]" -"(https://github.com/dekobon/big-code-analysis/blob/main/tests/" +"`ignore` が付いているのは、`walk_preorder` がすでにスコープ内にあることを前" +"提としているためです。対応するテスト群 [`tests/book_ast_traversal_examples." +"rs`](https://github.com/dekobon/big-code-analysis/blob/main/tests/" "book_ast_traversal_examples.rs) がその正しさを保証しており、例を壊すようなリ" "ファクタリングは `cargo test` を失敗させます。" @@ -19987,8 +20710,8 @@ msgstr "\"for_expression\"" #: src/library/ast-traversal.md:123 msgid "" "The string keys (`\"if_expression\"`, `\"for_expression\"`, …) are the tree-" -"sitter grammar's node-type names. The fastest way to discover them for a new " -"language is `bca dump --paths sample.rs`, which prints the full AST." +"sitter grammar's node-type names. The fastest way to discover them for a " +"new language is `bca dump --paths sample.rs`, which prints the full AST." msgstr "" "文字列キー(`\"if_expression\"`、`\"for_expression\"` など)は、tree-sitter " "文法のノード型名です。新しい言語でこれらを調べる最も速い方法は、AST 全体を出" @@ -20002,17 +20725,17 @@ msgid "" "anonymous tokens have different kind names — but `counts.values().sum()` " "would be much larger than the count of _named_ grammar productions. Filter " "with [`tree_sitter::Node::is_named()`](https://docs.rs/tree-sitter/*/" -"tree_sitter/struct.Node.html#method.is_named) inside the visitor if you only " -"want named nodes." -msgstr "" -"**匿名トークン。** ウォーカーは、`\"{\"` や `\";\"`、キーワードリテラルのよう" -"な匿名トークンも含め、tree-sitter が出力するすべてのノードを訪問します。上記" -"のような対象を絞った `counts.get(\"if_expression\")` の検索は影響を受けません" -"が(匿名トークンは異なる種別名を持ちます)、`counts.values().sum()` は _名前" -"付き_ の文法プロダクションの数よりはるかに大きくなります。名前付きノードだけ" -"が必要な場合は、ビジター内で [`tree_sitter::Node::is_named()`](https://docs." -"rs/tree-sitter/*/tree_sitter/struct.Node.html#method.is_named) を使ってフィル" -"タしてください。" +"tree_sitter/struct.Node.html#method.is_named) inside the visitor if you " +"only want named nodes." +msgstr "" +"**匿名トークン。** ウォーカーは、`\"{\"` や `\";\"`、キーワードリテラルのよ" +"うな匿名トークンも含め、tree-sitter が出力するすべてのノードを訪問します。上" +"記のような対象を絞った `counts.get(\"if_expression\")` の検索は影響を受けま" +"せんが(匿名トークンは異なる種別名を持ちます)、`counts.values().sum()` は _" +"名前付き_ の文法プロダクションの数よりはるかに大きくなります。名前付きノード" +"だけが必要な場合は、ビジター内で [`tree_sitter::Node::is_named()`](https://" +"docs.rs/tree-sitter/*/tree_sitter/struct.Node.html#method.is_named) を使って" +"フィルタしてください。" #: src/library/ast-traversal.md:138 msgid "Find nodes by kind" @@ -20030,8 +20753,8 @@ msgstr "b\"fn safe() {} fn risky() { unsafe { } }\"" msgid "" "// Captured slices borrow from `source` — no per-hit `String` allocation.\n" msgstr "" -"// キャプチャしたスライスは `source` から借用します。ヒットごとの `String` ア" -"ロケーションはありません。\n" +"// キャプチャしたスライスは `source` から借用します。ヒットごとの `String` " +"アロケーションはありません。\n" #: src/library/ast-traversal.md:155 msgid "\"unsafe_block\"" @@ -20045,14 +20768,14 @@ msgstr "\"source is valid utf-8\"" msgid "" "`Node::utf8_text(&source[..])` slices the source bytes by the node's byte " "range. Pair it with [`Ast::source`](https://docs.rs/big-code-analysis/*/" -"big_code_analysis/struct.Ast.html#method.source) — for C++ with preprocessor " -"inputs supplied to [`Ast::parse`](https://docs.rs/big-code-analysis/*/" -"big_code_analysis/struct.Ast.html#method.parse), `source` is the _expanded_ " -"buffer the parser actually saw, not the original input (see [the C++ " -"preprocessor note](parse-once.md#c-preprocessor))." -msgstr "" -"`Node::utf8_text(&source[..])` は、ノードのバイト範囲でソースのバイト列をスラ" -"イスします。[`Ast::source`](https://docs.rs/big-code-analysis/*/" +"big_code_analysis/struct.Ast.html#method.source) — for C++ with " +"preprocessor inputs supplied to [`Ast::parse`](https://docs.rs/big-code-" +"analysis/*/big_code_analysis/struct.Ast.html#method.parse), `source` is the " +"_expanded_ buffer the parser actually saw, not the original input (see [the " +"C++ preprocessor note](parse-once.md#c-preprocessor))." +msgstr "" +"`Node::utf8_text(&source[..])` は、ノードのバイト範囲でソースのバイト列をス" +"ライスします。[`Ast::source`](https://docs.rs/big-code-analysis/*/" "big_code_analysis/struct.Ast.html#method.source) と組み合わせて使ってくださ" "い。プリプロセッサ入力を [`Ast::parse`](https://docs.rs/big-code-analysis/*/" "big_code_analysis/struct.Ast.html#method.parse) に渡した C++ の場合、" @@ -20087,7 +20810,8 @@ msgstr "" #: src/library/ast-traversal.md:192 msgid "To list the offending nodes, walk the tree and check each:" -msgstr "問題のノードを列挙するには、ツリーを走査して各ノードをチェックします。" +msgstr "" +"問題のノードを列挙するには、ツリーを走査して各ノードをチェックします。" #: src/library/ast-traversal.md:210 msgid "" @@ -20096,9 +20820,9 @@ msgid "" "nodes the parser invented to recover from a missing token. The CLI's `bca " "find -t ERROR` recipe uses the same nodes." msgstr "" -"`Node::is_error()` は、tree-sitter が文法にマッチできなかった箇所に挿入する合" -"成の `ERROR` ノードを示します。`Node::is_missing()` は、欠落したトークンから" -"回復するためにパーサーが作り出したファントムノードを示します。CLI の `bca " +"`Node::is_error()` は、tree-sitter が文法にマッチできなかった箇所に挿入する" +"合成の `ERROR` ノードを示します。`Node::is_missing()` は、欠落したトークンか" +"ら回復するためにパーサーが作り出したファントムノードを示します。CLI の `bca " "find -t ERROR` レシピも同じノードを使っています。" #: src/library/ast-traversal.md:215 @@ -20108,13 +20832,14 @@ msgstr "メトリクスとカスタム走査を組み合わせる" #: src/library/ast-traversal.md:217 msgid "" "The whole point of [`Ast`](https://docs.rs/big-code-analysis/*/" -"big_code_analysis/struct.Ast.html) is parse-once / compute-many. A realistic " -"pipeline computes metrics _and_ extracts a symbol table from the same parse:" +"big_code_analysis/struct.Ast.html) is parse-once / compute-many. A " +"realistic pipeline computes metrics _and_ extracts a symbol table from the " +"same parse:" msgstr "" "[`Ast`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct.Ast." "html) の眼目は「1 回パースして何度も計算する」ことにあります。現実的なパイプ" -"ラインは、同じパースからメトリクスを計算し、_さらに_ シンボルテーブルも抽出し" -"ます。" +"ラインは、同じパースからメトリクスを計算し、_さらに_ シンボルテーブルも抽出" +"します。" #: src/library/ast-traversal.md:226 msgid "b\"fn outer() { fn inner() {} } fn alone() {}\"" @@ -20150,19 +20875,19 @@ msgstr "\"alone\"" #: src/library/ast-traversal.md:256 msgid "" -"`Node::child_by_field_name` walks the named grammar fields — the same fields " -"that show up in the `field_name` key of the serialized AST (REST `/ast`, " -"[`Ast::dump`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." -"Ast.html#method.dump)). Field-based lookup is more robust than positional " -"indexing because it does not depend on which children the grammar emits for " -"anonymous tokens (commas, parentheses, …)." +"`Node::child_by_field_name` walks the named grammar fields — the same " +"fields that show up in the `field_name` key of the serialized AST (REST `/" +"ast`, [`Ast::dump`](https://docs.rs/big-code-analysis/*/big_code_analysis/" +"struct.Ast.html#method.dump)). Field-based lookup is more robust than " +"positional indexing because it does not depend on which children the " +"grammar emits for anonymous tokens (commas, parentheses, …)." msgstr "" "`Node::child_by_field_name` は名前付きの文法フィールドをたどります。これは、" "シリアライズされた AST(REST の `/ast`、[`Ast::dump`](https://docs.rs/big-" "code-analysis/*/big_code_analysis/struct.Ast.html#method.dump))の " -"`field_name` キーに現れるのと同じフィールドです。フィールドベースの検索は、匿" -"名トークン(カンマ、丸括弧など)に対して文法がどの子ノードを出力するかに依存" -"しないため、位置ベースのインデックス参照より堅牢です。" +"`field_name` キーに現れるのと同じフィールドです。フィールドベースの検索は、" +"匿名トークン(カンマ、丸括弧など)に対して文法がどの子ノードを出力するかに依" +"存しないため、位置ベースのインデックス参照より堅牢です。" #: src/library/ast-traversal.md:265 msgid "Want a serializable JSON tree?" @@ -20171,22 +20896,22 @@ msgstr "シリアライズ可能な JSON ツリーが欲しい場合" #: src/library/ast-traversal.md:267 msgid "" "For pipelines that want a structured AST as data — diffing, queries on the " -"wire, language-agnostic schema work — [`Ast::dump`](https://docs.rs/big-code-" -"analysis/*/big_code_analysis/struct.Ast.html#method.dump) materializes the " -"tree as a `Serialize`\\-able [`AstResponse`](https://docs.rs/big-code-" -"analysis/*/big_code_analysis/struct.AstResponse.html) of [`AstNode`](https://" -"docs.rs/big-code-analysis/*/big_code_analysis/struct.AstNode.html)s. This is " -"the same shape the REST `/ast` endpoint produces. Call it on the parse " -"handle:" +"wire, language-agnostic schema work — [`Ast::dump`](https://docs.rs/big-" +"code-analysis/*/big_code_analysis/struct.Ast.html#method.dump) materializes " +"the tree as a `Serialize`\\-able [`AstResponse`](https://docs.rs/big-code-" +"analysis/*/big_code_analysis/struct.AstResponse.html) of [`AstNode`]" +"(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.AstNode." +"html)s. This is the same shape the REST `/ast` endpoint produces. Call it " +"on the parse handle:" msgstr "" "構造化された AST をデータとして扱いたいパイプライン(差分、ワイヤ越しのクエ" "リ、言語非依存のスキーマ作業など)のために、[`Ast::dump`](https://docs.rs/" "big-code-analysis/*/big_code_analysis/struct.Ast.html#method.dump) はツリー" -"を、[`AstNode`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." -"AstNode.html) からなる `Serialize` 可能な [`AstResponse`](https://docs.rs/" -"big-code-analysis/*/big_code_analysis/struct.AstResponse.html) として実体化し" -"ます。これは REST の `/ast` エンドポイントが生成するのと同じ形状です。パース" -"ハンドルに対して呼び出します。" +"を、[`AstNode`](https://docs.rs/big-code-analysis/*/big_code_analysis/" +"struct.AstNode.html) からなる `Serialize` 可能な [`AstResponse`](https://" +"docs.rs/big-code-analysis/*/big_code_analysis/struct.AstResponse.html) とし" +"て実体化します。これは REST の `/ast` エンドポイントが生成するのと同じ形状で" +"す。パースハンドルに対して呼び出します。" #: src/library/ast-traversal.md:277 msgid "\"snippet\"" @@ -20220,16 +20945,16 @@ msgstr "" msgid "" "**Incremental reparse** — tree-sitter supports `tree_sitter::InputEdit` for " "incremental updates, but `Ast` is a snapshot. To reflect a source edit, " -"build a fresh `Ast::parse` or drive `tree_sitter::Parser::parse(&new_source, " -"Some(&old_tree))` directly via the re-exported `tree_sitter` and feed the " -"result through [`Ast::from_tree_sitter`](parse-once.md#adopting-a-caller-" -"built-tree)." -msgstr "" -"**増分再パース** — tree-sitter は増分更新のための `tree_sitter::InputEdit` を" -"サポートしていますが、`Ast` はスナップショットです。ソースの編集を反映するに" -"は、新しく `Ast::parse` を実行するか、再エクスポートされた `tree_sitter` を介" -"して `tree_sitter::Parser::parse(&new_source, Some(&old_tree))` を直接実行" -"し、その結果を [`Ast::from_tree_sitter`](parse-once.md#adopting-a-caller-" +"build a fresh `Ast::parse` or drive `tree_sitter::Parser::" +"parse(&new_source, Some(&old_tree))` directly via the re-exported " +"`tree_sitter` and feed the result through [`Ast::from_tree_sitter`](parse-" +"once.md#adopting-a-caller-built-tree)." +msgstr "" +"**増分再パース** — tree-sitter は増分更新のための `tree_sitter::InputEdit` " +"をサポートしていますが、`Ast` はスナップショットです。ソースの編集を反映する" +"には、新しく `Ast::parse` を実行するか、再エクスポートされた `tree_sitter` " +"を介して `tree_sitter::Parser::parse(&new_source, Some(&old_tree))` を直接実" +"行し、その結果を [`Ast::from_tree_sitter`](parse-once.md#adopting-a-caller-" "built-tree) に渡してください。" #: src/library/ast-traversal.md:315 @@ -20256,25 +20981,25 @@ msgid "" "want one number per file." msgstr "" "デフォルトでは、[`analyze`](https://docs.rs/big-code-analysis/*/" -"big_code_analysis/fn.analyze.html) のすべての呼び出しが完全なメトリクススイー" -"ト(ABC、cognitive、cyclomatic、Halstead、LoC、MI、NArgs、NExits、NOM、NPA、" -"NPM、tokens、WMC)を計算します。ユーザーが単に「メトリクス」を求めた CLI に" -"とっては正しいデフォルトですが、ファイルごとに 1 つの数値だけが欲しい呼び出し" -"側には重量級です。" +"big_code_analysis/fn.analyze.html) のすべての呼び出しが完全なメトリクスス" +"イート(ABC、cognitive、cyclomatic、Halstead、LoC、MI、NArgs、NExits、NOM、" +"NPA、NPM、tokens、WMC)を計算します。ユーザーが単に「メトリクス」を求めた " +"CLI にとっては正しいデフォルトですが、ファイルごとに 1 つの数値だけが欲しい" +"呼び出し側には重量級です。" #: src/library/selecting-metrics.md:9 msgid "" "`MetricsOptions::with_only(&[Metric])` lets you restrict the walker to a " -"subset of metrics. Unselected metrics are skipped at the per-node level — no " -"`T::Halstead::compute`, no `T::Cognitive::compute`, etc. — and elided from " -"the [`CodeMetrics`](https://docs.rs/big-code-analysis/*/big_code_analysis/" -"struct.CodeMetrics.html) serialization output." +"subset of metrics. Unselected metrics are skipped at the per-node level — " +"no `T::Halstead::compute`, no `T::Cognitive::compute`, etc. — and elided " +"from the [`CodeMetrics`](https://docs.rs/big-code-analysis/*/" +"big_code_analysis/struct.CodeMetrics.html) serialization output." msgstr "" -"`MetricsOptions::with_only(&[Metric])` を使うと、ウォーカーをメトリクスのサブ" -"セットに制限できます。選択されなかったメトリクスはノード単位でスキップされ" +"`MetricsOptions::with_only(&[Metric])` を使うと、ウォーカーをメトリクスのサ" +"ブセットに制限できます。選択されなかったメトリクスはノード単位でスキップされ" "(`T::Halstead::compute` も `T::Cognitive::compute` なども実行されません)、" -"[`CodeMetrics`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." -"CodeMetrics.html) のシリアライズ出力からも省略されます。" +"[`CodeMetrics`](https://docs.rs/big-code-analysis/*/big_code_analysis/" +"struct.CodeMetrics.html) のシリアライズ出力からも省略されます。" #: src/library/selecting-metrics.md:15 src/library/cargo-features.md:21 msgid "A worked example" @@ -20310,8 +21035,8 @@ msgid "" "The JSON output for that call contains only the `loc` object; every other " "metric is absent." msgstr "" -"この呼び出しの JSON 出力に含まれるのは `loc` オブジェクトだけで、その他のメト" -"リクスは存在しません。" +"この呼び出しの JSON 出力に含まれるのは `loc` オブジェクトだけで、その他のメ" +"トリクスは存在しません。" #: src/library/selecting-metrics.md:45 msgid "Dependencies between metrics" @@ -20319,8 +21044,8 @@ msgstr "メトリクス間の依存関係" #: src/library/selecting-metrics.md:47 msgid "" -"Two metrics are _derived_ — they consume the outputs of other metrics during " -"the finalize step:" +"Two metrics are _derived_ — they consume the outputs of other metrics " +"during the finalize step:" msgstr "" "2 つのメトリクスは _派生_ メトリクスです。ファイナライズの段階で、他のメトリ" "クスの出力を利用します。" @@ -20348,12 +21073,12 @@ msgstr "`Cyclomatic`, `Nom`" #: src/library/selecting-metrics.md:55 msgid "" "`with_only` resolves these closures silently. Asking for `Mi` alone still " -"computes `Loc + Cyclomatic + Halstead`, so the MI value is meaningful rather " -"than a function of zero-default inputs:" +"computes `Loc + Cyclomatic + Halstead`, so the MI value is meaningful " +"rather than a function of zero-default inputs:" msgstr "" -"`with_only` はこれらの依存関係の閉包を暗黙のうちに解決します。`Mi` だけを指定" -"しても `Loc + Cyclomatic + Halstead` が計算されるため、MI の値はゼロデフォル" -"ト入力の関数ではなく、意味のある値になります。" +"`with_only` はこれらの依存関係の閉包を暗黙のうちに解決します。`Mi` だけを指" +"定しても `Loc + Cyclomatic + Halstead` が計算されるため、MI の値はゼロデフォ" +"ルト入力の関数ではなく、意味のある値になります。" #: src/library/selecting-metrics.md:62 msgid "// opts.metrics now contains Mi + Loc + Cyclomatic + Halstead.\n" @@ -20367,9 +21092,9 @@ msgid "" "docs.rs/big-code-analysis/*/big_code_analysis/struct.FuncSpace.html) via " "`space.metrics.selected()`:" msgstr "" -"最終的な選択集合は、得られた [`FuncSpace`](https://docs.rs/big-code-analysis/" -"*/big_code_analysis/struct.FuncSpace.html) から `space.metrics.selected()` を" -"介して確認できます。" +"最終的な選択集合は、得られた [`FuncSpace`](https://docs.rs/big-code-" +"analysis/*/big_code_analysis/struct.FuncSpace.html) から `space.metrics." +"selected()` を介して確認できます。" #: src/library/selecting-metrics.md:77 msgid "// auto-added dependency\n" @@ -20401,25 +21126,25 @@ msgid "" "`Metric::dependencies`, whereas an exclusion list would need to decide what " "to do when the caller excludes a dependency of a metric they kept." msgstr "" -"補集合を指定する組み込み API はありません。`with_only` が受け取るのは除外リス" -"トではなく、選択対象の明示的なリストです。この意図的な非対称性が、依存関係の" -"閉包を曖昧さのないものに保ちます。正のリストは常に `Metric::dependencies` を" -"通じて拡張されますが、除外リストの場合、残したメトリクスの依存先を呼び出し側" -"が除外したときにどうするかを決めなければならなくなります。" +"補集合を指定する組み込み API はありません。`with_only` が受け取るのは除外リ" +"ストではなく、選択対象の明示的なリストです。この意図的な非対称性が、依存関係" +"の閉包を曖昧さのないものに保ちます。正のリストは常に `Metric::dependencies` " +"を通じて拡張されますが、除外リストの場合、残したメトリクスの依存先を呼び出し" +"側が除外したときにどうするかを決めなければならなくなります。" #: src/library/selecting-metrics.md:95 msgid "" "If you genuinely want \"all except Halstead\", build the list explicitly. " -"Because `Metric` is `#[non_exhaustive]`, downstream crates can construct the " -"variants but cannot exhaustively `match` on them, so the conventional " +"Because `Metric` is `#[non_exhaustive]`, downstream crates can construct " +"the variants but cannot exhaustively `match` on them, so the conventional " "pattern is to enumerate the variants you want and accept that adding a " "future `Metric` variant will not silently opt you in:" msgstr "" -"本当に「Halstead 以外のすべて」が欲しい場合は、リストを明示的に構築してくださ" -"い。`Metric` は `#[non_exhaustive]` なので、下流のクレートはバリアントを構築" -"できますが、網羅的に `match` することはできません。そのため慣習的なパターン" -"は、必要なバリアントを列挙し、将来 `Metric` バリアントが追加されても自動的に" -"は含まれないことを受け入れる、というものです。" +"本当に「Halstead 以外のすべて」が欲しい場合は、リストを明示的に構築してくだ" +"さい。`Metric` は `#[non_exhaustive]` なので、下流のクレートはバリアントを構" +"築できますが、網羅的に `match` することはできません。そのため慣習的なパター" +"ンは、必要なバリアントを列挙し、将来 `Metric` バリアントが追加されても自動的" +"には含まれないことを受け入れる、というものです。" #: src/library/selecting-metrics.md:117 msgid "" @@ -20475,17 +21200,17 @@ msgid "" "Per-metric Cargo features (compile-time stripping) are not covered by this " "knob." msgstr "" -"メトリクス単位の Cargo フィーチャ(コンパイル時の除去)は、このノブの対象外で" -"す。" +"メトリクス単位の Cargo フィーチャ(コンパイル時の除去)は、このノブの対象外" +"です。" #: src/library/cargo-features.md:3 msgid "" -"Every tree-sitter grammar this library bundles is gated behind its own Cargo " -"feature. The default feature set is `all-languages`, so the default" +"Every tree-sitter grammar this library bundles is gated behind its own " +"Cargo feature. The default feature set is `all-languages`, so the default" msgstr "" "このライブラリが同梱する tree-sitter 文法は、どれも専用の Cargo フィーチャで" -"ゲートされています。デフォルトのフィーチャセットは `all-languages` なので、次" -"のデフォルト指定" +"ゲートされています。デフォルトのフィーチャセットは `all-languages` なので、" +"次のデフォルト指定" #: src/library/cargo-features.md:7 msgid "" @@ -20506,10 +21231,10 @@ msgid "" "concrete: every grammar crate compiles when the library compiles, and every " "grammar's parsing tables stay live in the final binary." msgstr "" -"は、すべての文法を取り込みます。これはライブラリの従来の動作、および `bca` / " -"`bca-web` バイナリ自体が同梱するものと一致します。そのコストは具体的です。ラ" -"イブラリのコンパイル時にはすべての文法クレートがコンパイルされ、最終バイナリ" -"にはすべての文法のパーステーブルが残り続けます。" +"は、すべての文法を取り込みます。これはライブラリの従来の動作、および " +"`bca` / `bca-web` バイナリ自体が同梱するものと一致します。そのコストは具体的" +"です。ライブラリのコンパイル時にはすべての文法クレートがコンパイルされ、最終" +"バイナリにはすべての文法のパーステーブルが残り続けます。" #: src/library/cargo-features.md:18 msgid "" @@ -20553,9 +21278,9 @@ msgstr "サポートされるフィーチャ" #: src/library/cargo-features.md:36 msgid "" -"The following per-language features are available. Each feature pulls in the " -"matching grammar crate (and any helper grammars the per-language pipeline " -"depends on)." +"The following per-language features are available. Each feature pulls in " +"the matching grammar crate (and any helper grammars the per-language " +"pipeline depends on)." msgstr "" "利用できる言語別フィーチャは次のとおりです。各フィーチャは、対応する文法ク" "レート(および言語別パイプラインが依存するヘルパー文法)を取り込みます。" @@ -20585,8 +21310,8 @@ msgid "" "`tree-sitter-c` (+ `c-family-helpers`); dedicated `C` variant owning `.c`, " "added in #721" msgstr "" -"`tree-sitter-c`(+ `c-family-helpers`)。`.c` を担当する専用の `C` バリアント" -"(#721 で追加)" +"`tree-sitter-c`(+ `c-family-helpers`)。`.c` を担当する専用の `C` バリアン" +"ト(#721 で追加)" #: src/library/cargo-features.md:44 msgid "`c-family-helpers`" @@ -20695,8 +21420,8 @@ msgid "" "`bca-tree-sitter-mozcpp` (+ `c-family-helpers`); opt-in Mozilla/Gecko C++ " "dialect, `Mozcpp` variant — owns no extensions, selected by name" msgstr "" -"`bca-tree-sitter-mozcpp`(+ `c-family-helpers`)。オプトインの Mozilla/Gecko " -"C++ 方言で `Mozcpp` バリアント — 拡張子を持たず、名前で選択します" +"`bca-tree-sitter-mozcpp`(+ `c-family-helpers`)。オプトインの Mozilla/" +"Gecko C++ 方言で `Mozcpp` バリアント — 拡張子を持たず、名前で選択します" #: src/library/cargo-features.md:56 msgid "`mozjs`" @@ -20773,7 +21498,8 @@ msgstr "`typescript`" #: src/library/cargo-features.md:64 msgid "" "`tree-sitter-typescript` (used by both the `Typescript` and `Tsx` variants)" -msgstr "`tree-sitter-typescript`(`Typescript` と `Tsx` の両バリアントで使用)" +msgstr "" +"`tree-sitter-typescript`(`Typescript` と `Tsx` の両バリアントで使用)" #: src/library/cargo-features.md:66 msgid "" @@ -20781,16 +21507,16 @@ msgid "" "`bca-tree-sitter-*` crates are in-tree forks of the upstream Mozilla / " "community grammars; the Rust import path remains `tree_sitter_` " "regardless. See [`RELEASING.md`](https://github.com/dekobon/big-code-" -"analysis/blob/main/RELEASING.md#vendored-tree-sitter-grammar-publishability) " -"for the rename rationale and the workspace `package = ...` alias trick that " -"keeps consumer call sites unchanged." +"analysis/blob/main/RELEASING.md#vendored-tree-sitter-grammar-" +"publishability) for the rename rationale and the workspace `package = ...` " +"alias trick that keeps consumer call sites unchanged." msgstr "" "包括フィーチャ `all-languages` は、この表のすべてのエントリを有効にします。" -"`bca-tree-sitter-*` クレートは、アップストリームの Mozilla / コミュニティ文法" -"のツリー内フォークですが、Rust のインポートパスはいずれも " -"`tree_sitter_` のままです。リネームの理由と、利用側の呼び出し箇所を変更" -"せずに済ませるワークスペースの `package = ...` エイリアスの仕組みについては、" -"[`RELEASING.md`](https://github.com/dekobon/big-code-analysis/blob/main/" +"`bca-tree-sitter-*` クレートは、アップストリームの Mozilla / コミュニティ文" +"法のツリー内フォークですが、Rust のインポートパスはいずれも " +"`tree_sitter_` のままです。リネームの理由と、利用側の呼び出し箇所を変" +"更せずに済ませるワークスペースの `package = ...` エイリアスの仕組みについて" +"は、[`RELEASING.md`](https://github.com/dekobon/big-code-analysis/blob/main/" "RELEASING.md#vendored-tree-sitter-grammar-publishability) を参照してくださ" "い。" @@ -20800,13 +21526,13 @@ msgstr "フィーチャが無効なときに起こること" #: src/library/cargo-features.md:76 msgid "" -"The `LANG` enum keeps every variant defined regardless of the active feature " -"set — disabling a feature does not change the enum surface or any of the " -"file-extension / emacs-mode detection helpers. Selecting a `LANG` whose " -"feature is off only affects the dispatch path." +"The `LANG` enum keeps every variant defined regardless of the active " +"feature set — disabling a feature does not change the enum surface or any " +"of the file-extension / emacs-mode detection helpers. Selecting a `LANG` " +"whose feature is off only affects the dispatch path." msgstr "" -"`LANG` 列挙型は、有効なフィーチャセットに関係なくすべてのバリアントを定義した" -"まま保ちます。フィーチャを無効にしても、列挙型の表面や、ファイル拡張子 / " +"`LANG` 列挙型は、有効なフィーチャセットに関係なくすべてのバリアントを定義し" +"たまま保ちます。フィーチャを無効にしても、列挙型の表面や、ファイル拡張子 / " "emacs モード検出ヘルパーは一切変わりません。フィーチャが無効な `LANG` を選択" "した場合に影響を受けるのは、ディスパッチ経路だけです。" @@ -20828,8 +21554,8 @@ msgstr "" #: src/library/cargo-features.md:86 msgid "" -"`Ast::parse` / `Ast::from_tree_sitter` (and the `metrics` / `ops` methods on " -"the returned `Ast`)" +"`Ast::parse` / `Ast::from_tree_sitter` (and the `metrics` / `ops` methods " +"on the returned `Ast`)" msgstr "" "`Ast::parse` / `Ast::from_tree_sitter`(および返された `Ast` の `metrics` / " "`ops` メソッド)" @@ -20837,14 +21563,14 @@ msgstr "" #: src/library/cargo-features.md:88 msgid "" "[`LANG::tree_sitter_language`](https://docs.rs/big-code-analysis/latest/" -"big_code_analysis/enum.LANG.html#method.tree_sitter_language) — this returns " -"`Result` rather than the bare " +"big_code_analysis/enum.LANG.html#method.tree_sitter_language) — this " +"returns `Result` rather than the bare " "`Language` the upstream project returned" msgstr "" "[`LANG::tree_sitter_language`](https://docs.rs/big-code-analysis/latest/" "big_code_analysis/enum.LANG.html#method.tree_sitter_language) — アップスト" -"リームプロジェクトが返していた素の `Language` ではなく、`Result` を返します" +"リームプロジェクトが返していた素の `Language` ではなく、" +"`Result` を返します" #: src/library/cargo-features.md:92 msgid "" @@ -20862,17 +21588,17 @@ msgid "" "This pairs well with the [`get_language_for_file`](https://docs.rs/big-code-" "analysis/latest/big_code_analysis/fn.get_language_for_file.html) / " "[`guess_language`](https://docs.rs/big-code-analysis/latest/" -"big_code_analysis/fn.guess_language.html) helpers, which still hand back any " -"`LANG` variant for a recognised extension — callers walking a directory may " -"want to skip files whose language is not enabled in the current build." +"big_code_analysis/fn.guess_language.html) helpers, which still hand back " +"any `LANG` variant for a recognised extension — callers walking a directory " +"may want to skip files whose language is not enabled in the current build." msgstr "" "これは [`get_language_for_file`](https://docs.rs/big-code-analysis/latest/" "big_code_analysis/fn.get_language_for_file.html) / [`guess_language`]" "(https://docs.rs/big-code-analysis/latest/big_code_analysis/fn." -"guess_language.html) ヘルパーと組み合わせると便利です。これらのヘルパーは、認" -"識された拡張子に対して引き続き任意の `LANG` バリアントを返すため、ディレクト" -"リを走査する呼び出し側は、現在のビルドで有効になっていない言語のファイルをス" -"キップするとよいでしょう。" +"guess_language.html) ヘルパーと組み合わせると便利です。これらのヘルパーは、" +"認識された拡張子に対して引き続き任意の `LANG` バリアントを返すため、ディレク" +"トリを走査する呼び出し側は、現在のビルドで有効になっていない言語のファイルを" +"スキップするとよいでしょう。" #: src/library/cargo-features.md:112 msgid "Stability" @@ -20904,17 +21630,17 @@ msgid "" "level node represents the whole file; its `spaces` field holds nested " "function / class / impl / trait / namespace spaces. Each node carries the " "same [`CodeMetrics`](https://docs.rs/big-code-analysis/*/big_code_analysis/" -"struct.CodeMetrics.html) payload, so any metric is available at any level of " -"granularity." +"struct.CodeMetrics.html) payload, so any metric is available at any level " +"of granularity." msgstr "" "[`FuncSpace`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." "FuncSpace.html) は、ライブラリが [`analyze`](https://docs.rs/big-code-" "analysis/*/big_code_analysis/fn.analyze.html) から返すツリーです。トップレベ" "ルのノードはファイル全体を表し、その `spaces` フィールドにはネストされた関" -"数 / クラス / impl / トレイト / 名前空間のスペースが入ります。各ノードは同じ " -"[`CodeMetrics`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct." -"CodeMetrics.html) ペイロードを持つため、どのメトリクスも任意の粒度で参照でき" -"ます。" +"数 / クラス / impl / トレイト / 名前空間のスペースが入ります。各ノードは同" +"じ [`CodeMetrics`](https://docs.rs/big-code-analysis/*/big_code_analysis/" +"struct.CodeMetrics.html) ペイロードを持つため、どのメトリクスも任意の粒度で" +"参照できます。" #: src/library/walking-funcspace.md:10 msgid "Anatomy of a `FuncSpace`" @@ -20938,7 +21664,8 @@ msgstr "`Option`" #: src/library/walking-funcspace.md:16 msgid "Caller-supplied identifier (top-level) or symbol name (nested)" -msgstr "呼び出し側が指定した識別子(トップレベル)またはシンボル名(ネスト時)" +msgstr "" +"呼び出し側が指定した識別子(トップレベル)またはシンボル名(ネスト時)" #: src/library/walking-funcspace.md:17 msgid "`kind`" @@ -21012,7 +21739,8 @@ msgid "" msgstr "" "[`SpaceKind`](https://docs.rs/big-code-analysis/*/big_code_analysis/enum." "SpaceKind.html) は列挙型です。これに対してマッチすることで、関心のあるもの" -"(`Function` のみ、あるいは「メソッドを持つものすべて」など)に絞り込めます。" +"(`Function` のみ、あるいは「メソッドを持つものすべて」など)に絞り込めま" +"す。" #: src/library/walking-funcspace.md:27 msgid "Recursive walk" @@ -21020,8 +21748,8 @@ msgstr "再帰的な走査" #: src/library/walking-funcspace.md:29 msgid "" -"Recursion mirrors the tree shape. Here we collect every function space whose " -"cognitive complexity exceeds a threshold:" +"Recursion mirrors the tree shape. Here we collect every function space " +"whose cognitive complexity exceeds a threshold:" msgstr "" "再帰はツリーの形をそのまま反映します。ここでは、認知的複雑度がしきい値を超え" "るすべての関数スペースを収集します。" @@ -21056,11 +21784,11 @@ msgstr "反復的な走査" #: src/library/walking-funcspace.md:75 msgid "" -"For deep trees, prefer an explicit stack — Rust does not tail-call-optimise, " -"and pathological generated code can be arbitrarily nested:" +"For deep trees, prefer an explicit stack — Rust does not tail-call-" +"optimise, and pathological generated code can be arbitrarily nested:" msgstr "" -"深いツリーには明示的なスタックを使ってください。Rust は末尾呼び出し最適化を行" -"わず、病的な生成コードは際限なくネストし得ます。" +"深いツリーには明示的なスタックを使ってください。Rust は末尾呼び出し最適化を" +"行わず、病的な生成コードは際限なくネストし得ます。" #: src/library/walking-funcspace.md:95 msgid "Reading per-metric numbers" @@ -21107,9 +21835,9 @@ msgid "" "fields and methods lives in the [per-metric rustdoc](https://docs.rs/big-" "code-analysis/*/big_code_analysis/)." msgstr "" -"`*_sum` アクセサは子スペースをまたいで集計します。`m.loc.sloc()` のような素の" -"アクセサは、_この_ ノード自体に帰属する値です。フィールドとメソッドの全一覧は" -"[メトリクスごとの rustdoc](https://docs.rs/big-code-analysis/*/" +"`*_sum` アクセサは子スペースをまたいで集計します。`m.loc.sloc()` のような素" +"のアクセサは、_この_ ノード自体に帰属する値です。フィールドとメソッドの全一" +"覧は[メトリクスごとの rustdoc](https://docs.rs/big-code-analysis/*/" "big_code_analysis/) にあります。" #: src/library/walking-funcspace.md:121 @@ -21140,13 +21868,13 @@ msgstr "" #: src/library/error-handling.md:6 msgid "" -"**Heads up.** `MetricsError` is `#[non_exhaustive]`, so always include a `_` " -"arm when matching exhaustively to stay forward-compatible with future " +"**Heads up.** `MetricsError` is `#[non_exhaustive]`, so always include a " +"`_` arm when matching exhaustively to stay forward-compatible with future " "variants." msgstr "" -"**注意。** `MetricsError` は `#[non_exhaustive]` です。将来のバリアントに対す" -"る前方互換性を保つため、網羅的にマッチする際は必ず `_` アームを含めてくださ" -"い。" +"**注意。** `MetricsError` は `#[non_exhaustive]` です。将来のバリアントに対" +"する前方互換性を保つため、網羅的にマッチする際は必ず `_` アームを含めてくだ" +"さい。" #: src/library/error-handling.md:10 msgid "Pattern-matching the error variants" @@ -21171,8 +21899,8 @@ msgstr "\"language {:?} is not enabled in this build\"" #: src/library/error-handling.md:30 msgid "// `MetricsError` is `#[non_exhaustive]`; new variants may be added.\n" msgstr "" -"// `MetricsError` は `#[non_exhaustive]` です。新しいバリアントが追加される可" -"能性があります。\n" +"// `MetricsError` は `#[non_exhaustive]` です。新しいバリアントが追加される" +"可能性があります。\n" #: src/library/error-handling.md:31 msgid "\"unexpected MetricsError variant\"" @@ -21185,19 +21913,19 @@ msgstr "各バリアントの意味" #: src/library/error-handling.md:38 msgid "" "**`EmptyRoot`** — Reserved; not produced today. `metrics_with_options` " -"always pushes a synthetic top-level `Unit` [`FuncSpace`](https://docs.rs/big-" -"code-analysis/*/big_code_analysis/struct.FuncSpace.html) before walking the " -"AST, so every parse — including empty, whitespace-only, and comment-only " -"input — returns `Ok(FuncSpace { kind: Unit, .. })`. The variant is kept for " -"a future walker change that could let the state stack legitimately drain to " -"empty." +"always pushes a synthetic top-level `Unit` [`FuncSpace`](https://docs.rs/" +"big-code-analysis/*/big_code_analysis/struct.FuncSpace.html) before walking " +"the AST, so every parse — including empty, whitespace-only, and comment-" +"only input — returns `Ok(FuncSpace { kind: Unit, .. })`. The variant is " +"kept for a future walker change that could let the state stack legitimately " +"drain to empty." msgstr "" "**`EmptyRoot`** — 予約済みで、現在は生成されません。`metrics_with_options` " -"は AST の走査前に必ず合成のトップレベル `Unit` [`FuncSpace`](https://docs.rs/" -"big-code-analysis/*/big_code_analysis/struct.FuncSpace.html) をプッシュするた" -"め、空の入力・空白のみの入力・コメントのみの入力を含むすべてのパースが " -"`Ok(FuncSpace { kind: Unit, .. })` を返します。このバリアントは、状態スタック" -"が正当に空になり得るような将来のウォーカー変更に備えて残されています。" +"は AST の走査前に必ず合成のトップレベル `Unit` [`FuncSpace`](https://docs." +"rs/big-code-analysis/*/big_code_analysis/struct.FuncSpace.html) をプッシュす" +"るため、空の入力・空白のみの入力・コメントのみの入力を含むすべてのパースが " +"`Ok(FuncSpace { kind: Unit, .. })` を返します。このバリアントは、状態スタッ" +"クが正当に空になり得るような将来のウォーカー変更に備えて残されています。" #: src/library/error-handling.md:44 msgid "" @@ -21205,34 +21933,35 @@ msgid "" "build. Every dispatch entry point produces it when the caller selects a " "`LANG` whose per-language Cargo feature is off. The default feature set " "(`all-languages`) compiles every grammar in, so you only see this variant " -"after opting into a narrower set (`--no-default-features --features rust,…`)." +"after opting into a narrower set (`--no-default-features --features rust,…" +"`)." msgstr "" -"**`LanguageDisabled(LANG)`** — 要求された `LANG` がこのビルドで有効になってい" -"ません。呼び出し側が、言語ごとの Cargo フィーチャが無効な `LANG` を選択する" -"と、すべてのディスパッチエントリポイントがこのバリアントを生成します。デフォ" -"ルトのフィーチャセット(`all-languages`)はすべての文法をコンパイルに含めるた" -"め、このバリアントを見るのは、より狭いセット(`--no-default-features --" -"features rust,…`)にオプトインした後だけです。" +"**`LanguageDisabled(LANG)`** — 要求された `LANG` がこのビルドで有効になって" +"いません。呼び出し側が、言語ごとの Cargo フィーチャが無効な `LANG` を選択す" +"ると、すべてのディスパッチエントリポイントがこのバリアントを生成します。デ" +"フォルトのフィーチャセット(`all-languages`)はすべての文法をコンパイルに含" +"めるため、このバリアントを見るのは、より狭いセット(`--no-default-features " +"--features rust,…`)にオプトインした後だけです。" #: src/library/error-handling.md:51 msgid "" "`MetricsError` has no `ParseHasErrors` or `NonUtf8Path` variant; since it " -"stays `#[non_exhaustive]`, a future strict-parsing or strict-identifier mode " -"can introduce them without a breaking change. Non-UTF-8 paths are already " -"handled up front: the recommended [`analyze`](https://docs.rs/big-code-" -"analysis/*/big_code_analysis/fn.analyze.html) entry point takes a caller-" -"supplied [`Source::name`](https://docs.rs/big-code-analysis/*/" +"stays `#[non_exhaustive]`, a future strict-parsing or strict-identifier " +"mode can introduce them without a breaking change. Non-UTF-8 paths are " +"already handled up front: the recommended [`analyze`](https://docs.rs/big-" +"code-analysis/*/big_code_analysis/fn.analyze.html) entry point takes a " +"caller-supplied [`Source::name`](https://docs.rs/big-code-analysis/*/" "big_code_analysis/struct.Source.html#structfield.name) (`Option`), " "so a lossy path is never round-tripped in the first place." msgstr "" "`MetricsError` には `ParseHasErrors` や `NonUtf8Path` といったバリアントはあ" "りません。`#[non_exhaustive]` のままであるため、将来の厳格パースモードや厳格" -"識別子モードは、破壊的変更なしにそれらを導入できます。非 UTF-8 のパスはすでに" -"前段で処理されています。推奨エントリポイントの [`analyze`](https://docs.rs/" -"big-code-analysis/*/big_code_analysis/fn.analyze.html) は、呼び出し側が指定す" -"る [`Source::name`](https://docs.rs/big-code-analysis/*/big_code_analysis/" -"struct.Source.html#structfield.name)(`Option`)を受け取るため、損失" -"のあるパスがそもそも往復されることはありません。" +"識別子モードは、破壊的変更なしにそれらを導入できます。非 UTF-8 のパスはすで" +"に前段で処理されています。推奨エントリポイントの [`analyze`](https://docs." +"rs/big-code-analysis/*/big_code_analysis/fn.analyze.html) は、呼び出し側が指" +"定する [`Source::name`](https://docs.rs/big-code-analysis/*/" +"big_code_analysis/struct.Source.html#structfield.name)(`Option`)を" +"受け取るため、損失のあるパスがそもそも往復されることはありません。" #: src/library/error-handling.md:59 msgid "Tree-sitter does not always say \"no\"" @@ -21247,23 +21976,23 @@ msgid "" msgstr "" "ほとんどのパースエラーは `Err(_)` としては _現れません_。tree-sitter は**エ" "ラー回復型**のパーサーであり、構文的に壊れた入力に対してもツリーを生成し、問" -"題のある領域を `ERROR` ノードでマークします。メトリクスの走査は、回復されたツ" -"リーの上で何事もなかったかのように数値を計算します。つまり次のことが起こりま" -"す。" +"題のある領域を `ERROR` ノードでマークします。メトリクスの走査は、回復された" +"ツリーの上で何事もなかったかのように数値を計算します。つまり次のことが起こり" +"ます。" #: src/library/error-handling.md:67 msgid "" "**Garbage in, numbers out.** Feeding C++ source to `LANG::Python` generally " "produces an `Ok(FuncSpace)` whose metrics are nonsense. Make sure you have " -"selected the right language (e.g. via [`guess_language`](https://docs.rs/big-" -"code-analysis/*/big_code_analysis/fn.guess_language.html)) before trusting " -"the result." +"selected the right language (e.g. via [`guess_language`](https://docs.rs/" +"big-code-analysis/*/big_code_analysis/fn.guess_language.html)) before " +"trusting the result." msgstr "" -"**ゴミを入れれば、数値が出てきます。** C++ のソースを `LANG::Python` に与えて" -"も、たいていはメトリクスが無意味な `Ok(FuncSpace)` が返ります。結果を信頼する" -"前に、正しい言語を選択していること(例えば [`guess_language`](https://docs." -"rs/big-code-analysis/*/big_code_analysis/fn.guess_language.html) を使って)を" -"確認してください。" +"**ゴミを入れれば、数値が出てきます。** C++ のソースを `LANG::Python` に与え" +"ても、たいていはメトリクスが無意味な `Ok(FuncSpace)` が返ります。結果を信頼" +"する前に、正しい言語を選択していること(例えば [`guess_language`](https://" +"docs.rs/big-code-analysis/*/big_code_analysis/fn.guess_language.html) を使っ" +"て)を確認してください。" #: src/library/error-handling.md:71 msgid "" @@ -21271,25 +22000,25 @@ msgid "" "still return `Ok(FuncSpace)`. The metrics reflect the recovered tree, not " "the intended source." msgstr "" -"**不完全なファイルにもスコアが付きます。** 閉じられていない波かっこを含む、途" -"中で切れたファイルでも `Ok(FuncSpace)` が返ります。メトリクスは、意図された" -"ソースではなく回復されたツリーを反映します。" +"**不完全なファイルにもスコアが付きます。** 閉じられていない波かっこを含む、" +"途中で切れたファイルでも `Ok(FuncSpace)` が返ります。メトリクスは、意図され" +"たソースではなく回復されたツリーを反映します。" #: src/library/error-handling.md:75 msgid "" -"If you need to know whether the input parsed cleanly, count `ERROR` nodes by " -"walking the tree-sitter AST yourself (see the [`Node`](https://docs.rs/big-" -"code-analysis/*/big_code_analysis/struct.Node.html) escape hatch in " +"If you need to know whether the input parsed cleanly, count `ERROR` nodes " +"by walking the tree-sitter AST yourself (see the [`Node`](https://docs.rs/" +"big-code-analysis/*/big_code_analysis/struct.Node.html) escape hatch in " "[`STABILITY.md`](https://github.com/dekobon/big-code-analysis/blob/main/" "STABILITY.md#escape-hatches)) or use `bca find -t ERROR` on the CLI side " "(see the [Nodes](../commands/nodes.md) page)." msgstr "" -"入力が正常にパースされたかどうかを知る必要がある場合は、tree-sitter の AST を" -"自分で走査して `ERROR` ノードを数えるか([`STABILITY.md`](https://github.com/" -"dekobon/big-code-analysis/blob/main/STABILITY.md#escape-hatches) の [`Node`]" -"(https://docs.rs/big-code-analysis/*/big_code_analysis/struct.Node.html) エス" -"ケープハッチを参照)、CLI 側で `bca find -t ERROR` を使ってください([Nodes]" -"(../commands/nodes.md) ページを参照)。" +"入力が正常にパースされたかどうかを知る必要がある場合は、tree-sitter の AST " +"を自分で走査して `ERROR` ノードを数えるか([`STABILITY.md`](https://github." +"com/dekobon/big-code-analysis/blob/main/STABILITY.md#escape-hatches) の " +"[`Node`](https://docs.rs/big-code-analysis/*/big_code_analysis/struct.Node." +"html) エスケープハッチを参照)、CLI 側で `bca find -t ERROR` を使ってくださ" +"い([Nodes](../commands/nodes.md) ページを参照)。" #: src/library/error-handling.md:82 msgid "Bubbling `MetricsError` through `?`" @@ -21301,14 +22030,14 @@ msgid "" "it through any `Result<_, Box>` chain without boilerplate:" msgstr "" "`MetricsError` は \\[`std::error::Error`\\] を実装しているため、ボイラープ" -"レートなしに任意の `Result<_, Box>` チェーンを通して伝播させられま" -"す。" +"レートなしに任意の `Result<_, Box>` チェーンを通して伝播させられ" +"ます。" #: src/library/error-handling.md:105 msgid "" "If you want a project-specific error type, an explicit `From` impl keeps " -"call sites clean while letting you attach extra context (file path, language " -"guess, etc.)." +"call sites clean while letting you attach extra context (file path, " +"language guess, etc.)." msgstr "" "プロジェクト固有のエラー型が欲しい場合は、明示的な `From` 実装を書けば、呼び" "出し箇所を簡潔に保ちながら、追加のコンテキスト(ファイルパス、言語の推定結果" @@ -21341,10 +22070,10 @@ msgid "" "file is the source of truth and is updated alongside the changelog at every " "release." msgstr "" -"`big-code-analysis` は `2.x` 系列(現在は `2.0.0`)です。完全な安定性契約は、" -"リポジトリのルートにある [`STABILITY.md`](https://github.com/dekobon/big-" -"code-analysis/blob/main/STABILITY.md) に記載されています。このファイルが唯一" -"の正であり、各リリースでチェンジログとともに更新されます。" +"`big-code-analysis` は `2.x` 系列(現在は `2.0.0`)です。完全な安定性契約" +"は、リポジトリのルートにある [`STABILITY.md`](https://github.com/dekobon/" +"big-code-analysis/blob/main/STABILITY.md) に記載されています。このファイルが" +"唯一の正であり、各リリースでチェンジログとともに更新されます。" #: src/library/stability.md:10 msgid "The headlines for library consumers:" @@ -21354,21 +22083,21 @@ msgstr "ライブラリ利用者向けの要点は次のとおりです。" msgid "" "**Shape stability across patch and minor bumps.** Every public type and " "function signature listed in [STABILITY.md § \"What is stable in shape\"]" -"(https://github.com/dekobon/big-code-analysis/blob/main/STABILITY.md#what-is-" -"stable-in-shape) is held across the `2.x` line. Additive changes (new items, " -"new `LANG` variants, new `MetricsError` variants, new language features) are " -"allowed in minor bumps. Breaking shape changes are reserved for the next " -"major bump and will appear in the [changelog](https://github.com/dekobon/big-" -"code-analysis/blob/main/CHANGELOG.md) under **(breaking)** in the `3.0.0` " -"section." +"(https://github.com/dekobon/big-code-analysis/blob/main/STABILITY.md#what-" +"is-stable-in-shape) is held across the `2.x` line. Additive changes (new " +"items, new `LANG` variants, new `MetricsError` variants, new language " +"features) are allowed in minor bumps. Breaking shape changes are reserved " +"for the next major bump and will appear in the [changelog](https://github." +"com/dekobon/big-code-analysis/blob/main/CHANGELOG.md) under **(breaking)** " +"in the `3.0.0` section." msgstr "" "**パッチ・マイナーバンプをまたぐ形状の安定性。** [STABILITY.md § \"What is " "stable in shape\"](https://github.com/dekobon/big-code-analysis/blob/main/" "STABILITY.md#what-is-stable-in-shape) に列挙されたすべての公開型と関数シグネ" "チャは、`2.x` 系列を通じて維持されます。追加的変更(新しい項目、新しい " -"`LANG` バリアント、新しい `MetricsError` バリアント、新しい言語フィーチャ)は" -"マイナーバンプで許可されます。破壊的な形状変更は次のメジャーバンプまで保留さ" -"れ、[チェンジログ](https://github.com/dekobon/big-code-analysis/blob/main/" +"`LANG` バリアント、新しい `MetricsError` バリアント、新しい言語フィーチャ)" +"はマイナーバンプで許可されます。破壊的な形状変更は次のメジャーバンプまで保留" +"され、[チェンジログ](https://github.com/dekobon/big-code-analysis/blob/main/" "CHANGELOG.md) の `3.0.0` セクションに **(breaking)** として記載されます。" #: src/library/stability.md:21 @@ -21379,19 +22108,23 @@ msgid "" "changelog. Pin to an exact version (`big-code-analysis = \"= 2.0.0\"`) if " "you need bit-for-bit reproducibility across runs." msgstr "" -"**`2.x` 内での値の安定性は保証されません。** 文法ピンのバンプやメトリクス定義" -"のバグ修正は、パッチバンプであっても、任意のファイルの任意のメトリクス値を任" -"意の方向に変動させ得ます。そのようなドリフトはいずれもチェンジログに明記され" -"ます。実行間でビット単位の再現性が必要な場合は、正確なバージョンにピン留めし" -"てください(`big-code-analysis = \"= 2.0.0\"`)。" +"**`2.x` 内での値の安定性は保証されません。** 文法ピンのバンプやメトリクス定" +"義のバグ修正は、パッチバンプであっても、任意のファイルの任意のメトリクス値を" +"任意の方向に変動させ得ます。そのようなドリフトはいずれもチェンジログに明記さ" +"れます。実行間でビット単位の再現性が必要な場合は、正確なバージョンにピン留め" +"してください(`big-code-analysis = \"= 2.0.0\"`)。" #: src/library/stability.md:27 msgid "" -"**MSRV is `1.94`.** Bumping the MSRV is treated as a minor-bump event and is " -"flagged in the changelog under **(breaking)** — see [STABILITY.md § MSRV " +"**MSRV is `1.94`.** Bumping the MSRV is treated as a minor-bump event and " +"is flagged in the changelog under **(breaking)** — see [STABILITY.md § MSRV " "policy](https://github.com/dekobon/big-code-analysis/blob/main/STABILITY." "md#msrv-policy)." -msgstr "**MSRV は `1.94` です。**MSRV の引き上げはマイナーバンプ相当のイベントとして扱われ、チェンジログに**(breaking)** として明記されます — [STABILITY.md § MSRV policy](https://github.com/dekobon/big-code-analysis/blob/main/STABILITY.md#msrv-policy) を参照してください。" +msgstr "" +"**MSRV は `1.94` です。**MSRV の引き上げはマイナーバンプ相当のイベントとして" +"扱われ、チェンジログに**(breaking)** として明記されます — [STABILITY.md § " +"MSRV policy](https://github.com/dekobon/big-code-analysis/blob/main/" +"STABILITY.md#msrv-policy) を参照してください。" #: src/library/stability.md:30 msgid "" @@ -21400,9 +22133,9 @@ msgid "" "through `.0`, and the `tree_sitter` crate is re-exported as " "`big_code_analysis::tree_sitter`. Anything reached through those seams " "follows the pinned `tree-sitter` version, not our own [SemVer](https://" -"semver.org/). See [STABILITY.md § Escape hatches](https://github.com/dekobon/" -"big-code-analysis/blob/main/STABILITY.md#escape-hatches) before depending on " -"them." +"semver.org/). See [STABILITY.md § Escape hatches](https://github.com/" +"dekobon/big-code-analysis/blob/main/STABILITY.md#escape-hatches) before " +"depending on them." msgstr "" "**エスケープハッチ。** [`Node`](https://docs.rs/big-code-analysis/*/" "big_code_analysis/struct.Node.html) ラッパーは `.0` を通じて `tree_sitter::" @@ -21434,11 +22167,11 @@ msgid "" "types demoted to `pub(crate)`." msgstr "" "かつて `2.0` 向けに準備されていた破壊的変更は `2.0.0` で出荷済みです。開かれ" -"た公開列挙型への `#[non_exhaustive]` マーカー、シリアライズキーの正規化、整数" -"メトリクスの `u64` への移行、言語ディスパッチと文法のデフォルト変更、Python " -"と REST の表面変更、そして `1.0` 以降に蓄積したドリフトを織り込んだメトリクス" -"値の一括再ベースライン化です。パス位置引数によるコールバックディスパッチ" -"(`action` / `Callback` トレイト)、フリー関数の `metrics` / " +"た公開列挙型への `#[non_exhaustive]` マーカー、シリアライズキーの正規化、整" +"数メトリクスの `u64` への移行、言語ディスパッチと文法のデフォルト変更、" +"Python と REST の表面変更、そして `1.0` 以降に蓄積したドリフトを織り込んだメ" +"トリクス値の一括再ベースライン化です。パス位置引数によるコールバックディス" +"パッチ(`action` / `Callback` トレイト)、フリー関数の `metrics` / " "`metrics_with_options` / `get_function_spaces` / `metrics_from_tree` / " "`get_ops`、およびジェネリックな `Parser` / `ParserTrait` の配管も同時に削" "除されました。現在は [`analyze`](https://docs.rs/big-code-analysis/*/" @@ -21452,27 +22185,27 @@ msgid "" "are not yet `#[non_exhaustive]`, so adding a field is a shape break in the " "strict SemVer sense. In practice field additions are treated as additive in " "minor bumps and flagged in the changelog; marking the structs " -"`#[non_exhaustive]` is on the [`3.0` roadmap](https://github.com/dekobon/big-" -"code-analysis/blob/main/STABILITY.md#on-the-30-horizon) so that carve-out " -"can be retired." -msgstr "" -"積み残しが一つ、次のメジャーに先送りされています。メトリクスごとの `Stats` 構" -"造体はまだ `#[non_exhaustive]` ではないため、フィールドの追加は厳密な SemVer " -"の意味では形状の破壊になります。実際には、フィールド追加はマイナーバンプでの" -"追加的変更として扱われ、チェンジログに明記されます。構造体への " -"`#[non_exhaustive]` の付与は [`3.0` ロードマップ](https://github.com/dekobon/" -"big-code-analysis/blob/main/STABILITY.md#on-the-30-horizon) に載っており、こ" -"の例外扱いを廃止できるようにする予定です。" +"`#[non_exhaustive]` is on the [`3.0` roadmap](https://github.com/dekobon/" +"big-code-analysis/blob/main/STABILITY.md#on-the-30-horizon) so that carve-" +"out can be retired." +msgstr "" +"積み残しが一つ、次のメジャーに先送りされています。メトリクスごとの `Stats` " +"構造体はまだ `#[non_exhaustive]` ではないため、フィールドの追加は厳密な " +"SemVer の意味では形状の破壊になります。実際には、フィールド追加はマイナーバ" +"ンプでの追加的変更として扱われ、チェンジログに明記されます。構造体への " +"`#[non_exhaustive]` の付与は [`3.0` ロードマップ](https://github.com/" +"dekobon/big-code-analysis/blob/main/STABILITY.md#on-the-30-horizon) に載って" +"おり、この例外扱いを廃止できるようにする予定です。" #: src/library/stability.md:66 msgid "" "No `3.0` is scheduled. The `#[non_exhaustive]` markers added at `2.0` keep " -"most future additions (new enum variants, new fields) non-breaking, so `2.x` " -"is the surface you should depend on." +"most future additions (new enum variants, new fields) non-breaking, so `2." +"x` is the surface you should depend on." msgstr "" -"`3.0` の予定はありません。`2.0` で追加された `#[non_exhaustive]` マーカーによ" -"り、将来の追加(新しい列挙型バリアント、新しいフィールド)のほとんどは非破壊" -"的になるため、依存すべき表面は `2.x` です。" +"`3.0` の予定はありません。`2.0` で追加された `#[non_exhaustive]` マーカーに" +"より、将来の追加(新しい列挙型バリアント、新しいフィールド)のほとんどは非破" +"壊的になるため、依存すべき表面は `2.x` です。" #: src/python/index.md:3 msgid "" @@ -21483,21 +22216,22 @@ msgid "" msgstr "" "`big-code-analysis` はファーストパーティの Python バインディング(PyO3 + " "[maturin](https://www.maturin.rs/))を提供しており、Rust ライブラリや `bca` " -"CLI と同じメトリクスパイプラインを公開します。JSON の形状も、数値のフォーマッ" -"トも、対応言語も同じです。" +"CLI と同じメトリクスパイプラインを公開します。JSON の形状も、数値のフォー" +"マットも、対応言語も同じです。" #: src/python/index.md:16 msgid "" -"The bindings are a peer of the Rust API: anywhere this book points at a Rust " -"function (`big_code_analysis::analyze`, [`FuncSpace`](../library/walking-" -"funcspace.md), the metric modules), Python has a one-to-one equivalent. Pick " -"whichever language fits your pipeline — the metrics are identical." +"The bindings are a peer of the Rust API: anywhere this book points at a " +"Rust function (`big_code_analysis::analyze`, [`FuncSpace`](../library/" +"walking-funcspace.md), the metric modules), Python has a one-to-one " +"equivalent. Pick whichever language fits your pipeline — the metrics are " +"identical." msgstr "" "バインディングは Rust API と対等です。本書が Rust の関数" "(`big_code_analysis::analyze`、[`FuncSpace`](../library/walking-funcspace." "md)、各メトリクスモジュール)を指し示す箇所ではどこでも、Python に一対一の対" -"応物があります。パイプラインに合う方の言語を選んでください — メトリクスは同一" -"です。" +"応物があります。パイプラインに合う方の言語を選んでください — メトリクスは同" +"一です。" #: src/python/index.md:22 msgid "When to reach for Python" @@ -21509,8 +22243,8 @@ msgid "" "Polars) and want metric records as `dict`/`DataFrame` rows without shelling " "out to the CLI." msgstr "" -"すでにデータパイプラインのスタック(pandas、Jupyter、Airflow、dbt、Polars)の" -"中にいて、CLI をシェル実行することなくメトリクスレコードを `dict`/" +"すでにデータパイプラインのスタック(pandas、Jupyter、Airflow、dbt、Polars)" +"の中にいて、CLI をシェル実行することなくメトリクスレコードを `dict`/" "`DataFrame` の行として取得したい場合。" #: src/python/index.md:27 @@ -21540,8 +22274,8 @@ msgstr "" #: src/python/index.md:36 msgid "" -"If you're embedding the analysis into a long-running Rust program, the [Rust " -"library](../library/index.html) is the lower-overhead option." +"If you're embedding the analysis into a long-running Rust program, the " +"[Rust library](../library/index.html) is the lower-overhead option." msgstr "" "長時間稼働する Rust プログラムに解析を組み込むのであれば、[Rust ライブラリ]" "(../library/index.html)の方がオーバーヘッドの小さい選択肢です。" @@ -21552,17 +22286,17 @@ msgstr "本章の内容" #: src/python/index.md:42 msgid "" -"[Installation](installation.md) — `pip install`, wheel matrix, building from " -"source." +"[Installation](installation.md) — `pip install`, wheel matrix, building " +"from source." msgstr "" -"[インストール](installation.md) — `pip install`、ホイールのマトリクス、ソース" -"からのビルド。" +"[インストール](installation.md) — `pip install`、ホイールのマトリクス、ソー" +"スからのビルド。" #: src/python/index.md:44 msgid "[Quick start](quick-start.md) — analyse one file, print one metric." msgstr "" -"[クイックスタート](quick-start.md) — 1 つのファイルを解析し、1 つのメトリクス" -"を表示します。" +"[クイックスタート](quick-start.md) — 1 つのファイルを解析し、1 つのメトリク" +"スを表示します。" #: src/python/index.md:46 msgid "" @@ -21574,8 +22308,8 @@ msgstr "" #: src/python/index.md:48 msgid "" -"[Flat-record iteration](flat-records.md) — `flatten_spaces` feeding sqlite / " -"pandas." +"[Flat-record iteration](flat-records.md) — `flatten_spaces` feeding " +"sqlite / pandas." msgstr "" "[フラットレコード反復](flat-records.md) — `flatten_spaces` から sqlite / " "pandas への供給。" @@ -21625,28 +22359,28 @@ msgstr "[非同期パターン](async.md) — `asyncio.to_thread` が正規の #: src/python/index.md:63 msgid "" "The headline example on each page is embedded verbatim from an importable " -"file under `big-code-analysis-py/examples/` and exercised end-to-end by `big-" -"code-analysis-py/tests/test_book_examples.py`, so a renamed kwarg or a " +"file under `big-code-analysis-py/examples/` and exercised end-to-end by " +"`big-code-analysis-py/tests/test_book_examples.py`, so a renamed kwarg or a " "removed function on the primary path fails CI before it can rot the docs. " "Shorter illustrative snippets that surround the embedded example (logging " "recipes, regex parsing of the errno suffix, the `asyncio` anti-pattern, the " "pandas one-liner, …) are inline and intentionally not test-pinned — treat " "the embedded blocks as the canonical reference when the two disagree." msgstr "" -"各ページの冒頭の例は、`big-code-analysis-py/examples/` 配下のインポート可能な" -"ファイルからそのまま埋め込まれており、`big-code-analysis-py/tests/" -"test_book_examples.py` によってエンドツーエンドで実行されます。そのため、主要" -"経路上のキーワード引数のリネームや関数の削除は、ドキュメントを腐らせる前に " -"CI で失敗します。埋め込まれた例の周囲にある短い説明用スニペット(ロギングのレ" -"シピ、errno サフィックスの正規表現パース、`asyncio` のアンチパターン、pandas " -"のワンライナーなど)はインラインであり、意図的にテストで固定されていません — " -"両者が食い違う場合は、埋め込まれたブロックを正とみなしてください。" +"各ページの冒頭の例は、`big-code-analysis-py/examples/` 配下のインポート可能" +"なファイルからそのまま埋め込まれており、`big-code-analysis-py/tests/" +"test_book_examples.py` によってエンドツーエンドで実行されます。そのため、主" +"要経路上のキーワード引数のリネームや関数の削除は、ドキュメントを腐らせる前" +"に CI で失敗します。埋め込まれた例の周囲にある短い説明用スニペット(ロギング" +"のレシピ、errno サフィックスの正規表現パース、`asyncio` のアンチパターン、" +"pandas のワンライナーなど)はインラインであり、意図的にテストで固定されてい" +"ません — 両者が食い違う場合は、埋め込まれたブロックを正とみなしてください。" #: src/python/installation.md:3 msgid "" -"The bindings are distributed as a pure-wheel Python package. The recommended " -"install is via `pip` (or your preferred lockfile manager — `uv`, `poetry`, " -"`pdm`)." +"The bindings are distributed as a pure-wheel Python package. The " +"recommended install is via `pip` (or your preferred lockfile manager — " +"`uv`, `poetry`, `pdm`)." msgstr "" "バインディングはホイールのみ(pure-wheel)の Python パッケージとして配布され" "ます。推奨のインストール方法は `pip`(またはお好みのロックファイルマネー" @@ -21656,8 +22390,8 @@ msgstr "" msgid "" "Python `>=3.12` is required. The compiled extension uses CPython's stable " "[abi3](https://docs.python.org/3/c-api/stable.html) surface (`abi3-py312`), " -"so one wheel covers `3.12`, `3.13`, and every future minor release without a " -"per-version wheel build." +"so one wheel covers `3.12`, `3.13`, and every future minor release without " +"a per-version wheel build." msgstr "" "Python `>=3.12` が必要です。コンパイル済み拡張は CPython の安定 [abi3]" "(https://docs.python.org/3/c-api/stable.html) サーフェス(`abi3-py312`)を使" @@ -21670,12 +22404,12 @@ msgstr "Wheel マトリクス" #: src/python/installation.md:18 msgid "" -"CI publishes wheels for the following targets today. If your platform is not " -"listed, [build from source](#building-from-source)." +"CI publishes wheels for the following targets today. If your platform is " +"not listed, [build from source](#building-from-source)." msgstr "" "CI は現在、以下のターゲット向けの wheel を公開しています。お使いのプラット" -"フォームが記載されていない場合は、[ソースからビルド](#building-from-source)し" -"てください。" +"フォームが記載されていない場合は、[ソースからビルド](#building-from-source)" +"してください。" #: src/python/installation.md:21 msgid "Platform" @@ -21698,18 +22432,18 @@ msgid "" "The wheel matrix is defined in [`.github/workflows/python-wheels.yml`]" "(https://github.com/dekobon/big-code-analysis/blob/main/.github/workflows/" "python-wheels.yml). `manylinux_2_28` requires glibc `>= 2.28` (RHEL 8 / " -"Debian 10 / Ubuntu 18.10 and newer); older distributions (RHEL 7 / CentOS 7, " -"glibc 2.17) need to build from source. macOS and Windows wheels are not yet " -"shipped — `pip install` on those platforms falls back to a source build " +"Debian 10 / Ubuntu 18.10 and newer); older distributions (RHEL 7 / CentOS " +"7, glibc 2.17) need to build from source. macOS and Windows wheels are not " +"yet shipped — `pip install` on those platforms falls back to a source build " "today." msgstr "" "wheel マトリクスは [`.github/workflows/python-wheels.yml`](https://github." -"com/dekobon/big-code-analysis/blob/main/.github/workflows/python-wheels.yml) " -"で定義されています。`manylinux_2_28` には glibc `>= 2.28`(RHEL 8 / Debian " -"10 / Ubuntu 18.10 以降)が必要です。それより古いディストリビューション(RHEL " -"7 / CentOS 7、glibc 2.17)ではソースからビルドする必要があります。macOS と " -"Windows の wheel はまだ提供されていません — これらのプラットフォームでの " -"`pip install` は現在ソースビルドにフォールバックします。" +"com/dekobon/big-code-analysis/blob/main/.github/workflows/python-wheels." +"yml) で定義されています。`manylinux_2_28` には glibc `>= 2.28`(RHEL 8 / " +"Debian 10 / Ubuntu 18.10 以降)が必要です。それより古いディストリビューショ" +"ン(RHEL 7 / CentOS 7、glibc 2.17)ではソースからビルドする必要があります。" +"macOS と Windows の wheel はまだ提供されていません — これらのプラットフォー" +"ムでの `pip install` は現在ソースビルドにフォールバックします。" #: src/python/installation.md:33 msgid "Verifying the install" @@ -21727,9 +22461,9 @@ msgid "" "lockstep." msgstr "" "表示されるバージョンは、Rust ワークスペースの `Cargo.toml` にある " -"[`[workspace.package].version`](https://github.com/dekobon/big-code-analysis/" -"blob/main/Cargo.toml) と一致します — バインディングと Rust ライブラリのバー" -"ジョンは常に同期しています。" +"[`[workspace.package].version`](https://github.com/dekobon/big-code-" +"analysis/blob/main/Cargo.toml) と一致します — バインディングと Rust ライブラ" +"リのバージョンは常に同期しています。" #: src/python/installation.md:44 msgid "Building from source" @@ -21737,12 +22471,12 @@ msgstr "ソースからのビルド" #: src/python/installation.md:46 msgid "" -"If no wheel matches your platform, or you want to bind against an unreleased " -"Rust commit, build with [maturin](https://www.maturin.rs/):" +"If no wheel matches your platform, or you want to bind against an " +"unreleased Rust commit, build with [maturin](https://www.maturin.rs/):" msgstr "" -"お使いのプラットフォームに合う wheel がない場合や、未リリースの Rust コミット" -"に対してバインドしたい場合は、[maturin](https://www.maturin.rs/) でビルドしま" -"す。" +"お使いのプラットフォームに合う wheel がない場合や、未リリースの Rust コミッ" +"トに対してバインドしたい場合は、[maturin](https://www.maturin.rs/) でビルド" +"します。" #: src/python/installation.md:55 msgid "\"maturin>=1.7,<2.0\"" @@ -21755,14 +22489,14 @@ msgstr "# big_code_analysis を編集可能な形でインストール\n" #: src/python/installation.md:60 msgid "" "`maturin develop` builds the Rust extension in-place and installs it into " -"the active venv so `import big_code_analysis` resolves locally — no separate " -"`pip install -e .` step is required. The `--release` flag turns on the " -"optimiser; omit it during development for faster rebuilds." +"the active venv so `import big_code_analysis` resolves locally — no " +"separate `pip install -e .` step is required. The `--release` flag turns on " +"the optimiser; omit it during development for faster rebuilds." msgstr "" "`maturin develop` は Rust 拡張をその場でビルドしてアクティブな venv にインス" "トールするため、`import big_code_analysis` はローカルで解決されます — 別途 " -"`pip install -e .` を実行する必要はありません。`--release` フラグは最適化を有" -"効にします。開発中はこれを省略するとリビルドが高速になります。" +"`pip install -e .` を実行する必要はありません。`--release` フラグは最適化を" +"有効にします。開発中はこれを省略するとリビルドが高速になります。" #: src/python/installation.md:66 msgid "You will also need:" @@ -21773,8 +22507,8 @@ msgid "" "A stable Rust toolchain (MSRV: `1.94`). Install via [rustup](https://rustup." "rs/)." msgstr "" -"安定版の Rust ツールチェーン(MSRV: `1.94`)。[rustup](https://rustup.rs/) か" -"らインストールしてください。" +"安定版の Rust ツールチェーン(MSRV: `1.94`)。[rustup](https://rustup.rs/) " +"からインストールしてください。" #: src/python/installation.md:70 msgid "A C compiler (used by the tree-sitter grammar crates)." @@ -21790,18 +22524,18 @@ msgstr "次のステップ" #: src/python/installation.md:75 msgid "" -"Walk through the [quick-start](quick-start.md) to compute your first metric, " -"or skip ahead to [batch processing](batch.md) if you're wiring this into a " -"pipeline over many files." +"Walk through the [quick-start](quick-start.md) to compute your first " +"metric, or skip ahead to [batch processing](batch.md) if you're wiring this " +"into a pipeline over many files." msgstr "" "[クイックスタート](quick-start.md)に進んで最初のメトリクスを計算してくださ" -"い。多数のファイルを処理するパイプラインに組み込む場合は、[バッチ処理](batch." -"md)まで読み飛ばしても構いません。" +"い。多数のファイルを処理するパイプラインに組み込む場合は、[バッチ処理]" +"(batch.md)まで読み飛ばしても構いません。" #: src/python/quick-start.md:3 msgid "" -"This page walks through the minimum amount of code needed to compute metrics " -"from a single source file." +"This page walks through the minimum amount of code needed to compute " +"metrics from a single source file." msgstr "" "このページでは、単一のソースファイルからメトリクスを計算するために必要な最小" "限のコードを順に説明します。" @@ -21824,13 +22558,13 @@ msgstr "2. ファイルを分析する" #: src/python/quick-start.md:17 msgid "" -"`bca.analyze(path)` returns a `dict` matching the JSON `bca metrics --format " -"json` emits for the same file — same field order, same numeric formatting, " -"same shape." +"`bca.analyze(path)` returns a `dict` matching the JSON `bca metrics --" +"format json` emits for the same file — same field order, same numeric " +"formatting, same shape." msgstr "" -"`bca.analyze(path)` は、同じファイルに対して `bca metrics --format json` が出" -"力する JSON と一致する `dict` を返します — フィールドの順序も、数値の書式も、" -"構造も同じです。" +"`bca.analyze(path)` は、同じファイルに対して `bca metrics --format json` が" +"出力する JSON と一致する `dict` を返します — フィールドの順序も、数値の書式" +"も、構造も同じです。" #: src/python/quick-start.md:22 msgid "" @@ -21899,20 +22633,20 @@ msgstr "注目すべき点をいくつか挙げます。" #: src/python/quick-start.md:61 msgid "" -"`analyze` returns `None` for any file the CLI walker would skip: one that is " -"three bytes or fewer (treated as empty), one whose leading window is not " -"valid UTF-8 (treated as binary), or — with the default `skip_generated=True` " -"— one matching the walker's `is_generated` predicate (a leading " -"`@generated`, `DO NOT EDIT`, or `GENERATED CODE` marker). Always handle the " -"optional return before reaching into `result[\"metrics\"]`." +"`analyze` returns `None` for any file the CLI walker would skip: one that " +"is three bytes or fewer (treated as empty), one whose leading window is not " +"valid UTF-8 (treated as binary), or — with the default " +"`skip_generated=True` — one matching the walker's `is_generated` predicate " +"(a leading `@generated`, `DO NOT EDIT`, or `GENERATED CODE` marker). Always " +"handle the optional return before reaching into `result[\"metrics\"]`." msgstr "" "`analyze` は、CLI のウォーカーがスキップするファイルに対して `None` を返しま" "す。具体的には、3 バイト以下のファイル(空として扱われます)、先頭部分が有効" "な UTF-8 でないファイル(バイナリとして扱われます)、そしてデフォルトの " "`skip_generated=True` の下でウォーカーの `is_generated` 述語に一致するファイ" -"ル(先頭に `@generated`、`DO NOT EDIT`、`GENERATED CODE` のいずれかのマーカー" -"があるもの)です。`result[\"metrics\"]` の中身にアクセスする前に、必ずこのオ" -"プショナルな戻り値を処理してください。" +"ル(先頭に `@generated`、`DO NOT EDIT`、`GENERATED CODE` のいずれかのマー" +"カーがあるもの)です。`result[\"metrics\"]` の中身にアクセスする前に、必ずこ" +"のオプショナルな戻り値を処理してください。" #: src/python/quick-start.md:68 msgid "" @@ -21949,21 +22683,21 @@ msgstr "\"fn main() {}\\n\"" #: src/python/quick-start.md:88 msgid "" -"`analyze_source` accepts `str`, `bytes`, or `bytearray`. The returned `dict` " -"has the same shape as `analyze`'s output, with `name` set to `None` (no path " -"is associated with an in-memory buffer)." +"`analyze_source` accepts `str`, `bytes`, or `bytearray`. The returned " +"`dict` has the same shape as `analyze`'s output, with `name` set to `None` " +"(no path is associated with an in-memory buffer)." msgstr "" "`analyze_source` は `str`、`bytes`、`bytearray` を受け付けます。返される " -"`dict` は `analyze` の出力と同じ構造で、`name` は `None` になります(メモリ上" -"のバッファにはパスが関連付けられないためです)。" +"`dict` は `analyze` の出力と同じ構造で、`name` は `None` になります(メモリ" +"上のバッファにはパスが関連付けられないためです)。" #: src/python/quick-start.md:95 msgid "" "[Batch processing](batch.md) — `analyze_batch` for many files without per-" "file try/except clutter." msgstr "" -"[バッチ処理](batch.md) — ファイルごとの try/except の煩雑さなしに多数のファイ" -"ルを処理する `analyze_batch`。" +"[バッチ処理](batch.md) — ファイルごとの try/except の煩雑さなしに多数のファ" +"イルを処理する `analyze_batch`。" #: src/python/quick-start.md:97 msgid "[Metric selection](metrics.md) — compute only the metrics you need." @@ -21978,8 +22712,8 @@ msgid "" "The CLI's [Metrics](../commands/metrics.md) command is the equivalent shell-" "level workflow." msgstr "" -"CLI の [Metrics](../commands/metrics.md) コマンドは、これに相当するシェルレベ" -"ルのワークフローです。" +"CLI の [Metrics](../commands/metrics.md) コマンドは、これに相当するシェルレ" +"ベルのワークフローです。" #: src/python/batch.md:3 msgid "" @@ -21993,8 +22727,8 @@ msgid "" "the two entry points are behaviour-preserving." msgstr "" "`bca.analyze_batch(paths)` は、イテラブル内のすべてのパスに対して `bca." -"analyze` と同じ分析を実行し、**ファイル単位のエラーで例外を送出することはあり" -"ません**。各結果要素は、分析結果の `dict` か、失敗内容を記述する `bca." +"analyze` と同じ分析を実行し、**ファイル単位のエラーで例外を送出することはあ" +"りません**。各結果要素は、分析結果の `dict` か、失敗内容を記述する `bca." "AnalysisFailure` のいずれかです。結果は入力順を保持するため、**どのパスもス" "キップされない限り** `zip(inputs, results)` はインデックスどおりに対応しま" "す。`analyze_batch` は `analyze` と同じキーワード専用オプション — " @@ -22070,8 +22804,8 @@ msgstr "" #: src/python/batch.md:48 msgid "" -"`paths` is consumed lazily, so generators work — but if you want to keep the " -"input around for `zip`, materialise it into a list first." +"`paths` is consumed lazily, so generators work — but if you want to keep " +"the input around for `zip`, materialise it into a list first." msgstr "" "`paths` は遅延評価で消費されるため、ジェネレーターも使えます — ただし `zip` " "のために入力を保持したい場合は、先にリストへ実体化してください。" @@ -22080,19 +22814,19 @@ msgstr "" msgid "" "With the default `skip_generated=True`, a generated file is _skipped_ and " "produces **no** element, so the result list can be shorter than the input — " -"exactly matching single-file `analyze`, which returns `None` for a generated " -"file. Pass `skip_generated=False` to guarantee one element per input (the " -"pre-2.0 default). This default flipped at 2.0 so that switching between " -"`analyze` and `analyze_batch` no longer silently changes generated-file " -"handling." -msgstr "" -"デフォルトの `skip_generated=True` では、生成ファイルは _スキップ_ され、要素" -"を **一切** 生成しません。そのため結果リストは入力より短くなることがあります " -"— これは、生成ファイルに対して `None` を返す単一ファイル版 `analyze` と正確に" -"一致する挙動です。入力ごとに 1 要素を保証したい場合は `skip_generated=False` " -"を渡してください(2.0 より前のデフォルト)。このデフォルトが 2.0 で反転したの" -"は、`analyze` と `analyze_batch` を切り替えても生成ファイルの扱いが暗黙に変わ" -"らないようにするためです。" +"exactly matching single-file `analyze`, which returns `None` for a " +"generated file. Pass `skip_generated=False` to guarantee one element per " +"input (the pre-2.0 default). This default flipped at 2.0 so that switching " +"between `analyze` and `analyze_batch` no longer silently changes generated-" +"file handling." +msgstr "" +"デフォルトの `skip_generated=True` では、生成ファイルは _スキップ_ され、要" +"素を **一切** 生成しません。そのため結果リストは入力より短くなることがありま" +"す — これは、生成ファイルに対して `None` を返す単一ファイル版 `analyze` と正" +"確に一致する挙動です。入力ごとに 1 要素を保証したい場合は " +"`skip_generated=False` を渡してください(2.0 より前のデフォルト)。このデ" +"フォルトが 2.0 で反転したのは、`analyze` と `analyze_batch` を切り替えても生" +"成ファイルの扱いが暗黙に変わらないようにするためです。" #: src/python/batch.md:60 msgid "Walking a directory: `analyze_paths`" @@ -22104,9 +22838,9 @@ msgid "" "instead want to _find_ the source files first — \"analyze my repo\" — reach " "for `analyze_paths` (#658), which reuses the CLI's gitignore-aware walker:" msgstr "" -"`analyze_batch` は、**明示的なリスト** で渡されたパスをそのまま分析します。ま" -"ずソースファイルを _見つける_ ところから始めたい場合 —「リポジトリを丸ごと分" -"析したい」場合 — は、CLI の gitignore 対応ウォーカーを再利用する " +"`analyze_batch` は、**明示的なリスト** で渡されたパスをそのまま分析します。" +"まずソースファイルを _見つける_ ところから始めたい場合 —「リポジトリを丸ごと" +"分析したい」場合 — は、CLI の gitignore 対応ウォーカーを再利用する " "`analyze_paths`(#658)を使ってください。" #: src/python/batch.md:70 src/python/vcs.md:13 src/python/vcs.md:14 @@ -22121,27 +22855,27 @@ msgstr "\"path/to/repo\"" msgid "" "Each positional seed may be a file or a directory; directories are walked " "honouring `.gitignore`, the `include` / `exclude` globs (a single glob " -"string or a sequence; a leading `./` is optional, so `dir/**` ≡ `./dir/**`), " -"and the generated-file filter. A seed naming a file directly is always " -"analysed regardless of `exclude` — an explicit request overrides ignore-" -"style rules — while `include` still narrows it by basename. " -"`respect_gitignore=False` opts into walking ignored files. The result is the " -"same `list[FuncSpaceDict | AnalysisFailure]` shape and never-raise contract " -"as `analyze_batch`, and it forwards the same `exclude_tests` / " +"string or a sequence; a leading `./` is optional, so `dir/**` ≡ `./dir/" +"**`), and the generated-file filter. A seed naming a file directly is " +"always analysed regardless of `exclude` — an explicit request overrides " +"ignore-style rules — while `include` still narrows it by basename. " +"`respect_gitignore=False` opts into walking ignored files. The result is " +"the same `list[FuncSpaceDict | AnalysisFailure]` shape and never-raise " +"contract as `analyze_batch`, and it forwards the same `exclude_tests` / " "`allow_lossy_path` / `skip_generated` / `metrics` / `vcs` / " "`vcs_per_function` kwargs." msgstr "" "各位置引数のシードにはファイルまたはディレクトリを指定できます。ディレクトリ" -"は `.gitignore`、`include` / `exclude` グロブ(単一のグロブ文字列またはシーケ" -"ンス。先頭の `./` は省略可能で、`dir/**` ≡ `./dir/**`)、および生成ファイル" -"フィルターを尊重して走査されます。ファイルを直接指すシードは `exclude` に関係" -"なく常に分析されます — 明示的な指定は ignore 系のルールに優先します — が、" -"`include` はベース名による絞り込みとして引き続き適用されます。" -"`respect_gitignore=False` を指定すると、ignore されたファイルも走査対象になり" -"ます。結果は `analyze_batch` と同じ `list[FuncSpaceDict | AnalysisFailure]` " -"の形と、例外を送出しない契約に従い、同じ `exclude_tests` / " -"`allow_lossy_path` / `skip_generated` / `metrics` / `vcs` / " -"`vcs_per_function` キーワード引数を転送します。" +"は `.gitignore`、`include` / `exclude` グロブ(単一のグロブ文字列またはシー" +"ケンス。先頭の `./` は省略可能で、`dir/**` ≡ `./dir/**`)、および生成ファイ" +"ルフィルターを尊重して走査されます。ファイルを直接指すシードは `exclude` に" +"関係なく常に分析されます — 明示的な指定は ignore 系のルールに優先します — " +"が、`include` はベース名による絞り込みとして引き続き適用されます。" +"`respect_gitignore=False` を指定すると、ignore されたファイルも走査対象にな" +"ります。結果は `analyze_batch` と同じ `list[FuncSpaceDict | " +"AnalysisFailure]` の形と、例外を送出しない契約に従い、同じ " +"`exclude_tests` / `allow_lossy_path` / `skip_generated` / `metrics` / " +"`vcs` / `vcs_per_function` キーワード引数を転送します。" #: src/python/batch.md:86 msgid "Attaching change-history metrics" @@ -22156,18 +22890,18 @@ msgid "" "comprehension over `analyze(p, vcs=True)` would repeat per file. A VCS " "failure on one file leaves its AST metrics intact (it never becomes an " "`AnalysisFailure`); a file outside any repository simply gets no `vcs` " -"block. For ranking a whole repository (rather than per-file attachment), use " -"the dedicated `big_code_analysis.vcs` surface instead." +"block. For ranking a whole repository (rather than per-file attachment), " +"use the dedicated `big_code_analysis.vcs` surface instead." msgstr "" "`analyze_batch` と `analyze_paths` は、単一ファイル版 `analyze` と同じ " "`vcs=True` / `vcs_per_function=True` キーワード引数を受け付けます(#670)。" -"バッチは、対象ファイルを含むリポジトリごとに履歴インデックス / blame エンジン" -"を **1 つだけ** 構築し、そのリポジトリのファイル間で再利用します — " -"`analyze(p, vcs=True)` を内包表記で回した場合にファイルごとに繰り返される走査" -"を償却する形です。あるファイルで VCS が失敗しても、その AST メトリクスは無傷" -"のまま残ります(`AnalysisFailure` になることはありません)。どのリポジトリに" -"も属さないファイルには、単に `vcs` ブロックが付かないだけです。(ファイル単位" -"の付与ではなく)リポジトリ全体をランキングしたい場合は、専用の " +"バッチは、対象ファイルを含むリポジトリごとに履歴インデックス / blame エンジ" +"ンを **1 つだけ** 構築し、そのリポジトリのファイル間で再利用します — " +"`analyze(p, vcs=True)` を内包表記で回した場合にファイルごとに繰り返される走" +"査を償却する形です。あるファイルで VCS が失敗しても、その AST メトリクスは無" +"傷のまま残ります(`AnalysisFailure` になることはありません)。どのリポジトリ" +"にも属さないファイルには、単に `vcs` ブロックが付かないだけです。(ファイル" +"単位の付与ではなく)リポジトリ全体をランキングしたい場合は、専用の " "`big_code_analysis.vcs` サーフェスを使ってください。" #: src/python/batch.md:99 @@ -22176,13 +22910,13 @@ msgstr "並列実行" #: src/python/batch.md:101 msgid "" -"There is no built-in concurrency inside `analyze_batch` — it is a sequential " -"sweep. For parallelism, fan the per-file `analyze` call out across a thread " -"pool:" +"There is no built-in concurrency inside `analyze_batch` — it is a " +"sequential sweep. For parallelism, fan the per-file `analyze` call out " +"across a thread pool:" msgstr "" -"`analyze_batch` に組み込みの並行処理はありません — 逐次的なスイープです。並列" -"化するには、ファイルごとの `analyze` 呼び出しをスレッドプールへファンアウトし" -"てください。" +"`analyze_batch` に組み込みの並行処理はありません — 逐次的なスイープです。並" +"列化するには、ファイルごとの `analyze` 呼び出しをスレッドプールへファンアウ" +"トしてください。" #: src/python/batch.md:107 msgid "" @@ -22203,12 +22937,12 @@ msgstr "" #: src/python/batch.md:121 msgid "" "PyO3's `Python::detach` releases the GIL across each file's read + tree-" -"sitter parse, so the threads do not serialise on the interpreter lock — this " -"is real parallelism, not contended co-operation." +"sitter parse, so the threads do not serialise on the interpreter lock — " +"this is real parallelism, not contended co-operation." msgstr "" "PyO3 の `Python::detach` は、各ファイルの読み込みと tree-sitter によるパース" -"の間 GIL を解放するため、スレッドがインタープリターのロックで直列化されること" -"はありません — ロックを取り合う協調動作ではなく、本当の並列処理です。" +"の間 GIL を解放するため、スレッドがインタープリターのロックで直列化されるこ" +"とはありません — ロックを取り合う協調動作ではなく、本当の並列処理です。" #: src/python/batch.md:126 msgid "`AnalysisFailure` taxonomy" @@ -22252,7 +22986,8 @@ msgstr "`\"IoError\"`" #: src/python/batch.md:134 msgid "`std::fs::read` failed **or** the path was not valid UTF-8" -msgstr "`std::fs::read` が失敗した、*「または」* パスが有効な UTF-8 でなかった" +msgstr "" +"`std::fs::read` が失敗した、*「または」* パスが有効な UTF-8 でなかった" #: src/python/batch.md:136 msgid "" @@ -22261,9 +22996,9 @@ msgid "" "deduplicate failures across runs. For retry classification, the `errno` is " "preserved in the `error` string via Rust's default formatting:" msgstr "" -"`AnalysisFailure` は凍結(frozen)されており、3 つのフィールドすべてに対する " -"`__eq__` / `__hash__` / `__repr__` を実装しているため、呼び出し側はエラーを " -"`set` に入れて実行間で失敗を重複排除できます。リトライの分類のために、" +"`AnalysisFailure` は凍結(frozen)されており、3 つのフィールドすべてに対す" +"る `__eq__` / `__hash__` / `__repr__` を実装しているため、呼び出し側はエラー" +"を `set` に入れて実行間で失敗を重複排除できます。リトライの分類のために、" "`errno` は Rust のデフォルト書式によって `error` 文字列内に保持されます。" #: src/python/batch.md:145 src/python/errors.md:143 @@ -22277,16 +23012,17 @@ msgid "" "`analyze` raises the canonical `OSError` subclass. See [Error handling]" "(errors.md)." msgstr "" -"型付きのディスパッチ(`FileNotFoundError`、`PermissionError` など)が必要な場" -"合は、`analyze_batch` の代わりにファイルごとに `bca.analyze(path)` を呼んでく" -"ださい — 単一ファイル版 `analyze` は正規の `OSError` サブクラスを送出します。" -"[エラー処理](errors.md)を参照してください。" +"型付きのディスパッチ(`FileNotFoundError`、`PermissionError` など)が必要な" +"場合は、`analyze_batch` の代わりにファイルごとに `bca.analyze(path)` を呼ん" +"でください — 単一ファイル版 `analyze` は正規の `OSError` サブクラスを送出し" +"ます。[エラー処理](errors.md)を参照してください。" #: src/python/flat-records.md:3 msgid "" "`bca.flatten_spaces(result)` walks the nested `FuncSpace` tree in pre-order " "and yields one flat, scalar-only `dict` per node — ready for `sqlite3." -"executemany`, `pandas.DataFrame.from_records`, or any other tabular consumer." +"executemany`, `pandas.DataFrame.from_records`, or any other tabular " +"consumer." msgstr "" "`bca.flatten_spaces(result)` は、ネストした `FuncSpace` ツリーを行きがけ順" "(pre-order)に走査し、ノードごとにスカラー値のみのフラットな `dict` を 1 つ" @@ -22300,10 +23036,10 @@ msgid "" "Identity keys (`path`, `name`, `kind`, `start_line`, `end_line`, " "`parent_name`, `depth`) are added on every record." msgstr "" -"メトリクスのキーは、CLI の CSV ライターと同じドット区切りの規約(`cyclomatic." -"modified.sum`、`halstead.volume`、`loc.lloc_average` など)を使います。識別" -"キー(`path`、`name`、`kind`、`start_line`、`end_line`、`parent_name`、" -"`depth`)はすべてのレコードに付加されます。" +"メトリクスのキーは、CLI の CSV ライターと同じドット区切りの規約" +"(`cyclomatic.modified.sum`、`halstead.volume`、`loc.lloc_average` など)を" +"使います。識別キー(`path`、`name`、`kind`、`start_line`、`end_line`、" +"`parent_name`、`depth`)はすべてのレコードに付加されます。" #: src/python/flat-records.md:14 msgid "SQLite via `executemany`" @@ -22311,11 +23047,11 @@ msgstr "`executemany` による SQLite への書き込み" #: src/python/flat-records.md:16 msgid "" -"The example below analyses one file and inserts one row per `FuncSpace` into " -"a sqlite table whose columns are the union of all flattened keys." +"The example below analyses one file and inserts one row per `FuncSpace` " +"into a sqlite table whose columns are the union of all flattened keys." msgstr "" -"以下の例は、1 つのファイルを分析し、フラット化された全キーの和集合を列とする " -"sqlite テーブルへ、`FuncSpace` ごとに 1 行を挿入します。" +"以下の例は、1 つのファイルを分析し、フラット化された全キーの和集合を列とす" +"る sqlite テーブルへ、`FuncSpace` ごとに 1 行を挿入します。" #: src/python/flat-records.md:21 msgid "" @@ -22430,8 +23166,8 @@ msgstr " rows into " #: src/python/flat-records.md:87 msgid "" "The iterator is **lazy and single-use**: it walks the input once without " -"materialising the whole list. A second iteration of the same iterator yields " -"nothing — call `list()` once if you need to re-iterate." +"materialising the whole list. A second iteration of the same iterator " +"yields nothing — call `list()` once if you need to re-iterate." msgstr "" "このイテレーターは **遅延評価かつ単回使用** です。リスト全体を実体化せずに、" "入力を 1 回だけ走査します。同じイテレーターを 2 回目に反復しても何も返しませ" @@ -22448,8 +23184,8 @@ msgid "" "want the DataFrame view." msgstr "" "`flatten_spaces` は `pandas.DataFrame.from_records` への自然な入力です。" -"Pandas はバインディングの依存関係ではないため、DataFrame ビューが必要な場合は" -"別途インストールしてください。" +"Pandas はバインディングの依存関係ではないため、DataFrame ビューが必要な場合" +"は別途インストールしてください。" #: src/python/flat-records.md:107 msgid "" @@ -22482,8 +23218,8 @@ msgid "" "the CSV writer omits those." msgstr "" "識別列は、こちらでは `name` / `kind` を使いますが、CSV ライターは " -"`space_name` / `space_kind` を使います。フラットレコードには `parent_name` / " -"`depth` も追加されますが、CSV ライターにはありません。" +"`space_name` / `space_kind` を使います。フラットレコードには " +"`parent_name` / `depth` も追加されますが、CSV ライターにはありません。" #: src/python/flat-records.md:120 msgid "" @@ -22501,8 +23237,8 @@ msgstr "" #: src/python/flat-records.md:126 msgid "" "Anonymous spaces (Rust closures, JavaScript function expressions / arrows) " -"keep their `name == \"\"` marker verbatim — `flatten_spaces` does " -"not normalise." +"keep their `name == \"\"` marker verbatim — `flatten_spaces` " +"does not normalise." msgstr "" "匿名スペース(Rust のクロージャ、JavaScript の関数式やアロー関数)は `name " "== \"\"` マーカーをそのまま保持します — `flatten_spaces` は正規化" @@ -22537,9 +23273,9 @@ msgid "" "Missing metric subtrees produce no keys (absent, not `None`), matching the " "\"Halstead disabled\" edge case for [metric selection](metrics.md)." msgstr "" -"存在しないメトリクスのサブツリーはキーを生成しません(`None` ではなく欠落)。" -"これは[メトリクス選択](metrics.md)の「Halstead 無効時」のエッジケースと一致し" -"ます。" +"存在しないメトリクスのサブツリーはキーを生成しません(`None` ではなく欠" +"落)。これは[メトリクス選択](metrics.md)の「Halstead 無効時」のエッジケース" +"と一致します。" #: src/python/flat-records.md:144 msgid "" @@ -22555,14 +23291,14 @@ msgstr "" #: src/python/metrics.md:3 msgid "" "Pass `metrics=[…]` to compute only a subset of the metric suite. " -"`metrics=None` (the default) preserves the \"compute everything\" behaviour. " -"Unrequested metrics are **absent** from the result dict (not present with " -"`None` placeholders)." +"`metrics=None` (the default) preserves the \"compute everything\" " +"behaviour. Unrequested metrics are **absent** from the result dict (not " +"present with `None` placeholders)." msgstr "" "メトリクススイートの一部だけを計算するには `metrics=[…]` を渡します。" "`metrics=None`(デフォルト)は「すべて計算する」挙動を維持します。要求されな" -"かったメトリクスは結果の dict から **欠落** します(`None` のプレースホルダー" -"として存在するのではありません)。" +"かったメトリクスは結果の dict から **欠落** します(`None` のプレースホル" +"ダーとして存在するのではありません)。" #: src/python/metrics.md:10 msgid "" @@ -22608,15 +23344,15 @@ msgstr "\"mi pulled in: " #: src/python/metrics.md:42 msgid "" -"The same kwarg is honoured by `bca.analyze_source` and `bca.analyze_batch` — " -"the latter applies the selection uniformly to every file in the batch. " +"The same kwarg is honoured by `bca.analyze_source` and `bca.analyze_batch` " +"— the latter applies the selection uniformly to every file in the batch. " "Validation runs **before** any file I/O: an empty list or unknown name " "raises `ValueError` immediately and never returns an `AnalysisFailure` slot " "for what is really a caller bug." msgstr "" "同じキーワード引数は `bca.analyze_source` と `bca.analyze_batch` でも有効で" -"す — 後者はバッチ内のすべてのファイルに選択を一様に適用します。バリデーション" -"はファイル I/O の *「前に」* 実行されます。空のリストや未知の名前は即座に " +"す — 後者はバッチ内のすべてのファイルに選択を一様に適用します。バリデーショ" +"ンはファイル I/O の *「前に」* 実行されます。空のリストや未知の名前は即座に " "`ValueError` を送出し、実際には呼び出し側のバグであるものに対して " "`AnalysisFailure` スロットを返すことはありません。" @@ -22626,10 +23362,10 @@ msgstr "正規名" #: src/python/metrics.md:51 msgid "" -"The full set is available as a tuple of `MetricName` members. Each member is " -"a `StrEnum`, so it _is_ a `str` — `\"halstead\" in bca.METRIC_NAMES` works, " -"and `bca.MetricName.HALSTEAD == \"halstead\"` is `True`. Pass either a plain " -"string or a member to `metrics=`:" +"The full set is available as a tuple of `MetricName` members. Each member " +"is a `StrEnum`, so it _is_ a `str` — `\"halstead\" in bca.METRIC_NAMES` " +"works, and `bca.MetricName.HALSTEAD == \"halstead\"` is `True`. Pass either " +"a plain string or a member to `metrics=`:" msgstr "" "全メトリクスの集合は `MetricName` メンバーのタプルとして利用できます。各メン" "バーは `StrEnum` なので、_それ自体が_ `str` です — `\"halstead\" in bca." @@ -22643,12 +23379,12 @@ msgstr "# どちらの表記でも `metrics=` に渡せます:\n" #: src/python/metrics.md:67 msgid "" "The members are generated from the same `Metric` table the CLI and JSON " -"output use, so the values never drift from the slugs you see in `bca metrics " -"--format json`." +"output use, so the values never drift from the slugs you see in `bca " +"metrics --format json`." msgstr "" "これらのメンバーは、CLI と JSON 出力が使うのと同じ `Metric` テーブルから生成" -"されるため、その値が `bca metrics --format json` で目にするスラッグから乖離す" -"ることはありません。" +"されるため、その値が `bca metrics --format json` で目にするスラッグから乖離" +"することはありません。" #: src/python/metrics.md:71 msgid "" @@ -22662,8 +23398,8 @@ msgstr "" "名前は小文字で、大文字小文字を区別します。未知の名前を渡すと、正規の一覧を" "メッセージに含む `ValueError` が送出されます。終了点メトリクスの正規表記は、" "あらゆる場所で `\"nexits\"` です(enum の `Display`、`METRIC_NAMES`、JSON 出" -"力キー)。レガシーの `\"exit\"` エイリアスは 2.0 で廃止され、現在は他の未知の" -"名前と同様に `ValueError` を送出します。重複は暗黙に畳み込まれます。" +"力キー)。レガシーの `\"exit\"` エイリアスは 2.0 で廃止され、現在は他の未知" +"の名前と同様に `ValueError` を送出します。重複は暗黙に畳み込まれます。" #: src/python/metrics.md:79 msgid "Dependencies pulled in" @@ -22755,24 +23491,25 @@ msgid "" "dropping the most expensive metric you do not need (often Halstead, on deep " "call trees) is a measurable win." msgstr "" -"全メトリクスの計算がデフォルトなのは、それが CLI の動作と同じだからです。単一" -"のメトリクスだけを選択すると、対応する `compute` パスがスキップされるため**確" -"実に速く**なりますが、ほとんどの入力では tree-sitter のパースと AST の走査が" -"コストの大半を占めるため、単一ファイルでの節約はわずかです。効果はバッチサイ" -"ズに応じて大きくなります。`analyze_batch` を大規模なリポジトリ全体に対して実" -"行する場合、不要かつ最も高価なメトリクス(深い呼び出しツリーでは多くの場合 " -"Halstead)を外すことは測定可能な効果をもたらします。" +"全メトリクスの計算がデフォルトなのは、それが CLI の動作と同じだからです。単" +"一のメトリクスだけを選択すると、対応する `compute` パスがスキップされるため" +"**確実に速く**なりますが、ほとんどの入力では tree-sitter のパースと AST の走" +"査がコストの大半を占めるため、単一ファイルでの節約はわずかです。効果はバッチ" +"サイズに応じて大きくなります。`analyze_batch` を大規模なリポジトリ全体に対し" +"て実行する場合、不要かつ最も高価なメトリクス(深い呼び出しツリーでは多くの場" +"合 Halstead)を外すことは測定可能な効果をもたらします。" #: src/python/metrics.md:106 msgid "" "Unrequested metrics are absent from the result. Code that unconditionally " "indexes into `result[\"metrics\"][\"mi\"]` will `KeyError` if you opted out " -"of `mi`; guard with `if \"mi\" in result[\"metrics\"]` or use `.get(\"mi\")`." +"of `mi`; guard with `if \"mi\" in result[\"metrics\"]` or use `." +"get(\"mi\")`." msgstr "" "要求しなかったメトリクスは結果に含まれません。無条件に `result[\"metrics\"]" -"[\"mi\"]` へアクセスするコードは、`mi` を外した場合に `KeyError` になります。" -"`if \"mi\" in result[\"metrics\"]` でガードするか、`.get(\"mi\")` を使ってく" -"ださい。" +"[\"mi\"]` へアクセスするコードは、`mi` を外した場合に `KeyError` になりま" +"す。`if \"mi\" in result[\"metrics\"]` でガードするか、`.get(\"mi\")` を使っ" +"てください。" #: src/python/metrics.md:111 src/python/sarif.md:108 src/python/vcs.md:253 #: src/python/errors.md:233 @@ -22781,18 +23518,18 @@ msgstr "関連項目" #: src/python/metrics.md:113 msgid "" -"[Batch processing](batch.md) — `metrics=` applies uniformly to every file in " -"a batch; validation runs once, before the input is iterated." +"[Batch processing](batch.md) — `metrics=` applies uniformly to every file " +"in a batch; validation runs once, before the input is iterated." msgstr "" "[バッチ処理](batch.md) — `metrics=` はバッチ内のすべてのファイルに一律に適用" "されます。検証は入力の反復処理が始まる前に一度だけ実行されます。" #: src/python/metrics.md:116 msgid "" -"[SARIF output](sarif.md) — threshold names are independent of the `metrics=` " -"selection; you can request `metrics=[\"loc\"]` and still gate on " -"`cyclomatic` thresholds, but the SARIF will have no findings for the dropped " -"metrics." +"[SARIF output](sarif.md) — threshold names are independent of the " +"`metrics=` selection; you can request `metrics=[\"loc\"]` and still gate on " +"`cyclomatic` thresholds, but the SARIF will have no findings for the " +"dropped metrics." msgstr "" "[SARIF 出力](sarif.md) — しきい値の名前は `metrics=` の選択とは独立していま" "す。`metrics=[\"loc\"]` を要求しつつ `cyclomatic` のしきい値でゲートすること" @@ -22833,10 +23570,10 @@ msgid "" "tree from, instead of parsing twice — once in py-tree-sitter, once in " "`analyze()`:" msgstr "" -"`bca.Ast.parse(code, language)`(または `bca.Ast.from_path(path)`)はソースを" -"**一度だけ**パースし、メトリクスと構文木の両方を取り出せるハンドルを返しま" -"す。py-tree-sitter で一度、`analyze()` でもう一度と、二度パースする必要はあり" -"ません。" +"`bca.Ast.parse(code, language)`(または `bca.Ast.from_path(path)`)はソース" +"を**一度だけ**パースし、メトリクスと構文木の両方を取り出せるハンドルを返しま" +"す。py-tree-sitter で一度、`analyze()` でもう一度と、二度パースする必要はあ" +"りません。" #: src/python/traversal.md:21 msgid "\"fn main() { let x = 1 + 2; }\"" @@ -22869,10 +23606,10 @@ msgid "" "cursor into the retained tree: it costs nothing until you read from it, and " "a selective extractor pays only for the nodes it visits." msgstr "" -"`ast.root_node` は木のルートを遅延評価の `Node` として返します。ノードごとに " -"dict を実体化する [`ast.dump()`](#lazy-nodes-vs-dump) と異なり、`Node` は保持" -"された木へのカーソルです。読み取るまでコストはかからず、選択的な抽出処理は訪" -"問したノードの分だけコストを払います。" +"`ast.root_node` は木のルートを遅延評価の `Node` として返します。ノードごと" +"に dict を実体化する [`ast.dump()`](#lazy-nodes-vs-dump) と異なり、`Node` は" +"保持された木へのカーソルです。読み取るまでコストはかからず、選択的な抽出処理" +"は訪問したノードの分だけコストを払います。" #: src/python/traversal.md:39 msgid "# \"source_file\"\n" @@ -22897,8 +23634,8 @@ msgstr "# ノードのソースバイト列\n" #: src/python/traversal.md:46 msgid "" "Traversal mirrors py-tree-sitter: `children` / `named_children`, `parent`, " -"`next_sibling` / `prev_sibling` (and the `*_named_*` variants), `child(i)` / " -"`named_child(i)`, `child_by_field_name(name)` / " +"`next_sibling` / `prev_sibling` (and the `*_named_*` variants), " +"`child(i)` / `named_child(i)`, `child_by_field_name(name)` / " "`children_by_field_name(name)`, and the `field_name` the parent reaches a " "node through." msgstr "" @@ -22922,9 +23659,9 @@ msgid "" msgstr "" "`walk()` はノードとその子孫を先行順(pre-order)でたどる遅延イテレータです。" "`descendants_by_kind(kinds)` は一回の走査でマッチを収集し、`ast." -"find(filters)` は [`bca count`](../commands/nodes.md#counting-nodes) と同じ語" -"彙(`function`、`call`、`comment`、`string`、正確な kind 名など)を受け付けて" -"木全体を検索します。" +"find(filters)` は [`bca count`](../commands/nodes.md#counting-nodes) と同じ" +"語彙(`function`、`call`、`comment`、`string`、正確な kind 名など)を受け付" +"けて木全体を検索します。" #: src/python/traversal.md:61 msgid "# Every function name in the file, the lazy way.\n" @@ -22939,8 +23676,9 @@ msgid "" "These have Rust counterparts — `Node::preorder` and `Node::" "descendants_by_kind` — so library callers get the same helpers." msgstr "" -"これらには Rust 側の対応物 — `Node::preorder` と `Node::descendants_by_kind` " -"— があるため、ライブラリの呼び出し側でも同じヘルパーを利用できます。" +"これらには Rust 側の対応物 — `Node::preorder` と `Node::" +"descendants_by_kind` — があるため、ライブラリの呼び出し側でも同じヘルパーを" +"利用できます。" #: src/python/traversal.md:73 msgid "Coordinates" @@ -22987,8 +23725,8 @@ msgstr "`span`" #: src/python/traversal.md:83 msgid "" -"the 1-based `{start_line, start_col, …, start_byte, end_byte}` dict `dump()` " -"emits" +"the 1-based `{start_line, start_col, …, start_byte, end_byte}` dict " +"`dump()` emits" msgstr "" "`dump()` が出力する 1 始まりの `{start_line, start_col, …, start_byte, " "end_byte}` dict" @@ -23020,8 +23758,8 @@ msgid "" "`ast.dump()` returns the tree as nested dicts; `ast.root_node` returns lazy " "handles. They differ in two ways that matter:" msgstr "" -"`ast.dump()` は木をネストした dict として返し、`ast.root_node` は遅延ハンドル" -"を返します。両者には重要な違いが 2 つあります。" +"`ast.dump()` は木をネストした dict として返し、`ast.root_node` は遅延ハンド" +"ルを返します。両者には重要な違いが 2 つあります。" #: src/python/traversal.md:97 msgid "" @@ -23037,9 +23775,10 @@ msgstr "" #: src/python/traversal.md:100 msgid "" "**Taxonomy.** A `Node`'s `kind` is the **raw** grammar kind. `dump()` kinds " -"pass through bca's `Alterator` and are curated — for example, string-literal " -"nodes are renamed to `\"string\"` and _flattened_ (their grammar children " -"removed). So the two surfaces intentionally disagree on altered nodes:" +"pass through bca's `Alterator` and are curated — for example, string-" +"literal nodes are renamed to `\"string\"` and _flattened_ (their grammar " +"children removed). So the two surfaces intentionally disagree on altered " +"nodes:" msgstr "" "**分類。** `Node` の `kind` は**生の**文法 kind です。`dump()` の kind は " "bca の `Alterator` を通過して整形されます。たとえば文字列リテラルのノードは " @@ -23064,9 +23803,9 @@ msgid "" "choice for porting a py-tree-sitter matcher); use `dump()` when you want " "bca's curated, JSON-serialisable view." msgstr "" -"文法が生成したものをそのまま扱いたい場合(py-tree-sitter のマッチャーを移植す" -"るならこちらが正解です)は遅延ノードを、bca が整形した JSON シリアライズ可能" -"なビューが欲しい場合は `dump()` を使ってください。" +"文法が生成したものをそのまま扱いたい場合(py-tree-sitter のマッチャーを移植" +"するならこちらが正解です)は遅延ノードを、bca が整形した JSON シリアライズ可" +"能なビューが欲しい場合は `dump()` を使ってください。" #: src/python/traversal.md:117 msgid "Lifetime and threading" @@ -23098,8 +23837,8 @@ msgid "" "[Metric selection](metrics.md) — compute only the metrics you need from the " "same parse." msgstr "" -"[メトリクスの選択](metrics.md) — 同じパース結果から必要なメトリクスだけを計算" -"します。" +"[メトリクスの選択](metrics.md) — 同じパース結果から必要なメトリクスだけを計" +"算します。" #: src/python/traversal.md:132 msgid "" @@ -23111,21 +23850,21 @@ msgstr "" #: src/python/sarif.md:3 msgid "" -"`bca.to_sarif(result, *, thresholds=None)` renders an analysis result (or an " -"iterable of them) into a [SARIF 2.1.0](https://docs.oasis-open.org/sarif/" +"`bca.to_sarif(result, *, thresholds=None)` renders an analysis result (or " +"an iterable of them) into a [SARIF 2.1.0](https://docs.oasis-open.org/sarif/" "sarif/v2.1.0/sarif-v2.1.0.html) JSON document, ready for upload to GitHub " "Code Scanning or any other SARIF consumer. The output is produced by the " -"same Rust writer that backs `bca check --report-format sarif`, so the schema " -"URL, tool driver name / version, and rule descriptions match the CLI byte-" -"for-byte." +"same Rust writer that backs `bca check --report-format sarif`, so the " +"schema URL, tool driver name / version, and rule descriptions match the CLI " +"byte-for-byte." msgstr "" "`bca.to_sarif(result, *, thresholds=None)` は、分析結果(またはそのイテラブ" "ル)を [SARIF 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-" -"v2.1.0.html) JSON ドキュメントとしてレンダリングし、GitHub Code Scanning をは" -"じめとする任意の SARIF コンシューマへそのままアップロードできる形にします。出" -"力は `bca check --report-format sarif` を支えるのと同じ Rust ライターが生成す" -"るため、スキーマ URL、ツールドライバの名前とバージョン、ルール記述は CLI とバ" -"イト単位で一致します。" +"v2.1.0.html) JSON ドキュメントとしてレンダリングし、GitHub Code Scanning を" +"はじめとする任意の SARIF コンシューマへそのままアップロードできる形にしま" +"す。出力は `bca check --report-format sarif` を支えるのと同じ Rust ライター" +"が生成するため、スキーマ URL、ツールドライバの名前とバージョン、ルール記述" +"は CLI とバイト単位で一致します。" #: src/python/sarif.md:18 msgid "" @@ -23172,14 +23911,14 @@ msgstr "`bca.analyze` または `bca.analyze_source` が返す単一の `dict` #: src/python/sarif.md:36 msgid "" "Any iterable yielding such dicts and / or `bca.AnalysisFailure` instances " -"(the natural shape of `bca.analyze_batch`'s return value). `AnalysisFailure` " -"entries are skipped silently — they represent files that could not be " -"analysed, not findings." +"(the natural shape of `bca.analyze_batch`'s return value). " +"`AnalysisFailure` entries are skipped silently — they represent files that " +"could not be analysed, not findings." msgstr "" -"そのような dict や `bca.AnalysisFailure` インスタンスを生成する任意のイテラブ" -"ル(`bca.analyze_batch` の戻り値そのままの形)。`AnalysisFailure` エントリは" -"黙ってスキップされます。これは分析できなかったファイルを表すものであり、検出" -"結果ではないためです。" +"そのような dict や `bca.AnalysisFailure` インスタンスを生成する任意のイテラ" +"ブル(`bca.analyze_batch` の戻り値そのままの形)。`AnalysisFailure` エントリ" +"は黙ってスキップされます。これは分析できなかったファイルを表すものであり、検" +"出結果ではないためです。" #: src/python/sarif.md:43 msgid "" @@ -23209,19 +23948,20 @@ msgid "" "fails fast instead of silently producing an empty SARIF run." msgstr "" "未知の名前に対しては、受け付け可能な名前の一覧を含む `ValueError` が送出され" -"るため、タイポは黙って空の SARIF run を生成するのではなく、即座に失敗します。" +"るため、タイポは黙って空の SARIF run を生成するのではなく、即座に失敗しま" +"す。" #: src/python/sarif.md:58 msgid "" "`thresholds=None` (the default) and `thresholds={}` both produce a well-" "formed SARIF document with empty `results` and `rules` arrays. This matches " -"the CLI's posture: there are **no built-in default thresholds**; every check " -"run supplies its own limits." +"the CLI's posture: there are **no built-in default thresholds**; every " +"check run supplies its own limits." msgstr "" -"`thresholds=None`(デフォルト)と `thresholds={}` はどちらも、空の `results` " -"配列と `rules` 配列を持つ整形式の SARIF ドキュメントを生成します。これは CLI " -"の方針と一致します。すなわち**組み込みのデフォルトしきい値は存在せず**、各 " -"check 実行が自前の上限を指定します。" +"`thresholds=None`(デフォルト)と `thresholds={}` はどちらも、空の " +"`results` 配列と `rules` 配列を持つ整形式の SARIF ドキュメントを生成します。" +"これは CLI の方針と一致します。すなわち**組み込みのデフォルトしきい値は存在" +"せず**、各 check 実行が自前の上限を指定します。" #: src/python/sarif.md:63 msgid "Upload to GitHub Code Scanning" @@ -23269,9 +24009,9 @@ msgid "" "the repository's Code Scanning alerts." msgstr "" "アップロード用アクションのドキュメントは [`github/codeql-action/upload-" -"sarif`](https://github.com/github/codeql-action#using-the-codeql-action) にあ" -"ります。バインディングは呼び出しごとに 1 つの SARIF run を生成し、リポジトリ" -"の Code Scanning アラートへのアップロードはこのアクションが担います。" +"sarif`](https://github.com/github/codeql-action#using-the-codeql-action) に" +"あります。バインディングは呼び出しごとに 1 つの SARIF run を生成し、リポジト" +"リの Code Scanning アラートへのアップロードはこのアクションが担います。" #: src/python/sarif.md:87 msgid "What \"Unit\" findings mean" @@ -23282,28 +24022,28 @@ msgid "" "`to_sarif` emits a finding at every space — the file unit, each container, " "and each leaf function or closure — whose **own** value breaches its limit, " "exactly matching `bca check --report-format sarif`. For most metrics the " -"JSON headline at a space already is that space's own value. The four subtree-" -"aggregate metrics — `cyclomatic`, `cyclomatic.modified`, `cognitive`, and " -"`abc` — additionally expose a `sum` / `magnitude` rolled up across child " -"spaces; the binding reads their per-space `value` field instead, so it " -"reports an interior breach (for example a function whose own complexity " -"breaches even though a nested closure's does not) without being fooled by " -"the larger aggregate. Before the `value` field existed the binding could " -"read only the aggregate and so emitted these four only at leaf spaces, " -"missing genuine interior breaches the CLI reports (#958)." +"JSON headline at a space already is that space's own value. The four " +"subtree-aggregate metrics — `cyclomatic`, `cyclomatic.modified`, " +"`cognitive`, and `abc` — additionally expose a `sum` / `magnitude` rolled " +"up across child spaces; the binding reads their per-space `value` field " +"instead, so it reports an interior breach (for example a function whose own " +"complexity breaches even though a nested closure's does not) without being " +"fooled by the larger aggregate. Before the `value` field existed the " +"binding could read only the aggregate and so emitted these four only at " +"leaf spaces, missing genuine interior breaches the CLI reports (#958)." msgstr "" "`to_sarif` は、**自身の**値が上限を超えているすべてのスペース — ファイル単位" "(Unit)、各コンテナ、各リーフ関数・クロージャ — で検出結果を出力し、`bca " -"check --report-format sarif` と正確に一致します。ほとんどのメトリクスでは、ス" -"ペースの JSON 見出し値がそのままそのスペース自身の値です。サブツリー集約型の " -"4 つのメトリクス — `cyclomatic`、`cyclomatic.modified`、`cognitive`、`abc` — " -"はこれに加えて、子スペースを合算した `sum` / `magnitude` を公開しますが、バイ" -"ンディングは代わりにスペースごとの `value` フィールドを読むため、より大きな集" -"約値に惑わされることなく、内部スペースでの超過(たとえば、ネストしたクロー" -"ジャは超過していないのに関数自身の複雑度が超過している場合)を報告できます。" -"`value` フィールドが存在する以前は、バインディングは集約値しか読めなかったた" -"め、この 4 メトリクスをリーフスペースでしか出力できず、CLI が報告する真の内部" -"超過を見逃していました(#958)。" +"check --report-format sarif` と正確に一致します。ほとんどのメトリクスでは、" +"スペースの JSON 見出し値がそのままそのスペース自身の値です。サブツリー集約型" +"の 4 つのメトリクス — `cyclomatic`、`cyclomatic.modified`、`cognitive`、" +"`abc` — はこれに加えて、子スペースを合算した `sum` / `magnitude` を公開しま" +"すが、バインディングは代わりにスペースごとの `value` フィールドを読むため、" +"より大きな集約値に惑わされることなく、内部スペースでの超過(たとえば、ネスト" +"したクロージャは超過していないのに関数自身の複雑度が超過している場合)を報告" +"できます。`value` フィールドが存在する以前は、バインディングは集約値しか読め" +"なかったため、この 4 メトリクスをリーフスペースでしか出力できず、CLI が報告" +"する真の内部超過を見逃していました(#958)。" #: src/python/sarif.md:103 msgid "" @@ -23330,14 +24070,14 @@ msgid "" "independent of `metrics=`; requesting a narrower metric suite while gating " "on a dropped threshold yields an empty SARIF run." msgstr "" -"[メトリクスの選択](metrics.md) — しきい値名は `metrics=` とは独立した閉じた集" -"合です。メトリクスの組を狭く要求しつつ、外したメトリクスのしきい値でゲートす" -"ると、空の SARIF run になります。" +"[メトリクスの選択](metrics.md) — しきい値名は `metrics=` とは独立した閉じた" +"集合です。メトリクスの組を狭く要求しつつ、外したメトリクスのしきい値でゲート" +"すると、空の SARIF run になります。" #: src/python/sarif.md:117 msgid "" -"[Error handling](errors.md) — the typed exceptions `to_sarif` raises for bad " -"caller input (`TypeError` / `ValueError`)." +"[Error handling](errors.md) — the typed exceptions `to_sarif` raises for " +"bad caller input (`TypeError` / `ValueError`)." msgstr "" "[エラー処理](errors.md) — 不正な呼び出し側入力に対して `to_sarif` が送出する" "型付き例外(`TypeError` / `ValueError`)。" @@ -23345,18 +24085,18 @@ msgstr "" #: src/python/vcs.md:3 msgid "" "The `big_code_analysis.vcs` submodule ranks files and scores commits by " -"**change-history risk** — signals derived from [version-control](https://git-" -"scm.com/) history rather than the source AST. It is the Python analogue of " -"the [`bca vcs`](../commands/vcs.md) CLI command, and the same Rust engine " -"backs both, so the returned dicts match the CLI's structured output field-" -"for-field." +"**change-history risk** — signals derived from [version-control](https://" +"git-scm.com/) history rather than the source AST. It is the Python analogue " +"of the [`bca vcs`](../commands/vcs.md) CLI command, and the same Rust " +"engine backs both, so the returned dicts match the CLI's structured output " +"field-for-field." msgstr "" "`big_code_analysis.vcs` サブモジュールは、**変更履歴リスク** — ソースの AST " -"ではなく[バージョン管理](https://git-scm.com/)の履歴から導かれるシグナル — に" -"よってファイルをランク付けし、コミットをスコアリングします。これは [`bca " +"ではなく[バージョン管理](https://git-scm.com/)の履歴から導かれるシグナル — " +"によってファイルをランク付けし、コミットをスコアリングします。これは [`bca " "vcs`](../commands/vcs.md) CLI コマンドの Python 版であり、両者は同じ Rust エ" -"ンジンに支えられているため、返される dict は CLI の構造化出力とフィールド単位" -"で一致します。" +"ンジンに支えられているため、返される dict は CLI の構造化出力とフィールド単" +"位で一致します。" #: src/python/vcs.md:19 msgid "" @@ -23370,28 +24110,29 @@ msgid "" msgstr "" "4 つのエントリポイントは `bca vcs` のサブコマンドに対応します。`vcs.rank` は" "ファイルをランク付けし(`bca vcs`)、`vcs.trend` はそのランキングを時間軸に" -"沿ってサンプリングし(`bca vcs trend`)、`vcs.commit` は 1 つのコミットをスコ" -"アリングし(`bca vcs commit`)、`vcs.score_diff` は素の unified diff をスコア" -"リングします(`bca vcs commit --diff`)。シグナル、複合リスクスコア、その背後" -"にある欠陥予測の文献については [CLI の章](../commands/vcs.md)を参照してくださ" -"い。このページでは Python 側のインターフェースを扱います。" +"沿ってサンプリングし(`bca vcs trend`)、`vcs.commit` は 1 つのコミットをス" +"コアリングし(`bca vcs commit`)、`vcs.score_diff` は素の unified diff をス" +"コアリングします(`bca vcs commit --diff`)。シグナル、複合リスクスコア、そ" +"の背後にある欠陥予測の文献については [CLI の章](../commands/vcs.md)を参照し" +"てください。このページでは Python 側のインターフェースを扱います。" #: src/python/vcs.md:27 msgid "" -"This is distinct from `analyze(..., vcs=True)`, which attaches a `vcs` block " -"to a **single file's** metrics. The `vcs` submodule walks history **once** " -"for a whole repository, so prefer it for ranking; reach for the `analyze` " -"kwarg only when you want change-history numbers alongside a file's AST " -"metrics. See [Batch processing](batch.md) for the `analyze_batch(..., " -"vcs=True)` path that amortises the walk across a repository's files." +"This is distinct from `analyze(..., vcs=True)`, which attaches a `vcs` " +"block to a **single file's** metrics. The `vcs` submodule walks history " +"**once** for a whole repository, so prefer it for ranking; reach for the " +"`analyze` kwarg only when you want change-history numbers alongside a " +"file's AST metrics. See [Batch processing](batch.md) for the " +"`analyze_batch(..., vcs=True)` path that amortises the walk across a " +"repository's files." msgstr "" "これは、**単一ファイルの**メトリクスに `vcs` ブロックを付加する " -"`analyze(..., vcs=True)` とは別物です。`vcs` サブモジュールはリポジトリ全体の" -"履歴を**一度だけ**走査するため、ランク付けにはこちらを優先してください。" -"`analyze` のキーワード引数は、ファイルの AST メトリクスと並べて変更履歴の数値" -"が欲しい場合にのみ使います。リポジトリ内のファイル全体で履歴走査を償却する " -"`analyze_batch(..., vcs=True)` の経路については[バッチ処理](batch.md)を参照し" -"てください。" +"`analyze(..., vcs=True)` とは別物です。`vcs` サブモジュールはリポジトリ全体" +"の履歴を**一度だけ**走査するため、ランク付けにはこちらを優先してください。" +"`analyze` のキーワード引数は、ファイルの AST メトリクスと並べて変更履歴の数" +"値が欲しい場合にのみ使います。リポジトリ内のファイル全体で履歴走査を償却す" +"る `analyze_batch(..., vcs=True)` の経路については[バッチ処理](batch.md)を参" +"照してください。" #: src/python/vcs.md:35 msgid "Ranking files" @@ -23406,8 +24147,8 @@ msgid "" "`Options` object (covered below)." msgstr "" "`vcs.rank(repo_path, *, options=None, top=None, no_cache=False, " -"cache_dir=None)` は、対象範囲内のすべてのファイルをリスク降順でランク付けし、" -"`VcsReportDict` を返します。呼び出しごとに変わるキーワード専用の設定は " +"cache_dir=None)` は、対象範囲内のすべてのファイルをリスク降順でランク付け" +"し、`VcsReportDict` を返します。呼び出しごとに変わるキーワード専用の設定は " "`rank` にあり、`trend` や `commit` と共有される履歴走査の設定は共通の " "`Options` オブジェクト(後述)にあります。" @@ -23479,13 +24220,13 @@ msgstr "コミットのスコアリング" msgid "" "`vcs.commit(repo_path, *, commit=\"HEAD\", options=None)` scores a single " "commit for just-in-time (commit-level) risk against its first parent, " -"returning a `JitCommitReportDict`. The `commit` argument is any git revision " -"spelling (`\"HEAD\"`, `\"HEAD~3\"`, a branch, a tag, a SHA)." +"returning a `JitCommitReportDict`. The `commit` argument is any git " +"revision spelling (`\"HEAD\"`, `\"HEAD~3\"`, a branch, a tag, a SHA)." msgstr "" "`vcs.commit(repo_path, *, commit=\"HEAD\", options=None)` は、単一のコミット" -"を第一親に対する just-in-time(コミットレベル)リスクの観点でスコアリングし、" -"`JitCommitReportDict` を返します。`commit` 引数には任意の git リビジョン表記" -"(`\"HEAD\"`、`\"HEAD~3\"`、ブランチ、タグ、SHA)を指定できます。" +"を第一親に対する just-in-time(コミットレベル)リスクの観点でスコアリング" +"し、`JitCommitReportDict` を返します。`commit` 引数には任意の git リビジョン" +"表記(`\"HEAD\"`、`\"HEAD~3\"`、ブランチ、タグ、SHA)を指定できます。" #: src/python/vcs.md:83 msgid "\"risk score: " @@ -23588,10 +24329,11 @@ msgid "" "and `partial_risk_score` is **not comparable** to a commit's `risk_score`. " "The history, experience, and purpose groups are absent, not zero." msgstr "" -"素の diff には作者・親コミット・ファイル履歴の情報が含まれないため、`source` " -"はリテラルの `\"diff\"` になり、計算可能なのは `size` と `diffusion` のグルー" -"プだけで、`partial_risk_score` はコミットの `risk_score` と**比較できません" -"**。history、experience、purpose の各グループはゼロではなく、欠落しています。" +"素の diff には作者・親コミット・ファイル履歴の情報が含まれないため、" +"`source` はリテラルの `\"diff\"` になり、計算可能なのは `size` と " +"`diffusion` のグループだけで、`partial_risk_score` はコミットの " +"`risk_score` と**比較できません**。history、experience、purpose の各グループ" +"はゼロではなく、欠落しています。" #: src/python/vcs.md:126 msgid "Sampling a trend" @@ -23643,12 +24385,12 @@ msgid "" "`deltas` summary splits files into `improved` and `regressed` lists; " "`top_deltas` trims each list and `top` caps how many files are kept." msgstr "" -"`points` 個(2 以上)のサンプルが `span`(デフォルト `12mo`)の期間に分布し、" -"`options.as_of` で終わります。`files` マップは各ファイルの系列を " +"`points` 個(2 以上)のサンプルが `span`(デフォルト `12mo`)の期間に分布" +"し、`options.as_of` で終わります。`files` マップは各ファイルの系列を " "`as_of_points` と 1:1 で揃え、そのファイルがまだ存在しなかった箇所は `None` " "要素になります。`deltas` サマリーはファイルを `improved` と `regressed` のリ" -"ストに分け、`top_deltas` が各リストを切り詰め、`top` が残すファイル数の上限を" -"決めます。" +"ストに分け、`top_deltas` が各リストを切り詰め、`top` が残すファイル数の上限" +"を決めます。" #: src/python/vcs.md:153 msgid "Shared options" @@ -23658,13 +24400,13 @@ msgstr "共通オプション" msgid "" "The three repository-walking entry points — `rank`, `trend`, and `commit` — " "accept the same `vcs.Options` object, so one configuration can drive a rank " -"plus a trend pass without restating the common knobs. Every field is keyword-" -"only and optional, and the defaults reproduce the `bca vcs` CLI defaults, so " -"`Options()` matches the default ranking." +"plus a trend pass without restating the common knobs. Every field is " +"keyword-only and optional, and the defaults reproduce the `bca vcs` CLI " +"defaults, so `Options()` matches the default ranking." msgstr "" "リポジトリを走査する 3 つのエントリポイント — `rank`、`trend`、`commit` — は" -"同じ `vcs.Options` オブジェクトを受け取るため、共通の設定項目を繰り返すことな" -"く、1 つの構成でランク付けとトレンドの両方のパスを実行できます。すべての" +"同じ `vcs.Options` オブジェクトを受け取るため、共通の設定項目を繰り返すこと" +"なく、1 つの構成でランク付けとトレンドの両方のパスを実行できます。すべての" "フィールドはキーワード専用かつ省略可能で、デフォルト値は `bca vcs` CLI のデ" "フォルトを再現するため、`Options()` はデフォルトのランキングと一致します。" @@ -23700,8 +24442,8 @@ msgid "" msgstr "" "`file_types` はランク付けの対象ファイルを選択します。`\"metrics\"`(デフォル" "ト — bca がメトリクスを計算するファイルのみ)、`\"all\"`(追跡対象のすべての" -"テキストファイル)、カンマ区切りの拡張子許可リスト(`\"rs,py\"`)、または拡張" -"子の `Sequence[str]`(`[\"rs\", \"py\"]`)を指定できます。" +"テキストファイル)、カンマ区切りの拡張子許可リスト(`\"rs,py\"`)、または拡" +"張子の `Sequence[str]`(`[\"rs\", \"py\"]`)を指定できます。" #: src/python/vcs.md:183 msgid "" @@ -23712,50 +24454,51 @@ msgid "" msgstr "" "`as_of` は再現可能なスナップショットのために基準となる「現在」を固定します。" "`datetime`、または文字列([RFC 3339](https://www.rfc-editor.org/rfc/" -"rfc3339)、`@unix`、git の日付形式)で指定します。`as_of` を固定すると実行が再" -"現可能になります。ランキングは実時間に対してではなく、その時点での状態として" -"計算されます。" +"rfc3339)、`@unix`、git の日付形式)で指定します。`as_of` を固定すると実行が" +"再現可能になります。ランキングは実時間に対してではなく、その時点での状態とし" +"て計算されます。" #: src/python/vcs.md:188 msgid "" "`cache_dir` (on `rank`, not `Options`) accepts a `str` or any `os.PathLike` " "— a `pathlib.Path` passes straight through." msgstr "" -"`cache_dir`(`Options` ではなく `rank` のパラメーター)は `str` または任意の " -"`os.PathLike` を受け付けます — `pathlib.Path` はそのまま渡せます。" +"`cache_dir`(`Options` ではなく `rank` のパラメーター)は `str` または任意" +"の `os.PathLike` を受け付けます — `pathlib.Path` はそのまま渡せます。" #: src/python/vcs.md:191 msgid "" "The history-walk toggles mirror the CLI flags: `full_history`, " -"`include_merges`, `follow_renames` (default `True`), `exclude_bots` (default " -"`True`), and `bot_pattern` to override the bot-author regular expression. " -"`bus_factor_threshold` sets the coverage fraction for the bus-factor flag " -"(default `0.5`), and `emit_author_details` includes SHA-256-hashed canonical " -"author identities. `author_hash_key` (requires `emit_author_details`) " -"hardens those digests into a keyed HMAC-SHA256, the same opt-in described " -"under [Author-detail privacy](../commands/vcs.md#author-detail-privacy)." +"`include_merges`, `follow_renames` (default `True`), `exclude_bots` " +"(default `True`), and `bot_pattern` to override the bot-author regular " +"expression. `bus_factor_threshold` sets the coverage fraction for the bus-" +"factor flag (default `0.5`), and `emit_author_details` includes SHA-256-" +"hashed canonical author identities. `author_hash_key` (requires " +"`emit_author_details`) hardens those digests into a keyed HMAC-SHA256, the " +"same opt-in described under [Author-detail privacy](../commands/vcs." +"md#author-detail-privacy)." msgstr "" "履歴走査のトグルは CLI フラグを反映しています。`full_history`、" "`include_merges`、`follow_renames`(デフォルト `True`)、`exclude_bots`(デ" "フォルト `True`)、そしてボット作者の正規表現を上書きする `bot_pattern` で" -"す。`bus_factor_threshold` はバスファクターのフラグに用いるカバレッジ割合を設" -"定し(デフォルト `0.5`)、`emit_author_details` は SHA-256 でハッシュ化された" -"正規化済み作者 ID を含めます。`author_hash_key`(`emit_author_details` が必" -"要)はこれらのダイジェストを鍵付き HMAC-SHA256 に強化します。これは [作者詳細" -"のプライバシー](../commands/vcs.md#author-detail-privacy) で説明されているも" -"のと同じオプトインです。" +"す。`bus_factor_threshold` はバスファクターのフラグに用いるカバレッジ割合を" +"設定し(デフォルト `0.5`)、`emit_author_details` は SHA-256 でハッシュ化さ" +"れた正規化済み作者 ID を含めます。`author_hash_key`(`emit_author_details` " +"が必要)はこれらのダイジェストを鍵付き HMAC-SHA256 に強化します。これは [作" +"者詳細のプライバシー](../commands/vcs.md#author-detail-privacy) で説明されて" +"いるものと同じオプトインです。" #: src/python/vcs.md:203 msgid "" "`vcs.rank` keeps a [persistent cache](../commands/vcs.md#caching) of each " "history walk, on by default. A cache hit is bit-identical to a fresh walk, " -"and the time windows are recomputed against the current moment on every run, " -"so a cached result is never stale." +"and the time windows are recomputed against the current moment on every " +"run, so a cached result is never stale." msgstr "" -"`vcs.rank` は各履歴走査の[永続キャッシュ](../commands/vcs.md#caching)をデフォ" -"ルトで有効にして保持します。キャッシュヒットは新規の走査とビット単位で同一で" -"あり、時間ウィンドウは実行のたびに現在時刻に対して再計算されるため、キャッ" -"シュ済みの結果が古くなることはありません。" +"`vcs.rank` は各履歴走査の[永続キャッシュ](../commands/vcs.md#caching)をデ" +"フォルトで有効にして保持します。キャッシュヒットは新規の走査とビット単位で同" +"一であり、時間ウィンドウは実行のたびに現在時刻に対して再計算されるため、" +"キャッシュ済みの結果が古くなることはありません。" #: src/python/vcs.md:210 msgid "# First call primes the cache; the second replays it.\n" @@ -23786,8 +24529,8 @@ msgid "" "commands/vcs.md#author-detail-privacy)." msgstr "" "デフォルトでは、キャッシュはプラットフォームのキャッシュディレクトリ配下に置" -"かれます。作者 ID は SHA-256 ダイジェストとしてのみ保存され、平文で保存される" -"ことはありません。ハッシュ化は匿名化ではなく仮名化である点に注意してくださ" +"かれます。作者 ID は SHA-256 ダイジェストとしてのみ保存され、平文で保存され" +"ることはありません。ハッシュ化は匿名化ではなく仮名化である点に注意してくださ" "い。ダイジェストは候補となるメールアドレス集合に対して復元可能です — [作者詳" "細のプライバシー](../commands/vcs.md#author-detail-privacy)を参照してくださ" "い。" @@ -23804,8 +24547,8 @@ msgid "" "a `ThreadPoolExecutor` can rank several repositories in parallel without " "serialising on the interpreter lock:" msgstr "" -"リポジトリを走査する呼び出し(`vcs.rank`、`vcs.trend`、および `vcs.commit` の" -"コミットスコア)は、履歴走査の間 [GIL](https://docs.python.org/3/glossary." +"リポジトリを走査する呼び出し(`vcs.rank`、`vcs.trend`、および `vcs.commit` " +"のコミットスコア)は、履歴走査の間 [GIL](https://docs.python.org/3/glossary." "html#term-global-interpreter-lock) を解放します(issue #620)。そのため " "`ThreadPoolExecutor` を使えば、インタープリターのロックで直列化されることな" "く、複数のリポジトリを並列にランク付けできます:" @@ -23827,8 +24570,8 @@ msgid "" "This is the same pattern the [Async patterns](async.md) page applies to the " "per-file `analyze` calls." msgstr "" -"これは [非同期パターン](async.md) のページがファイル単位の `analyze` 呼び出し" -"に適用しているのと同じパターンです。" +"これは [非同期パターン](async.md) のページがファイル単位の `analyze` 呼び出" +"しに適用しているのと同じパターンです。" #: src/python/vcs.md:246 msgid "Errors" @@ -23841,9 +24584,10 @@ msgid "" "history-vcs-exceptions) for the full taxonomy and which call raises which " "type." msgstr "" -"`vcs` の各関数は、`bca.VcsError`(それ自体が `ValueError`)を頂点とする型付き" -"例外階層を送出します。完全な分類と、どの呼び出しがどの型を送出するかについて" -"は[エラー処理](errors.md#change-history-vcs-exceptions)を参照してください。" +"`vcs` の各関数は、`bca.VcsError`(それ自体が `ValueError`)を頂点とする型付" +"き例外階層を送出します。完全な分類と、どの呼び出しがどの型を送出するかについ" +"ては[エラー処理](errors.md#change-history-vcs-exceptions)を参照してくださ" +"い。" #: src/python/vcs.md:255 msgid "" @@ -23856,12 +24600,12 @@ msgstr "" #: src/python/vcs.md:258 msgid "" -"[Batch processing](batch.md) — `analyze_batch(..., vcs=True)` attaches a per-" -"file `vcs` block while sharing one history index per repository." +"[Batch processing](batch.md) — `analyze_batch(..., vcs=True)` attaches a " +"per-file `vcs` block while sharing one history index per repository." msgstr "" -"[バッチ処理](batch.md) — `analyze_batch(..., vcs=True)` は、リポジトリごとに " -"1 つの履歴インデックスを共有しながら、ファイルごとの `vcs` ブロックを付加しま" -"す。" +"[バッチ処理](batch.md) — `analyze_batch(..., vcs=True)` は、リポジトリごと" +"に 1 つの履歴インデックスを共有しながら、ファイルごとの `vcs` ブロックを付加" +"します。" #: src/python/vcs.md:260 msgid "[Error handling](errors.md) — the VCS exception taxonomy." @@ -23877,15 +24621,18 @@ msgid "" "for the wrong type, `OSError` and its subclasses for filesystem failures." msgstr "" "**呼び出し側のエラー**は例外として送出されます — 不正な引数には " -"`ValueError`、誤った型には `TypeError`、ファイルシステムの失敗には `OSError` " -"とそのサブクラスです。" +"`ValueError`、誤った型には `TypeError`、ファイルシステムの失敗には " +"`OSError` とそのサブクラスです。" #: src/python/errors.md:8 msgid "" "**Per-file analysis errors** in a batch are _returned_ as `bca." "AnalysisFailure` values inside the result list. They are not exceptions and " "never raise." -msgstr "バッチ内の**ファイルごとの解析エラー**は、結果リストの中の `bca.AnalysisFailure` 値として「返されます」。これらは例外ではなく、送出されることはありません。" +msgstr "" +"バッチ内の**ファイルごとの解析エラー**は、結果リストの中の `bca." +"AnalysisFailure` 値として「返されます」。これらは例外ではなく、送出されるこ" +"とはありません。" #: src/python/errors.md:12 msgid "" @@ -23924,8 +24671,8 @@ msgstr "\"batch_errors\"" #: src/python/errors.md:32 msgid "# 1. analyze() on a missing path raises a typed OSError subclass.\n" msgstr "" -"# 1. 存在しないパスに対する analyze() は型付きの OSError サブクラスを送出しま" -"す。\n" +"# 1. 存在しないパスに対する analyze() は型付きの OSError サブクラスを送出し" +"ます。\n" #: src/python/errors.md:37 msgid "\"file_not_found: errno=" @@ -23943,10 +24690,10 @@ msgid "" " # mutation before the analyse call still gets cleaned up.\n" msgstr "" "# 2. 未知の拡張子に対する analyze() は\n" -" # UnsupportedLanguageError(それ自体が ValueError のサブクラス)を送出" -"します。\n" -" # 書き込みを try/finally の内側に置いているため、将来 analyse 呼び出し" -"の\n" +" # UnsupportedLanguageError(それ自体が ValueError のサブクラス)を送" +"出します。\n" +" # 書き込みを try/finally の内側に置いているため、将来 analyse 呼び出" +"しの\n" " # 前に 2 つ目の変更が加わってもクリーンアップされます。\n" #: src/python/errors.md:43 @@ -24025,11 +24772,11 @@ msgstr "`std::fs::read` が失敗した" #: src/python/errors.md:74 msgid "" -"The `OSError` raised by `analyze` dispatches to the canonical subclass based " -"on `errno`:" +"The `OSError` raised by `analyze` dispatches to the canonical subclass " +"based on `errno`:" msgstr "" -"`analyze` が送出する `OSError` は、`errno` に基づいて正規のサブクラスへ振り分" -"けられます:" +"`analyze` が送出する `OSError` は、`errno` に基づいて正規のサブクラスへ振り" +"分けられます:" #: src/python/errors.md:80 msgid "\"src/example.rs\"" @@ -24109,9 +24856,9 @@ msgid "" "subclasses, so a single `except ValueError` catches both. Prefer the typed " "catches when you want to differentiate." msgstr "" -"`UnsupportedLanguageError` と `ParseError` はどちらも `ValueError` のサブクラ" -"スなので、単一の `except ValueError` で両方を捕捉できます。区別したい場合は型" -"付きの捕捉を優先してください。" +"`UnsupportedLanguageError` と `ParseError` はどちらも `ValueError` のサブク" +"ラスなので、単一の `except ValueError` で両方を捕捉できます。区別したい場合" +"は型付きの捕捉を優先してください。" #: src/python/errors.md:107 msgid "Batch errors" @@ -24119,11 +24866,11 @@ msgstr "バッチのエラー" #: src/python/errors.md:109 msgid "" -"`bca.analyze_batch` returns `bca.AnalysisFailure` values instead of raising, " -"so a single bad file does not break the whole batch." +"`bca.analyze_batch` returns `bca.AnalysisFailure` values instead of " +"raising, so a single bad file does not break the whole batch." msgstr "" -"`bca.analyze_batch` は例外を送出する代わりに `bca.AnalysisFailure` 値を返すた" -"め、1 つの不正なファイルがバッチ全体を壊すことはありません。" +"`bca.analyze_batch` は例外を送出する代わりに `bca.AnalysisFailure` 値を返す" +"ため、1 つの不正なファイルがバッチ全体を壊すことはありません。" #: src/python/errors.md:115 msgid "\"%s (%s): %s\"" @@ -24134,8 +24881,8 @@ msgid "" "`\"UnsupportedLanguage\"` — extension and shebang / emacs-mode resolution " "both came up empty." msgstr "" -"`\"UnsupportedLanguage\"` — 拡張子と shebang / emacs モードのどちらの解決も空" -"振りに終わった場合です。" +"`\"UnsupportedLanguage\"` — 拡張子と shebang / emacs モードのどちらの解決も" +"空振りに終わった場合です。" #: src/python/errors.md:124 msgid "" @@ -24146,10 +24893,10 @@ msgid "" "recoverable by re-reading the file)." msgstr "" "`\"ParseError\"` — tree-sitter が入力を拒否したか、または(まれに)Rust 側で" -"の結果の JSON シリアライズが失敗した場合です。シリアライズの失敗では `error` " -"文字列に `internal: serialization error:` という接頭辞が付きます。区別が必要" -"な場合はこの接頭辞を確認してください(シリアライズの失敗はファイルの再読み込" -"みでは回復できません)。" +"の結果の JSON シリアライズが失敗した場合です。シリアライズの失敗では " +"`error` 文字列に `internal: serialization error:` という接頭辞が付きます。区" +"別が必要な場合はこの接頭辞を確認してください(シリアライズの失敗はファイルの" +"再読み込みでは回復できません)。" #: src/python/errors.md:130 msgid "" @@ -24158,8 +24905,8 @@ msgid "" "surfaces as `\"IoError\"` rather than as a distinct fourth value." msgstr "" "`\"IoError\"` — 最も一般的な種類で、`std::fs::read` が失敗した場合です。この" -"閉じた分類には非 UTF-8 パスの失敗も畳み込まれているため、パスのエンコーディン" -"グエラーは独立した 4 つ目の値としてではなく `\"IoError\"` として現れます。" +"閉じた分類には非 UTF-8 パスの失敗も畳み込まれているため、パスのエンコーディ" +"ングエラーは独立した 4 つ目の値としてではなく `\"IoError\"` として現れます。" #: src/python/errors.md:135 msgid "" @@ -24167,9 +24914,9 @@ msgid "" "`error` string via Rust's default formatting (`\" (os error )\"` on " "Unix). Parse with regex if you need it for retry classification:" msgstr "" -"`\"IoError\"` のインスタンスでは、元となる OS の `errno` が Rust のデフォルト" -"書式(Unix では `\" (os error )\"`)で `error` 文字列に保持されます。" -"リトライの分類に必要な場合は正規表現でパースしてください:" +"`\"IoError\"` のインスタンスでは、元となる OS の `errno` が Rust のデフォル" +"ト書式(Unix では `\" (os error )\"`)で `error` 文字列に保持されま" +"す。リトライの分類に必要な場合は正規表現でパースしてください:" #: src/python/errors.md:147 msgid "" @@ -24177,8 +24924,8 @@ msgid "" "of `analyze_batch` — single-file `analyze` raises `FileNotFoundError` / " "`PermissionError` / `IsADirectoryError` directly." msgstr "" -"型付きの `OSError` サブクラスが必要な場合は、`analyze_batch` ではなくファイル" -"ごとに `bca.analyze` を呼び出してください — 単一ファイルの `analyze` は " +"型付きの `OSError` サブクラスが必要な場合は、`analyze_batch` ではなくファイ" +"ルごとに `bca.analyze` を呼び出してください — 単一ファイルの `analyze` は " "`FileNotFoundError` / `PermissionError` / `IsADirectoryError` を直接送出しま" "す。" @@ -24197,16 +24944,20 @@ msgid "" "bad element are discarded." msgstr "" "`paths` がイテラブルでない場合、または要素が `str` / `os.PathLike[str]` でな" -"い場合は `TypeError` です。これは呼び出し全体を中断し、不正な要素より前に計算" -"された結果はすべて破棄されます。" +"い場合は `TypeError` です。これは呼び出し全体を中断し、不正な要素より前に計" +"算された結果はすべて破棄されます。" #: src/python/errors.md:159 msgid "" "`ValueError` if `metrics=` is an explicitly empty sequence or contains an " -"unknown name. Validation runs _before_ the input iterable's `__iter__`, so a " -"generator's side effects (and any partial yields) are preserved on this " +"unknown name. Validation runs _before_ the input iterable's `__iter__`, so " +"a generator's side effects (and any partial yields) are preserved on this " "raise path." -msgstr "`metrics=` が明示的に空のシーケンスであるか、未知の名前を含む場合は `ValueError` です。検証は入力イテラブルの `__iter__` より「前に」実行されるため、この送出経路ではジェネレーターの副作用(および部分的な yield)は温存されます。" +msgstr "" +"`metrics=` が明示的に空のシーケンスであるか、未知の名前を含む場合は " +"`ValueError` です。検証は入力イテラブルの `__iter__` より「前に」実行される" +"ため、この送出経路ではジェネレーターの副作用(および部分的な yield)は温存さ" +"れます。" #: src/python/errors.md:164 msgid "Change-history (VCS) exceptions" @@ -24216,14 +24967,14 @@ msgstr "変更履歴(VCS)の例外" msgid "" "The [`big_code_analysis.vcs`](vcs.md) functions raise a typed hierarchy " "rooted at `bca.VcsError`, itself a `ValueError`, so an existing `except " -"ValueError` (or `except bca.VcsError`) catches every VCS failure (#624). The " -"`analyze(..., vcs=True)` kwarg shares the same option-parsing errors." +"ValueError` (or `except bca.VcsError`) catches every VCS failure (#624). " +"The `analyze(..., vcs=True)` kwarg shares the same option-parsing errors." msgstr "" "[`big_code_analysis.vcs`](vcs.md) の各関数は、`bca.VcsError`(それ自体が " "`ValueError`)を頂点とする型付き階層を送出するため、既存の `except " "ValueError`(または `except bca.VcsError`)ですべての VCS の失敗を捕捉できま" -"す(#624)。`analyze(..., vcs=True)` キーワード引数も同じオプション解析エラー" -"を共有します。" +"す(#624)。`analyze(..., vcs=True)` キーワード引数も同じオプション解析エ" +"ラーを共有します。" #: src/python/errors.md:174 msgid "`bca.NotARepositoryError`" @@ -24260,7 +25011,8 @@ msgstr "`bca.VcsEnvironmentError`" #: src/python/errors.md:177 msgid "History walk, diffing, `.mailmap`, blame, or cache I/O failed" -msgstr "履歴走査、差分計算、`.mailmap`、blame、またはキャッシュ I/O が失敗した" +msgstr "" +"履歴走査、差分計算、`.mailmap`、blame、またはキャッシュ I/O が失敗した" #: src/python/errors.md:178 msgid "`bca.VcsError` (raw)" @@ -24272,9 +25024,9 @@ msgid "" "bus-factor threshold / bot pattern / trend point count); the message names " "the offending value" msgstr "" -"不正なオプション値(ウィンドウ / タイムスタンプ / 計算式 / ファイルタイプの範" -"囲 / バスファクターのしきい値 / ボットパターン / トレンドのポイント数)。メッ" -"セージが問題の値を示します" +"不正なオプション値(ウィンドウ / タイムスタンプ / 計算式 / ファイルタイプの" +"範囲 / バスファクターのしきい値 / ボットパターン / トレンドのポイント数)。" +"メッセージが問題の値を示します" #: src/python/errors.md:180 msgid "" @@ -24306,14 +25058,14 @@ msgstr "\"bad VCS option:\"" #: src/python/errors.md:201 msgid "" -"`analyze(..., vcs=True)` is the exception to the `NotARepositoryError` rule: " -"a file outside any repository simply yields no `vcs` block rather than " -"raising, so only the option-parsing `VcsError` reaches the caller from that " -"path." +"`analyze(..., vcs=True)` is the exception to the `NotARepositoryError` " +"rule: a file outside any repository simply yields no `vcs` block rather " +"than raising, so only the option-parsing `VcsError` reaches the caller from " +"that path." msgstr "" "`analyze(..., vcs=True)` は `NotARepositoryError` のルールの例外です。リポジ" -"トリ外のファイルは例外を送出せず、単に `vcs` ブロックを生成しないだけなので、" -"この経路から呼び出し側に届くのはオプション解析の `VcsError` だけです。" +"トリ外のファイルは例外を送出せず、単に `vcs` ブロックを生成しないだけなの" +"で、この経路から呼び出し側に届くのはオプション解析の `VcsError` だけです。" #: src/python/errors.md:206 msgid "Logging recipe" @@ -24324,8 +25076,8 @@ msgid "" "A small logging helper for batch output keeps successes / failures aligned " "without bespoke formatting:" msgstr "" -"バッチ出力用の小さなログ補助関数を使えば、独自の整形を書かずに成功 / 失敗を揃" -"えて記録できます:" +"バッチ出力用の小さなログ補助関数を使えば、独自の整形を書かずに成功 / 失敗を" +"揃えて記録できます:" #: src/python/errors.md:218 msgid "" @@ -24347,8 +25099,8 @@ msgstr "\"ok %s sloc=%s\"" #: src/python/errors.md:235 msgid "" -"[Batch processing](batch.md) — the never-raise contract that routes per-file " -"failures into `AnalysisFailure` slots." +"[Batch processing](batch.md) — the never-raise contract that routes per-" +"file failures into `AnalysisFailure` slots." msgstr "" "[バッチ処理](batch.md) — ファイルごとの失敗を `AnalysisFailure` のスロットへ" "振り向ける、例外を送出しない契約。" @@ -24356,12 +25108,12 @@ msgstr "" #: src/python/errors.md:237 msgid "" "[Async patterns](async.md) — `asyncio.gather(..., return_exceptions=True)` " -"is the async-side equivalent of the batch contract: per-task exceptions land " -"in the result list instead of cancelling the whole gather." +"is the async-side equivalent of the batch contract: per-task exceptions " +"land in the result list instead of cancelling the whole gather." msgstr "" -"[非同期パターン](async.md) — `asyncio.gather(..., return_exceptions=True)` は" -"バッチの契約の非同期側の等価物です。タスクごとの例外は gather 全体をキャンセ" -"ルする代わりに結果リストに入ります。" +"[非同期パターン](async.md) — `asyncio.gather(..., return_exceptions=True)` " +"はバッチの契約の非同期側の等価物です。タスクごとの例外は gather 全体をキャン" +"セルする代わりに結果リストに入ります。" #: src/python/errors.md:241 msgid "" @@ -24378,8 +25130,9 @@ msgid "" "detach`. The canonical async pattern is therefore `asyncio.to_thread`:" msgstr "" "`bca.analyze` は CPU バウンドです。処理の中身は tree-sitter によるパースとメ" -"トリクスの各パスで、どちらも PyO3 の `Python::detach` を介して Rust 側で GIL " -"を解放します。したがって正規の非同期パターンは `asyncio.to_thread` です:" +"トリクスの各パスで、どちらも PyO3 の `Python::detach` を介して Rust 側で " +"GIL を解放します。したがって正規の非同期パターンは `asyncio.to_thread` で" +"す:" #: src/python/async.md:10 msgid "\"\"\"Run ``bca.analyze(path)`` on the default thread executor.\"\"\"" @@ -24444,8 +25197,8 @@ msgid "" "the thread pool's size." msgstr "" "Rust 側が重い処理の間 GIL を解放するため、複数の `to_thread(bca." -"analyze, ...)` 呼び出しは本当に並列に実行されます — これは協調的な I/O 多重化" -"ではなく、スレッドプールのサイズを上限とする実際のマルチコア活用です。" +"analyze, ...)` 呼び出しは本当に並列に実行されます — これは協調的な I/O 多重" +"化ではなく、スレッドプールのサイズを上限とする実際のマルチコア活用です。" #: src/python/async.md:50 msgid "Custom executors" @@ -24461,9 +25214,9 @@ msgstr "" #: src/python/async.md:69 msgid "" -"Eight workers on an 8-core machine is the comfortable upper bound for purely " -"CPU-bound work; raising it further oversubscribes the machine and trades " -"throughput for context-switch overhead." +"Eight workers on an 8-core machine is the comfortable upper bound for " +"purely CPU-bound work; raising it further oversubscribes the machine and " +"trades throughput for context-switch overhead." msgstr "" "純粋に CPU バウンドな処理では、8 コアのマシンで 8 ワーカーが無理のない上限で" "す。これ以上増やすとマシンを過剰に割り当てることになり、スループットをコンテ" @@ -24475,12 +25228,12 @@ msgstr "結果のストリーミング" #: src/python/async.md:75 msgid "" -"`asyncio.as_completed` lets you start consuming results as soon as the first " -"analysis finishes — useful when the per-file work varies wildly in cost (a 5 " -"KB file vs a 500 KB generated bundle):" +"`asyncio.as_completed` lets you start consuming results as soon as the " +"first analysis finishes — useful when the per-file work varies wildly in " +"cost (a 5 KB file vs a 500 KB generated bundle):" msgstr "" -"`asyncio.as_completed` を使うと、最初の解析が完了した時点から結果の消費を始め" -"られます。ファイルごとの処理コストが大きくばらつく場合(5 KB のファイルと " +"`asyncio.as_completed` を使うと、最初の解析が完了した時点から結果の消費を始" +"められます。ファイルごとの処理コストが大きくばらつく場合(5 KB のファイルと " "500 KB の生成バンドルなど)に有用です:" #: src/python/async.md:84 @@ -24493,9 +25246,9 @@ msgid "" "cancel pending tasks when the caller returns early, so a leaked task can " "keep running on the thread pool well after the async function returns." msgstr "" -"`finally` ブロックでのキャンセルが重要です。`as_completed` は呼び出し元が早期" -"リターンしても保留中のタスクを自動でキャンセルしないため、リークしたタスクが" -"非同期関数の復帰後もスレッドプール上で動き続けることがあります。" +"`finally` ブロックでのキャンセルが重要です。`as_completed` は呼び出し元が早" +"期リターンしても保留中のタスクを自動でキャンセルしないため、リークしたタスク" +"が非同期関数の復帰後もスレッドプール上で動き続けることがあります。" #: src/python/async.md:104 msgid "Anti-pattern: calling `bca.analyze` directly in a coroutine" @@ -24512,17 +25265,17 @@ msgstr "# 呼び出しのたびにイベントループをブロックします\ #: src/python/async.md:112 msgid "" "`async def` does not make the body asynchronous. Without `to_thread` or an " -"explicit executor, every coroutine that calls `bca.analyze` stalls the event " -"loop for the full duration of the parse — other tasks waiting on I/O, " +"explicit executor, every coroutine that calls `bca.analyze` stalls the " +"event loop for the full duration of the parse — other tasks waiting on I/O, " "timers, or queues all freeze until the parse returns. The `to_thread` " -"wrapper is one line and makes the difference between a responsive server and " -"a single-threaded one." +"wrapper is one line and makes the difference between a responsive server " +"and a single-threaded one." msgstr "" "`async def` は本体を非同期にするわけではありません。`to_thread` や明示的なエ" "グゼキューターなしでは、`bca.analyze` を呼び出すすべてのコルーチンがパースの" "全時間にわたってイベントループを停止させます — I/O、タイマー、キューを待つ他" -"のタスクはすべて、パースが返るまで凍結します。`to_thread` ラッパーは 1 行で書" -"けて、応答性のあるサーバーとシングルスレッドのサーバーの違いを生みます。" +"のタスクはすべて、パースが返るまで凍結します。`to_thread` ラッパーは 1 行で" +"書けて、応答性のあるサーバーとシングルスレッドのサーバーの違いを生みます。" #: src/python/async.md:120 msgid "When `analyze_batch` is the better fit" @@ -24537,28 +25290,28 @@ msgid "" "`asyncio.to_thread` to keep the event loop responsive:" msgstr "" "静的で有限のパスのリストを処理していて結果のストリーミングが不要なら、[`bca." -"analyze_batch`](batch.md) の方が `gather(*to_thread(...))` よりシンプルです。" -"呼び出し元スレッド上で逐次実行されますが、ファイルごとのエラーで例外を送出す" -"ることはありません。イベントループの応答性を保つには、`analyze_batch` の呼び" -"出し全体を `asyncio.to_thread` でラップしてください:" +"analyze_batch`](batch.md) の方が `gather(*to_thread(...))` よりシンプルで" +"す。呼び出し元スレッド上で逐次実行されますが、ファイルごとのエラーで例外を送" +"出することはありません。イベントループの応答性を保つには、`analyze_batch` の" +"呼び出し全体を `asyncio.to_thread` でラップしてください:" #: src/python/async.md:137 msgid "" -"This trades the per-file parallelism of `gather` for the simpler error model " -"of `analyze_batch`. Pick `gather` when you want both parallelism and typed " -"`OSError` dispatch; pick `to_thread(analyze_batch, paths)` when you want one " -"async call and the never-raise contract." +"This trades the per-file parallelism of `gather` for the simpler error " +"model of `analyze_batch`. Pick `gather` when you want both parallelism and " +"typed `OSError` dispatch; pick `to_thread(analyze_batch, paths)` when you " +"want one async call and the never-raise contract." msgstr "" "これは `gather` のファイル単位の並列性を、`analyze_batch` のよりシンプルなエ" -"ラーモデルと引き換えにします。並列性と型付き `OSError` の振り分けの両方が欲し" -"い場合は `gather` を、非同期呼び出しを 1 つにまとめて例外を送出しない契約が欲" -"しい場合は `to_thread(analyze_batch, paths)` を選んでください。" +"ラーモデルと引き換えにします。並列性と型付き `OSError` の振り分けの両方が欲" +"しい場合は `gather` を、非同期呼び出しを 1 つにまとめて例外を送出しない契約" +"が欲しい場合は `to_thread(analyze_batch, paths)` を選んでください。" #: src/developers/index.md:3 msgid "" "If you want to contribute to the development of `big-code-analysis` we have " -"summarized here a series of guidelines that are supposed to help you in your " -"building process." +"summarized here a series of guidelines that are supposed to help you in " +"your building process." msgstr "" "`big-code-analysis` の開発に貢献したい方のために、ビルド作業の助けとなる一連" "のガイドラインをここにまとめています。" @@ -24569,9 +25322,9 @@ msgid "" "You can learn how to do that here." msgstr "" -"前提条件として、`Rust` の最新バージョンをインストールする必要があります。その" -"方法は " -"こちら で確認できます。" +"前提条件として、`Rust` の最新バージョンをインストールする必要があります。そ" +"の方法は こちら で確認できます。" #: src/developers/index.md:11 msgid "Clone Repository" @@ -24579,7 +25332,8 @@ msgstr "リポジトリのクローン" #: src/developers/index.md:13 msgid "First of all, you need to clone the repository. You can do that:" -msgstr "まず、リポジトリをクローンする必要があります。次の方法で実行できます。" +msgstr "" +"まず、リポジトリをクローンする必要があります。次の方法で実行できます。" #: src/developers/index.md:16 msgid "through **HTTPS**" @@ -24605,72 +25359,72 @@ msgstr "Make が正式なエントリポイント" #: src/developers/index.md:30 msgid "" -"The repository ships a `Makefile` that wraps every common build, test, lint, " -"format, and docs task. Run `make help` to see the full list of targets, and " -"`make check-tools` to verify which optional tools (`taplo`, `rumdl`, " -"`shellcheck`, `shfmt`, `checkmake`, `mdbook`, `cargo-insta`, `cargo-udeps`) " -"are present on your machine." +"The repository ships a `Makefile` that wraps every common build, test, " +"lint, format, and docs task. Run `make help` to see the full list of " +"targets, and `make check-tools` to verify which optional tools (`taplo`, " +"`rumdl`, `shellcheck`, `shfmt`, `checkmake`, `mdbook`, `cargo-insta`, " +"`cargo-udeps`, `cargo-nextest`) are present on your machine." msgstr "" "このリポジトリには、ビルド・テスト・リント・フォーマット・ドキュメント生成と" "いった一般的なタスクをすべてラップする `Makefile` が同梱されています。`make " -"help` を実行するとターゲットの全一覧を確認でき、`make check-tools` を実行する" -"と、オプションのツール(`taplo`、`rumdl`、`shellcheck`、`shfmt`、" -"`checkmake`、`mdbook`、`cargo-insta`、`cargo-udeps`)のどれがマシンに存在する" -"かを確認できます。" +"help` を実行するとターゲットの全一覧を確認でき、`make check-tools` を実行す" +"ると、オプションのツール(`taplo`、`rumdl`、`shellcheck`、`shfmt`、" +"`checkmake`、`mdbook`、`cargo-insta`、`cargo-udeps`、`cargo-nextest`)のどれ" +"がマシンに存在するかを確認できます。" -#: src/developers/index.md:36 +#: src/developers/index.md:37 msgid "The two composite targets you will use most:" msgstr "最もよく使うことになる 2 つの複合ターゲットは次のとおりです。" -#: src/developers/index.md:38 +#: src/developers/index.md:39 msgid "" "`make pre-commit` — the recommended local gate before committing. Runs " "`cargo fmt --check`, both clippy invocations (default-features and `--all-" -"features`), `cargo test --workspace --all-features` (lib + bin + integration " -"+ doc), `cargo +nightly udeps`, and the markdown / TOML / shell / Makefile " -"lint families in one parallel pass." +"features`), the full test suite via `make test` + `make test-doc` (lib + " +"bin + integration + doc), `cargo +nightly udeps`, and the markdown / TOML / " +"shell / Makefile lint families in one parallel pass." msgstr "" "`make pre-commit` — コミット前に推奨されるローカルゲートです。`cargo fmt --" "check`、2 種類の clippy 実行(デフォルトフィーチャと `--all-features`)、" -"`cargo test --workspace --all-features`(lib + bin + 統合 + doc)、`cargo " -"+nightly udeps`、および Markdown / TOML / シェル / Makefile のリント群を 1 回" -"の並列パスで実行します。" +"`make test` + `make test-doc` によるテストスイート全体(lib + bin + 統合 + " +"doc)、`cargo +nightly udeps`、および Markdown / TOML / シェル / Makefile の" +"リント群を 1 回の並列パスで実行します。" -#: src/developers/index.md:44 +#: src/developers/index.md:45 msgid "" "`make ci` — the same checks in the order CI runs them, with no auto-fixing. " "Use this to reproduce a failing CI run locally." msgstr "" -"`make ci` — CI が実行するのと同じチェックを同じ順序で、自動修正なしで実行しま" -"す。CI の失敗をローカルで再現するために使用してください。" +"`make ci` — CI が実行するのと同じチェックを同じ順序で、自動修正なしで実行し" +"ます。CI の失敗をローカルで再現するために使用してください。" -#: src/developers/index.md:47 +#: src/developers/index.md:48 msgid "" -"If GNU Make 4 or any of the optional tools are unavailable, fall back to the " -"raw cargo commands shown below — they are equivalent to the corresponding " -"Make targets." +"If GNU Make 4 or any of the optional tools are unavailable, fall back to " +"the raw cargo commands shown below — they are equivalent to the " +"corresponding Make targets." msgstr "" "GNU Make 4 やオプションのツールが利用できない場合は、以下に示す生の cargo コ" "マンドにフォールバックしてください。これらは対応する Make ターゲットと同等で" "す。" -#: src/developers/index.md:51 +#: src/developers/index.md:52 msgid "Building" msgstr "ビルド" -#: src/developers/index.md:53 +#: src/developers/index.md:54 msgid "" -"To build the `big-code-analysis` library, the CLI, and the web server in one " -"shot:" +"To build the `big-code-analysis` library, the CLI, and the web server in " +"one shot:" msgstr "" -"`big-code-analysis` ライブラリ、CLI、Web サーバーを一括でビルドするには、次を" -"実行します。" +"`big-code-analysis` ライブラリ、CLI、Web サーバーを一括でビルドするには、次" +"を実行します。" -#: src/developers/index.md:61 +#: src/developers/index.md:62 msgid "For an individual crate, invoke `cargo` directly:" msgstr "個別のクレートに対しては、`cargo` を直接呼び出します。" -#: src/developers/index.md:69 +#: src/developers/index.md:70 msgid "" "`make check` runs `cargo check --workspace --all-targets` for fast type-" "checking during iteration." @@ -24678,33 +25432,84 @@ msgstr "" "`make check` は `cargo check --workspace --all-targets` を実行し、反復作業中" "の高速な型チェックを行います。" -#: src/developers/index.md:72 +#: src/developers/index.md:73 msgid "Testing" msgstr "テスト" -#: src/developers/index.md:74 +#: src/developers/index.md:75 msgid "To verify that all tests pass:" msgstr "すべてのテストが通ることを確認するには、次を実行します。" -#: src/developers/index.md:81 +#: src/developers/index.md:82 +msgid "" +"`make test` prefers [cargo-nextest](https://nexte.st/), which is also what " +"CI runs. Plain `cargo test` finishes each test binary before starting the " +"next, so parallelism exists only within a binary; nextest schedules every " +"binary's tests into one global pool. Install it with `cargo install --" +"locked cargo-nextest`." +msgstr "" +"`make test` は [cargo-nextest](https://nexte.st/) を優先します。CI が実行し" +"ているのもこちらです。素の `cargo test` は各テストバイナリを終えてから次を開" +"始するため、並列性はバイナリ内にしか存在しません。nextest はすべてのバイナリ" +"のテストを 1 つのグローバルなプールにスケジュールします。`cargo install --" +"locked cargo-nextest` でインストールできます。" + +#: src/developers/index.md:88 +msgid "" +"Without it, `make test` falls back to `cargo test --workspace --all-" +"features --lib --bins --tests`, which runs the same set of tests. The two " +"runners are not quite interchangeable, though: nextest runs each test in " +"its own process, so anything sharing state across tests within a binary — a " +"`OnceLock` cache, an environment variable, the working directory — is " +"isolated under nextest and shared under `cargo test`. Preferring nextest " +"locally means local runs match CI on that axis." +msgstr "" +"nextest がない場合、`make test` は `cargo test --workspace --all-features --" +"lib --bins --tests` にフォールバックし、同じテスト集合を実行します。ただし " +"2 つのランナーは完全に交換可能ではありません。nextest は各テストを独自のプロ" +"セスで実行するため、バイナリ内でテスト間に状態を共有するもの — `OnceLock` " +"キャッシュ、環境変数、カレントディレクトリ — は nextest では分離され、" +"`cargo test` では共有されます。ローカルで nextest を優先するということは、そ" +"の軸においてローカル実行が CI と一致するということです。" + +#: src/developers/index.md:96 +msgid "" +"Set `NEXTEST=` to force the fallback without uninstalling anything (`make " +"test NEXTEST=`), or point it at a specific binary (`make test NEXTEST=/path/" +"to/cargo-nextest`)." +msgstr "" +"`NEXTEST=` を設定すると、何もアンインストールせずにフォールバックを強制でき" +"ます(`make test NEXTEST=`)。特定のバイナリを指すこともできます(`make " +"test NEXTEST=/path/to/cargo-nextest`)。" + +#: src/developers/index.md:100 +msgid "" +"Doctests are a separate target because nextest cannot run them. `make pre-" +"commit` and `make ci` run both." +msgstr "" +"doctest は nextest が実行できないため、別のターゲットになっています。`make " +"pre-commit` と `make ci` はその両方を実行します。" + +#: src/developers/index.md:103 msgid "If you only want to run the cargo command yourself:" msgstr "cargo コマンドだけを自分で実行したい場合は、次のとおりです。" -#: src/developers/index.md:87 +#: src/developers/index.md:109 msgid "Updating insta tests" msgstr "insta テストの更新" -#: src/developers/index.md:89 +#: src/developers/index.md:111 msgid "" "We use [insta](https://insta.rs); install [cargo insta](https://crates.io/" "crates/cargo-insta) to manage snapshots. The Makefile wraps the two " "operations you need:" msgstr "" -"本プロジェクトでは [insta](https://insta.rs) を使用しています。スナップショッ" -"トを管理するには [cargo insta](https://crates.io/crates/cargo-insta) をインス" -"トールしてください。必要になる 2 つの操作は Makefile がラップしています。" +"本プロジェクトでは [insta](https://insta.rs) を使用しています。スナップ" +"ショットを管理するには [cargo insta](https://crates.io/crates/cargo-insta) " +"をインストールしてください。必要になる 2 つの操作は Makefile がラップしてい" +"ます。" -#: src/developers/index.md:98 +#: src/developers/index.md:120 msgid "" "`make insta-review` runs the tests, generates the new snapshot references, " "and lets you review each diff. Reach for `make insta-accept` only for bulk " @@ -24717,48 +25522,49 @@ msgstr "" "様であることを確認済みの、メトリクス値のみが変わる一括更新(文法のバージョン" "アップ、Halstead 演算子の再分類など)に限って使用してください。" -#: src/developers/index.md:104 +#: src/developers/index.md:126 msgid "Code Formatting" msgstr "コードフォーマット" -#: src/developers/index.md:106 +#: src/developers/index.md:128 msgid "" "If all previous steps went well, and you want to make a pull request to " "integrate your invaluable help in the codebase, the last step left is code " -"formatting. The `make fmt` target runs every formatter in the project (Rust, " -"Markdown, TOML, Bash) in one shot; `make fmt-check` verifies formatting " -"without modifying files." +"formatting. The `make fmt` target runs every formatter in the project " +"(Rust, Markdown, TOML, Bash) in one shot; `make fmt-check` verifies " +"formatting without modifying files." msgstr "" "これまでのステップがすべて問題なく完了し、あなたの貴重な貢献をコードベースに" "取り込むためのプルリクエストを作成したいなら、最後に残っているステップはコー" -"ドフォーマットです。`make fmt` ターゲットはプロジェクト内のすべてのフォーマッ" -"タ(Rust、Markdown、TOML、Bash)を一括で実行します。`make fmt-check` はファイ" -"ルを変更せずにフォーマットを検証します。" +"ドフォーマットです。`make fmt` ターゲットはプロジェクト内のすべてのフォー" +"マッタ(Rust、Markdown、TOML、Bash)を一括で実行します。`make fmt-check` は" +"ファイルを変更せずにフォーマットを検証します。" -#: src/developers/index.md:117 +#: src/developers/index.md:139 msgid "Rustfmt" msgstr "Rustfmt" -#: src/developers/index.md:119 +#: src/developers/index.md:141 msgid "This tool formats your code according to Rust style guidelines." msgstr "" -"このツールは、Rust のスタイルガイドラインに従ってコードをフォーマットします。" +"このツールは、Rust のスタイルガイドラインに従ってコードをフォーマットしま" +"す。" -#: src/developers/index.md:121 src/developers/index.md:143 +#: src/developers/index.md:143 src/developers/index.md:165 msgid "To install:" msgstr "インストールするには、次を実行します。" -#: src/developers/index.md:127 +#: src/developers/index.md:149 msgid "To format the code (handled automatically by `make fmt`):" msgstr "" "コードをフォーマットするには、次を実行します(`make fmt` が自動的に処理しま" "す)。" -#: src/developers/index.md:133 +#: src/developers/index.md:155 msgid "Clippy" msgstr "Clippy" -#: src/developers/index.md:135 +#: src/developers/index.md:157 msgid "" "This tool helps developers to write better code catching automatically lots " "of common mistakes for them. It detects in your code a series of errors and " @@ -24768,7 +25574,7 @@ msgstr "" "書く手助けをします。コード内の一連のエラーや警告を検出し、これらはプルリクエ" "ストを作成する前に**必ず**修正しなければなりません。" -#: src/developers/index.md:139 +#: src/developers/index.md:161 msgid "" "`make clippy` runs both clippy invocations the project enforces (default-" "features and `--all-features`); `make lint` additionally runs the markdown, " @@ -24778,15 +25584,15 @@ msgstr "" "フィーチャと `--all-features`)を実行します。`make lint` はさらに Markdown、" "シェル、TOML、Makefile のリンターも実行します。" -#: src/developers/index.md:149 +#: src/developers/index.md:171 msgid "To detect errors and warnings:" msgstr "エラーと警告を検出するには、次を実行します。" -#: src/developers/index.md:158 +#: src/developers/index.md:180 msgid "Unused dependencies" msgstr "未使用の依存関係" -#: src/developers/index.md:160 +#: src/developers/index.md:182 msgid "" "`make udeps` runs `cargo +nightly udeps --workspace --all-targets` to catch " "dependencies declared in `Cargo.toml` but never referenced. Requires the " @@ -24797,27 +25603,27 @@ msgstr "" "す。nightly ツールチェーン(`rustup toolchain install nightly`)と `cargo-" "udeps` が必要です。" -#: src/developers/index.md:165 +#: src/developers/index.md:187 msgid "Code Documentation" msgstr "コードドキュメント" -#: src/developers/index.md:173 +#: src/developers/index.md:195 msgid "" "`make doc` and `make doc-open` are the interactive viewers — they build " "whatever they can so you can still inspect rendered output mid-refactor. " "`make doc-check` is the strict gate that runs as part of `make pre-commit` " -"and CI (`cargo doc --no-deps --workspace --all-features` with `RUSTDOCFLAGS` " -"extended by `-D warnings`); it catches broken intra-doc links, links into " -"private items, and other rustdoc regressions." +"and CI (`cargo doc --no-deps --workspace --all-features` with " +"`RUSTDOCFLAGS` extended by `-D warnings`); it catches broken intra-doc " +"links, links into private items, and other rustdoc regressions." msgstr "" "`make doc` と `make doc-open` は対話的なビューアーで、ビルドできるものをビル" "ドするため、リファクタリングの途中でもレンダリング結果を確認できます。`make " "doc-check` は `make pre-commit` と CI の一部として実行される厳格なゲートで" "(`RUSTDOCFLAGS` に `-D warnings` を追加した `cargo doc --no-deps --" -"workspace --all-features`)、壊れたドキュメント内リンク、非公開アイテムへのリ" -"ンク、その他の rustdoc の回帰を検出します。" +"workspace --all-features`)、壊れたドキュメント内リンク、非公開アイテムへの" +"リンク、その他の rustdoc の回帰を検出します。" -#: src/developers/index.md:181 +#: src/developers/index.md:203 msgid "" "Remove the `--no-deps` option from the underlying cargo invocation if you " "also want to build the documentation of each dependency used by **big-code-" @@ -24826,47 +25632,47 @@ msgstr "" "**big-code-analysis** が使用する各依存関係のドキュメントもビルドしたい場合" "は、基になる cargo 呼び出しから `--no-deps` オプションを削除してください。" -#: src/developers/index.md:185 +#: src/developers/index.md:207 msgid "Building this book" msgstr "本書のビルド" -#: src/developers/index.md:187 +#: src/developers/index.md:209 msgid "The book you are reading lives under `big-code-analysis-book/`:" msgstr "いま読んでいる本書は `big-code-analysis-book/` 以下にあります。" -#: src/developers/index.md:194 +#: src/developers/index.md:216 msgid "Run your code" msgstr "コードの実行" -#: src/developers/index.md:196 +#: src/developers/index.md:218 msgid "You can run **bca** using:" msgstr "**bca** は次のように実行できます。" -#: src/developers/index.md:202 +#: src/developers/index.md:224 msgid "To know the list of **bca** parameters, run:" msgstr "**bca** のパラメーター一覧を確認するには、次を実行します。" -#: src/developers/index.md:208 +#: src/developers/index.md:230 msgid "You can run **bca-web** using:" msgstr "**bca-web** は次のように実行できます。" -#: src/developers/index.md:214 +#: src/developers/index.md:236 msgid "To know the list of **bca-web** parameters, run:" msgstr "**bca-web** のパラメーター一覧を確認するには、次を実行します。" -#: src/developers/index.md:220 +#: src/developers/index.md:242 msgid "" "`make install`, `make install-cli`, and `make install-web` invoke `cargo " "install --path` for the respective binary crates." msgstr "" -"`make install`、`make install-cli`、`make install-web` は、それぞれ対応するバ" -"イナリクレートに対して `cargo install --path` を呼び出します。" +"`make install`、`make install-cli`、`make install-web` は、それぞれ対応する" +"バイナリクレートに対して `cargo install --path` を呼び出します。" -#: src/developers/index.md:223 +#: src/developers/index.md:245 msgid "Practical advice" msgstr "実践的なアドバイス" -#: src/developers/index.md:225 +#: src/developers/index.md:247 msgid "" "When you add a new feature, add at least one unit or integration test to " "verify that everything works correctly" @@ -24874,15 +25680,15 @@ msgstr "" "新機能を追加するときは、すべてが正しく動作することを確認するために、少なくと" "も 1 つのユニットテストまたは統合テストを追加してください" -#: src/developers/index.md:227 +#: src/developers/index.md:249 msgid "Document public API" msgstr "公開 API をドキュメント化してください" -#: src/developers/index.md:228 +#: src/developers/index.md:250 msgid "Do not add dead code" msgstr "デッドコードを追加しないでください" -#: src/developers/index.md:229 +#: src/developers/index.md:251 msgid "" "Comment intricate code such that others can comprehend what you have " "accomplished" @@ -24890,11 +25696,11 @@ msgstr "" "複雑なコードには、何を実現したのかを他の人が理解できるようにコメントを付けて" "ください" -#: src/developers/index.md:231 +#: src/developers/index.md:253 msgid "Run `make pre-commit` before pushing — it is the same gate CI runs" msgstr "" -"プッシュ前に `make pre-commit` を実行してください — CI が実行するのと同じゲー" -"トです" +"プッシュ前に `make pre-commit` を実行してください — CI が実行するのと同じ" +"ゲートです" #: src/developers/new-language.md:1 msgid "Supporting a new language" @@ -24905,8 +25711,8 @@ msgid "" "This section is to help developers implement support for a new language in " "`big-code-analysis`." msgstr "" -"このセクションは、開発者が `big-code-analysis` に新しい言語のサポートを実装す" -"るのを支援するためのものです。" +"このセクションは、開発者が `big-code-analysis` に新しい言語のサポートを実装" +"するのを支援するためのものです。" #: src/developers/new-language.md:6 msgid "To implement a new language, two steps are required:" @@ -24936,15 +25742,15 @@ msgstr "文法の生成" #: src/developers/new-language.md:18 msgid "" -"As a **prerequisite** for adding a new grammar, there needs to exist a [tree-" -"sitter](https://github.com/tree-sitter) version for the desired language " -"that matches the [version used in this project](https://github.com/dekobon/" -"big-code-analysis/blob/main/Cargo.toml)." +"As a **prerequisite** for adding a new grammar, there needs to exist a " +"[tree-sitter](https://github.com/tree-sitter) version for the desired " +"language that matches the [version used in this project](https://github.com/" +"dekobon/big-code-analysis/blob/main/Cargo.toml)." msgstr "" -"新しい文法を追加するための**前提条件**として、目的の言語について、[本プロジェ" -"クトで使用しているバージョン](https://github.com/dekobon/big-code-analysis/" -"blob/main/Cargo.toml)と一致する [tree-sitter](https://github.com/tree-" -"sitter) のバージョンが存在している必要があります。" +"新しい文法を追加するための**前提条件**として、目的の言語について、[本プロ" +"ジェクトで使用しているバージョン](https://github.com/dekobon/big-code-" +"analysis/blob/main/Cargo.toml)と一致する [tree-sitter](https://github.com/" +"tree-sitter) のバージョンが存在している必要があります。" #: src/developers/new-language.md:23 msgid "" @@ -24963,23 +25769,23 @@ msgstr "" msgid "" "Add the language specific `tree-sitter` crate to the `enums` crate, making " "sure the dependency is pinned with `=X.Y.Z` to the same version used in the " -"root `big-code-analysis` `Cargo.toml`. For example, for the Rust support the " -"following line exists in the [/enums/Cargo.toml](https://github.com/dekobon/" -"big-code-analysis/blob/main/enums/Cargo.toml): `tree-sitter-rust = " +"root `big-code-analysis` `Cargo.toml`. For example, for the Rust support " +"the following line exists in the [/enums/Cargo.toml](https://github.com/" +"dekobon/big-code-analysis/blob/main/enums/Cargo.toml): `tree-sitter-rust = " "\"=0.24.2\"`." msgstr "" "言語固有の `tree-sitter` クレートを `enums` クレートに追加します。このとき、" -"依存関係がルートの `big-code-analysis` の `Cargo.toml` で使用されているのと同" -"じバージョンに `=X.Y.Z` でピン留めされていることを確認してください。たとえば " -"Rust サポートの場合、[/enums/Cargo.toml](https://github.com/dekobon/big-code-" -"analysis/blob/main/enums/Cargo.toml) には次の行があります: `tree-sitter-rust " -"= \"=0.24.2\"`。" +"依存関係がルートの `big-code-analysis` の `Cargo.toml` で使用されているのと" +"同じバージョンに `=X.Y.Z` でピン留めされていることを確認してください。たとえ" +"ば Rust サポートの場合、[/enums/Cargo.toml](https://github.com/dekobon/big-" +"code-analysis/blob/main/enums/Cargo.toml) には次の行があります: `tree-" +"sitter-rust = \"=0.24.2\"`。" #: src/developers/new-language.md:36 msgid "" -"Append the language to the `enum` crate in [/enums/src/languages.rs](https://" -"github.com/dekobon/big-code-analysis/blob/main/enums/src/languages.rs). " -"Keeping with Rust as the example, the line would be `(Rust, " +"Append the language to the `enum` crate in [/enums/src/languages.rs]" +"(https://github.com/dekobon/big-code-analysis/blob/main/enums/src/languages." +"rs). Keeping with Rust as the example, the line would be `(Rust, " "tree_sitter_rust)`. The first parameter is the name of the Rust enum that " "will be generated, the second is the `tree-sitter` function to call to get " "the language's grammar." @@ -24987,8 +25793,8 @@ msgstr "" "[/enums/src/languages.rs](https://github.com/dekobon/big-code-analysis/blob/" "main/enums/src/languages.rs) で `enum` クレートに言語を追記します。引き続き " "Rust を例にすると、その行は `(Rust, tree_sitter_rust)` になります。第 1 パラ" -"メーターは生成される Rust の enum の名前で、第 2 パラメーターはその言語の文法" -"を取得するために呼び出す `tree-sitter` の関数です。" +"メーターは生成される Rust の enum の名前で、第 2 パラメーターはその言語の文" +"法を取得するために呼び出す `tree-sitter` の関数です。" #: src/developers/new-language.md:42 msgid "" @@ -25010,21 +25816,21 @@ msgid "" "big-code-analysis/blob/main/recreate-grammars.sh) script that runs the " "`enums` crate to generate the grammar for the new language." msgstr "" -"最後に、[/recreate-grammars.sh](https://github.com/dekobon/big-code-analysis/" -"blob/main/recreate-grammars.sh) スクリプトを実行します。これは `enums` クレー" -"トを実行して、新しい言語の文法を生成します。" +"最後に、[/recreate-grammars.sh](https://github.com/dekobon/big-code-" +"analysis/blob/main/recreate-grammars.sh) スクリプトを実行します。これは " +"`enums` クレートを実行して、新しい言語の文法を生成します。" #: src/developers/new-language.md:53 msgid "" "At this point we should have a new grammar file for the new language in [/" "src/languages/](https://github.com/dekobon/big-code-analysis/tree/main/src/" -"languages). See [/src/languages/language_rust.rs](https://github.com/dekobon/" -"big-code-analysis/blob/main/src/languages/language_rust.rs) as an example of " -"the generated enum." +"languages). See [/src/languages/language_rust.rs](https://github.com/" +"dekobon/big-code-analysis/blob/main/src/languages/language_rust.rs) as an " +"example of the generated enum." msgstr "" "この時点で、[/src/languages/](https://github.com/dekobon/big-code-analysis/" -"tree/main/src/languages) に新しい言語の文法ファイルができているはずです。生成" -"された enum の例としては [/src/languages/language_rust.rs](https://github." +"tree/main/src/languages) に新しい言語の文法ファイルができているはずです。生" +"成された enum の例としては [/src/languages/language_rust.rs](https://github." "com/dekobon/big-code-analysis/blob/main/src/languages/language_rust.rs) を参" "照してください。" @@ -25040,20 +25846,21 @@ msgid "" "github.com/dekobon/big-code-analysis/blob/main/Cargo.toml) is `tree-sitter-" "rust = \"=0.24.2\"`." msgstr "" -"言語固有の `tree-sitter` クレートを、`enums` クレートと同じ `=X.Y.Z` のピン留" -"めで `big-code-analysis` ワークスペースに追加します。たとえば Rust サポートの" -"場合、ルートの [Cargo.toml](https://github.com/dekobon/big-code-analysis/" -"blob/main/Cargo.toml) の行は `tree-sitter-rust = \"=0.24.2\"` です。" +"言語固有の `tree-sitter` クレートを、`enums` クレートと同じ `=X.Y.Z` のピン" +"留めで `big-code-analysis` ワークスペースに追加します。たとえば Rust サポー" +"トの場合、ルートの [Cargo.toml](https://github.com/dekobon/big-code-" +"analysis/blob/main/Cargo.toml) の行は `tree-sitter-rust = \"=0.24.2\"` で" +"す。" #: src/developers/new-language.md:68 msgid "" "Next we add the new `tree-sitter` language namespace to [/src/languages/mod." -"rs](https://github.com/dekobon/big-code-analysis/blob/main/src/languages/mod." -"rs) eg." +"rs](https://github.com/dekobon/big-code-analysis/blob/main/src/languages/" +"mod.rs) eg." msgstr "" "次に、新しい `tree-sitter` 言語の名前空間を [/src/languages/mod.rs](https://" -"github.com/dekobon/big-code-analysis/blob/main/src/languages/mod.rs) に追加し" -"ます。例:" +"github.com/dekobon/big-code-analysis/blob/main/src/languages/mod.rs) に追加" +"します。例:" #: src/developers/new-language.md:77 msgid "" @@ -25087,8 +25894,8 @@ msgstr "" "// 7) Language を取得するために呼び出す tree-sitter 関数\n" "// 8) ファイル拡張子\n" "// 9) emacs モード\n" -"// 10) ピン留めされた文法クレートのバージョン(ワークスペースの Cargo.toml に" -"ある\n" +"// 10) ピン留めされた文法クレートのバージョン(ワークスペースの Cargo.toml " +"にある\n" "// `=X.Y.Z` ピンを反映。両者の一致はドリフトテストで検証されます)\n" #: src/developers/new-language.md:96 @@ -25106,7 +25913,8 @@ msgstr "トレイトとテストの実装" #: src/developers/new-language.md:109 msgid "" "Wiring the grammar is only the first step. The new `Code` type must " -"also implement the AST plumbing and every metric trait the workspace defines:" +"also implement the AST plumbing and every metric trait the workspace " +"defines:" msgstr "" "文法の配線は最初のステップにすぎません。新しい `Code` 型は、AST の基盤" "処理と、ワークスペースが定義するすべてのメトリクストレイトも実装しなければな" @@ -25118,9 +25926,9 @@ msgid "" "analysis/blob/main/src/checker.rs) — comment, function, closure, call, " "string-literal, and `else-if` predicates over the grammar's `kind_id`s." msgstr "" -"[/src/checker.rs](https://github.com/dekobon/big-code-analysis/blob/main/src/" -"checker.rs) の **`Checker`** — 文法の `kind_id` に対する、コメント、関数、ク" -"ロージャ、呼び出し、文字列リテラル、`else-if` の各述語。" +"[/src/checker.rs](https://github.com/dekobon/big-code-analysis/blob/main/" +"src/checker.rs) の **`Checker`** — 文法の `kind_id` に対する、コメント、関" +"数、クロージャ、呼び出し、文字列リテラル、`else-if` の各述語。" #: src/developers/new-language.md:117 msgid "" @@ -25129,8 +25937,8 @@ msgid "" "operator/operand classification table." msgstr "" "[/src/getter.rs](https://github.com/dekobon/big-code-analysis/blob/main/src/" -"getter.rs) の **`Getter`** — `get_space_kind` に加え、Halstead の演算子/オペ" -"ランド分類テーブル。" +"getter.rs) の **`Getter`** — `get_space_kind` に加え、Halstead の演算子/オ" +"ペランド分類テーブル。" #: src/developers/new-language.md:121 msgid "" @@ -25139,8 +25947,8 @@ msgid "" "preservation; the default impl works for most languages." msgstr "" "[/src/alterator.rs](https://github.com/dekobon/big-code-analysis/blob/main/" -"src/alterator.rs) の **`Alterator`** — 通常は文字列リテラルの保全のみで、ほと" -"んどの言語ではデフォルト実装で十分です。" +"src/alterator.rs) の **`Alterator`** — 通常は文字列リテラルの保全のみで、ほ" +"とんどの言語ではデフォルト実装で十分です。" #: src/developers/new-language.md:125 msgid "" @@ -25155,8 +25963,8 @@ msgstr "" "`Exit`、`Halstead`、`Loc`、`Mi`、`NArgs`、`Nom`、`Npa`、`Npm`、`Tokens`、" "`Wmc`。まず [/src/metrics/](https://github.com/dekobon/big-code-analysis/" "tree/main/src/metrics) の `implement_metric_trait!` マクロ呼び出しで各トレイ" -"トをデフォルト(no-op)の本体として登録し、その後、その言語にとって意味のある" -"セマンティクスを持つメトリクスについては実際の実装に置き換えます。" +"トをデフォルト(no-op)の本体として登録し、その後、その言語にとって意味のあ" +"るセマンティクスを持つメトリクスについては実際の実装に置き換えます。" #: src/developers/new-language.md:133 msgid "Audit aliased grammar variants" @@ -25164,27 +25972,29 @@ msgstr "エイリアス化された文法バリアントの監査" #: src/developers/new-language.md:135 msgid "" -"Tree-sitter grammars frequently emit several distinct `kind_id`s that map to " -"the same `node.kind()` string (`Identifier` / `Identifier2` / `Identifier3` " -"in Go, `InvocationExpression` / `InvocationExpression2` in C#, " -"`QuotedContent` ⋯ `QuotedContent20` in Elixir). Every `match node.kind_id()` " -"arm that touches an aliasable rule must either list every numbered variant " -"or compare on the string `node.kind()` instead. Missing an alias silently " -"drops nodes from the metric. See the `add-lang` skill for the mechanical " -"audit procedure and lessons 2, 4, and 13 in [`docs/development/" -"lessons_learned.md`](https://github.com/dekobon/big-code-analysis/blob/main/" -"docs/development/lessons_learned.md) for the failure modes." +"Tree-sitter grammars frequently emit several distinct `kind_id`s that map " +"to the same `node.kind()` string (`Identifier` / `Identifier2` / " +"`Identifier3` in Go, `InvocationExpression` / `InvocationExpression2` in " +"C#, `QuotedContent` ⋯ `QuotedContent20` in Elixir). Every `match node." +"kind_id()` arm that touches an aliasable rule must either list every " +"numbered variant or compare on the string `node.kind()` instead. Missing an " +"alias silently drops nodes from the metric. See the `add-lang` skill for " +"the mechanical audit procedure and lessons 2, 4, and 13 in [`docs/" +"development/lessons_learned.md`](https://github.com/dekobon/big-code-" +"analysis/blob/main/docs/development/lessons_learned.md) for the failure " +"modes." msgstr "" "tree-sitter の文法は、同じ `node.kind()` 文字列に対応する複数の異なる " -"`kind_id` を発行することがよくあります(Go の `Identifier` / `Identifier2` / " -"`Identifier3`、C# の `InvocationExpression` / `InvocationExpression2`、" -"Elixir の `QuotedContent` ⋯ `QuotedContent20`)。エイリアス化されうるルールに" -"触れるすべての `match node.kind_id()` アームは、番号付きバリアントをすべて列" -"挙するか、代わりに文字列 `node.kind()` で比較しなければなりません。エイリアス" -"を見落とすと、ノードがメトリクスから黙って脱落します。機械的な監査手順につい" -"ては `add-lang` スキルを、失敗モードについては [`docs/development/" -"lessons_learned.md`](https://github.com/dekobon/big-code-analysis/blob/main/" -"docs/development/lessons_learned.md) のレッスン 2、4、13 を参照してください。" +"`kind_id` を発行することがよくあります(Go の `Identifier` / " +"`Identifier2` / `Identifier3`、C# の `InvocationExpression` / " +"`InvocationExpression2`、Elixir の `QuotedContent` ⋯ `QuotedContent20`)。エ" +"イリアス化されうるルールに触れるすべての `match node.kind_id()` アームは、番" +"号付きバリアントをすべて列挙するか、代わりに文字列 `node.kind()` で比較しな" +"ければなりません。エイリアスを見落とすと、ノードがメトリクスから黙って脱落し" +"ます。機械的な監査手順については `add-lang` スキルを、失敗モードについては " +"[`docs/development/lessons_learned.md`](https://github.com/dekobon/big-code-" +"analysis/blob/main/docs/development/lessons_learned.md) のレッスン 2、4、13 " +"を参照してください。" #: src/developers/new-language.md:148 msgid "Tests" @@ -25218,17 +26028,18 @@ msgstr "エンドツーエンドのワークフロー" #: src/developers/new-language.md:161 msgid "" "For an opinionated, end-to-end recipe — including the alias audit, test " -"layout, snapshot anchoring, and code-quality post-passes — see the project's " -"[`add-lang`](https://github.com/dekobon/big-code-analysis/blob/main/.claude/" -"skills/add-lang/SKILL.md) Claude Code skill. It is the canonical workflow " -"used by recent language additions (Elixir, PHP, C#, Bash, Go)." +"layout, snapshot anchoring, and code-quality post-passes — see the " +"project's [`add-lang`](https://github.com/dekobon/big-code-analysis/blob/" +"main/.claude/skills/add-lang/SKILL.md) Claude Code skill. It is the " +"canonical workflow used by recent language additions (Elixir, PHP, C#, " +"Bash, Go)." msgstr "" "エイリアス監査、テストレイアウト、スナップショットのアンカー付け、コード品質" "の後処理パスを含む、明確な方針を持つエンドツーエンドのレシピについては、プロ" "ジェクトの [`add-lang`](https://github.com/dekobon/big-code-analysis/blob/" -"main/.claude/skills/add-lang/SKILL.md) Claude Code スキルを参照してください。" -"これは最近の言語追加(Elixir、PHP、C#、Bash、Go)で使用された正式なワークフ" -"ローです。" +"main/.claude/skills/add-lang/SKILL.md) Claude Code スキルを参照してくださ" +"い。これは最近の言語追加(Elixir、PHP、C#、Bash、Go)で使用された正式なワー" +"クフローです。" #: src/developers/loc.md:1 msgid "Lines of Code (LoC)" @@ -25239,14 +26050,14 @@ msgid "" "In this document we give some guidance on how to implement the LoC metrics " "available in this crate. [Lines of code](https://en.wikipedia.org/wiki/" "Source_lines_of_code) is a software metric that gives an indication of the " -"size of some source code by counting the lines of the source code. There are " -"many types of LoC so we will first explain those by way of an example." +"size of some source code by counting the lines of the source code. There " +"are many types of LoC so we will first explain those by way of an example." msgstr "" -"このドキュメントでは、このクレートで利用できる LoC メトリクスの実装方法につい" -"ての手引きを示します。[コード行数](https://en.wikipedia.org/wiki/" -"Source_lines_of_code)は、ソースコードの行を数えることでソースコードの規模の目" -"安を与えるソフトウェアメトリクスです。LoC には多くの種類があるため、まず例を" -"使ってそれらを説明します。" +"このドキュメントでは、このクレートで利用できる LoC メトリクスの実装方法につ" +"いての手引きを示します。[コード行数](https://en.wikipedia.org/wiki/" +"Source_lines_of_code)は、ソースコードの行を数えることでソースコードの規模の" +"目安を与えるソフトウェアメトリクスです。LoC には多くの種類があるため、まず例" +"を使ってそれらを説明します。" #: src/developers/loc.md:11 msgid "Types of LoC" @@ -25319,8 +26130,8 @@ msgid "" "with the `Iterator` as its argument. METRIC VALUE: 1" msgstr "" "「論理」行は、コード内の文の数を数えたものです。何を文とみなすかは言語によっ" -"て異なることに注意してください。上の例では文は 1 つだけで、それは `Iterator` " -"を引数とする `product` の関数呼び出しです。メトリクス値: 1" +"て異なることに注意してください。上の例では文は 1 つだけで、それは " +"`Iterator` を引数とする `product` の関数呼び出しです。メトリクス値: 1" #: src/developers/loc.md:50 msgid "CLOC" @@ -25349,10 +26160,55 @@ msgstr "" "クス値: 2" #: src/developers/loc.md:60 +msgid "Whitespace-only files" +msgstr "空白文字のみのファイル" + +#: src/developers/loc.md:62 +msgid "" +"Source that contains no token at all — a file of nothing but spaces, tabs, " +"and newlines — is the one input class where a trailing newline changes a " +"LoC value. Everywhere else it is a formatting detail that no metric depends " +"on." +msgstr "" +"トークンをまったく含まないソース — スペース、タブ、改行だけのファイル — は、" +"末尾の改行が LoC の値を変える唯一の入力クラスです。それ以外の場所では、末尾" +"の改行はどのメトリクスも依存しない書式上の詳細にすぎません。" + +#: src/developers/loc.md:67 +msgid "" +"Most grammars collapse tree-sitter's root node to a zero-width node at end-" +"of-input for such input, rather than spanning the file. SLOC is derived " +"from that span, so those files report `sloc 0` when they end in a newline " +"and `sloc 1` when they do not. Five grammars — Elixir, Tcl, iRules, and the " +"`preproc` / `ccomment` helpers — keep the root span and report the rows " +"either way." +msgstr "" +"そのような入力に対して、ほとんどの文法は tree-sitter のルートノードをファイ" +"ル全体にまたがらせるのではなく、入力末尾の幅ゼロのノードに畳み込みます。" +"SLOC はそのスパンから導出されるため、これらのファイルは改行で終わる場合に " +"`sloc 0`、終わらない場合に `sloc 1` を報告します。5 つの文法 — Elixir、Tcl、" +"iRules、および `preproc` / `ccomment` ヘルパー — はルートのスパンを保持し、" +"どちらの場合も行数を報告します。" + +#: src/developers/loc.md:74 +msgid "" +"Which side a language falls on is upstream grammar behaviour, not a " +"decision this crate makes, so a grammar bump can move one across. The " +"counts are pinned per language by " +"`whitespace_only_input_is_the_documented_carve_out` in [/src/metrics/loc.rs]" +"(https://github.com/dekobon/big-code-analysis/blob/main/src/metrics/loc.rs)." +msgstr "" +"ある言語がどちらに該当するかは上流の文法の挙動であって、このクレートが下す判" +"断ではありません。したがって文法のバージョン更新によって言語が別側へ移ること" +"があります。言語ごとの値は [/src/metrics/loc.rs](https://github.com/dekobon/" +"big-code-analysis/blob/main/src/metrics/loc.rs) の " +"`whitespace_only_input_is_the_documented_carve_out` で固定されています。" + +#: src/developers/loc.md:80 msgid "Implementation" msgstr "実装" -#: src/developers/loc.md:62 +#: src/developers/loc.md:82 msgid "" "To implement the LoC related metrics described above you need to implement " "the `Loc` trait for the language you want to support." @@ -25360,7 +26216,7 @@ msgstr "" "上で説明した LoC 関連のメトリクスを実装するには、サポートしたい言語に対して " "`Loc` トレイトを実装する必要があります。" -#: src/developers/loc.md:65 +#: src/developers/loc.md:85 msgid "" "This requires implementing the `compute` function. See [/src/metrics/loc.rs]" "(https://github.com/dekobon/big-code-analysis/blob/main/src/metrics/loc.rs) " @@ -25370,6 +26226,20 @@ msgstr "" "src/metrics/loc.rs](https://github.com/dekobon/big-code-analysis/blob/main/" "src/metrics/loc.rs) を参照してください。" +#: src/developers/loc.md:90 +msgid "" +"Take care with the catch-all `_` arm that inserts a row into PLOC. If the " +"grammar surfaces its row terminator as a _token_ rather than as extra — as " +"the Tcl family does — that token's start row is the row it terminates, so " +"the catch-all credits comment-only and blank rows to PLOC. Give such tokens " +"an explicit no-op arm." +msgstr "" +"PLOC に行を挿入するキャッチオールの `_` アームには注意してください。Tcl ファ" +"ミリーのように、文法が行終端子を extra ではなく_トークン_として表出する場" +"合、そのトークンの開始行は終端する行そのものなので、キャッチオールはコメント" +"のみの行や空行を PLOC に計上してしまいます。そうしたトークンには明示的な no-" +"op アームを与えてください。" + #: src/developers/update-grammars.md:1 msgid "Update grammars" msgstr "文法の更新" @@ -25406,13 +26276,15 @@ msgid "" "In `big-code-analysis` we use both **third-party** and **internal** " "grammars. The first ones are published on `crates.io` and maintained by " "external developers, while the second ones have been thought and defined " -"inside the project to manage variant of some languages used in `Firefox`. We " -"are going to explain how to update both of them in the following sections." +"inside the project to manage variant of some languages used in `Firefox`. " +"We are going to explain how to update both of them in the following " +"sections." msgstr "" "`big-code-analysis` では、**サードパーティ**の文法と**内部**の文法の両方を使" -"用しています。前者は `crates.io` で公開され外部の開発者によって保守されている" -"もので、後者は `Firefox` で使用される一部言語の変種を扱うためにプロジェクト内" -"で考案・定義されたものです。以下のセクションで両方の更新方法を説明します。" +"用しています。前者は `crates.io` で公開され外部の開発者によって保守されてい" +"るもので、後者は `Firefox` で使用される一部言語の変種を扱うためにプロジェク" +"ト内で考案・定義されたものです。以下のセクションで両方の更新方法を説明しま" +"す。" #: src/developers/update-grammars.md:22 msgid "Third-party grammars" @@ -25442,16 +26314,17 @@ msgstr "ここで `x` は数字を表します。" #: src/developers/update-grammars.md:33 msgid "" -"Run `./recreate-grammars.sh` to recreate and refresh all grammars structures " -"and data" +"Run `./recreate-grammars.sh` to recreate and refresh all grammars " +"structures and data" msgstr "" -"`./recreate-grammars.sh` を実行して、すべての文法の構造とデータを再作成・更新" -"します" +"`./recreate-grammars.sh` を実行して、すべての文法の構造とデータを再作成・更" +"新します" #: src/developers/update-grammars.md:40 src/developers/update-grammars.md:115 msgid "" "Once the script above has finished its execution, you need to fix, if there " -"are any, all failed tests and problems introduced by changes in the grammars." +"are any, all failed tests and problems introduced by changes in the " +"grammars." msgstr "" "上記スクリプトの実行が完了したら、文法の変更によって発生した失敗テストや問題" "があれば、それらをすべて修正する必要があります。" @@ -25470,47 +26343,49 @@ msgid "" "internal grammar, then refresh its committed `package-lock.json` with `npm " "install --package-lock-only --ignore-scripts` in the same directory and " "commit both files together. The regen scripts install with `npm ci`, which " -"fails loudly when the lockfile is missing or out of sync with `package.json` " -"— this keeps every regen hash-verified and byte-reproducible (OpenSSF " +"fails loudly when the lockfile is missing or out of sync with `package." +"json` — this keeps every regen hash-verified and byte-reproducible (OpenSSF " "Scorecard Pinned-Dependencies)." msgstr "" -"内部文法の `package.json` ファイルにある `tree-sitter-cli` のバージョンを更新" -"し、同じディレクトリで `npm install --package-lock-only --ignore-scripts` を" -"実行してコミット済みの `package-lock.json` を更新し、両方のファイルを一緒にコ" -"ミットします。再生成スクリプトは `npm ci` でインストールを行うため、ロック" -"ファイルが存在しない場合や `package.json` と同期していない場合には明示的に失" -"敗します。これにより、すべての再生成がハッシュ検証済みかつバイト単位で再現可" -"能に保たれます(OpenSSF Scorecard の Pinned-Dependencies)。" +"内部文法の `package.json` ファイルにある `tree-sitter-cli` のバージョンを更" +"新し、同じディレクトリで `npm install --package-lock-only --ignore-scripts` " +"を実行してコミット済みの `package-lock.json` を更新し、両方のファイルを一緒" +"にコミットします。再生成スクリプトは `npm ci` でインストールを行うため、ロッ" +"クファイルが存在しない場合や `package.json` と同期していない場合には明示的に" +"失敗します。これにより、すべての再生成がハッシュ検証済みかつバイト単位で再現" +"可能に保たれます(OpenSSF Scorecard の Pinned-Dependencies)。" #: src/developers/update-grammars.md:56 msgid "" "The five vendored grammars publish under the `bca-tree-sitter-*` namespace " -"(see `RELEASING.md` for the rename rationale), but consumer call sites still " -"reference them as `tree-sitter-` via Cargo's `package = ...` alias. " -"**A grammar refresh does not bump the leaf's version on its own** — every " -"crate in this repository shares one workspace-wide version, and bumping the " -"leaves out of step with the parent is not allowed (see the \"Lockstep " -"version policy\" in `RELEASING.md`). Regenerate the parser tables, accept " -"the resulting test-snapshot drift, and ship the change under the current " -"version. The next workspace release picks up the new grammars at whatever " -"shared version the next tag declares." -msgstr "" -"5 つのベンダリングされた文法は `bca-tree-sitter-*` 名前空間で公開されます(改" -"名の理由は `RELEASING.md` を参照)。ただし、利用側の呼び出し箇所は Cargo の " -"`package = ...` エイリアスを介して引き続き `tree-sitter-` として参照し" -"ます。**文法の更新だけではリーフのバージョンは上がりません** — このリポジトリ" -"のすべてのクレートはワークスペース全体で 1 つのバージョンを共有しており、リー" -"フを親と食い違わせてバージョンを上げることは許可されていません(`RELEASING." -"md` の「Lockstep version policy」を参照)。パーサーテーブルを再生成し、生じた" -"テストスナップショットのドリフトを受け入れ、現在のバージョンのまま変更を出荷" -"してください。次のワークスペースリリースが、次のタグが宣言する共有バージョン" -"で新しい文法を取り込みます。" +"(see `RELEASING.md` for the rename rationale), but consumer call sites " +"still reference them as `tree-sitter-` via Cargo's `package = ...` " +"alias. **A grammar refresh does not bump the leaf's version on its own** — " +"every crate in this repository shares one workspace-wide version, and " +"bumping the leaves out of step with the parent is not allowed (see the " +"\"Lockstep version policy\" in `RELEASING.md`). Regenerate the parser " +"tables, accept the resulting test-snapshot drift, and ship the change under " +"the current version. The next workspace release picks up the new grammars " +"at whatever shared version the next tag declares." +msgstr "" +"5 つのベンダリングされた文法は `bca-tree-sitter-*` 名前空間で公開されます" +"(改名の理由は `RELEASING.md` を参照)。ただし、利用側の呼び出し箇所は " +"Cargo の `package = ...` エイリアスを介して引き続き `tree-sitter-` と" +"して参照します。**文法の更新だけではリーフのバージョンは上がりません** — こ" +"のリポジトリのすべてのクレートはワークスペース全体で 1 つのバージョンを共有" +"しており、リーフを親と食い違わせてバージョンを上げることは許可されていません" +"(`RELEASING.md` の「Lockstep version policy」を参照)。パーサーテーブルを再" +"生成し、生じたテストスナップショットのドリフトを受け入れ、現在のバージョンの" +"まま変更を出荷してください。次のワークスペースリリースが、次のタグが宣言する" +"共有バージョンで新しい文法を取り込みます。" #: src/developers/update-grammars.md:68 msgid "" "If a regeneration also needs an updated `tree-sitter` _runtime_ dependency, " "bump the dev-dependency line inside the leaf's `Cargo.toml`:" -msgstr "再生成に加えて `tree-sitter` の「ランタイム」依存関係の更新も必要な場合は、リーフの `Cargo.toml` 内の dev-dependency 行を更新します。" +msgstr "" +"再生成に加えて `tree-sitter` の「ランタイム」依存関係の更新も必要な場合は、" +"リーフの `Cargo.toml` 内の dev-dependency 行を更新します。" #: src/developers/update-grammars.md:72 msgid "" @@ -25577,8 +26452,8 @@ msgid "" "it means re-vendoring the generated `src/` from its upstream project rather " "than running `tree-sitter generate` locally." msgstr "" -"5 番目のベンダリング文法である `tree-sitter-tcl` には再生成スクリプトがありま" -"せん。事前生成されたパーサーソースのみをベンダリングしている(`grammar.js` が" -"ない)ため、更新する際はローカルで `tree-sitter generate` を実行するのではな" -"く、アップストリームプロジェクトから生成済みの `src/` を再ベンダリングしま" -"す。" +"5 番目のベンダリング文法である `tree-sitter-tcl` には再生成スクリプトがあり" +"ません。事前生成されたパーサーソースのみをベンダリングしている(`grammar." +"js` がない)ため、更新する際はローカルで `tree-sitter generate` を実行するの" +"ではなく、アップストリームプロジェクトから生成済みの `src/` を再ベンダリング" +"します。" diff --git a/big-code-analysis-book/src/recipes/agent-feedback.md b/big-code-analysis-book/src/recipes/agent-feedback.md index d6a2dba2..cfd7cdbb 100644 --- a/big-code-analysis-book/src/recipes/agent-feedback.md +++ b/big-code-analysis-book/src/recipes/agent-feedback.md @@ -127,13 +127,17 @@ case "$status" in exit 0 ;; esac -# Exit 2 makes Claude read stderr as context about the edit. +# Exit 2 makes Claude read stderr as context about the edit. Default +# CLAUDE_PROJECT_DIR and test the guidance file: under `set -u` an unset +# variable aborts the hook, and a missing file would emit a bare `cat` +# error where the guidance should be. +guidance="${CLAUDE_PROJECT_DIR:-$PWD}/.claude/hooks/bca-guidance.txt" cat >&2 < { @@ -301,6 +307,10 @@ down. machine. For these, do not contort the code: add a suppression marker with a one-line rationale and move on. A clear function with an honest `// bca: suppress(...)` is better than a "compliant" tangle. +- **Keep the fix where the violation is.** The flag is scoped to the + function you just edited. Fix it there, mention anything larger you + noticed, and do not widen the change into a module rewrite to bring + the number down. ``` ## Honest suppression (exact syntax) {#honest-suppression-exact-syntax} @@ -346,9 +356,16 @@ mid-refactor just produces transient violations that resolve themselves a few edits later — noise the agent then wastes a turn "fixing". Let the agent finish a coherent change, then gate once. +One instruction to leave out of the rules file: a standing "verify your +fix, then re-check the metrics" step layered on top of the hook. +Current models re-read and re-check their own edits without being asked, +and an explicit instruction compounds with that — the loop spends turns +re-running a gate whose input has not changed. The hook already fires on +its own when an edit lands. Let that be the signal. + ## Caveats -Two caveats the recipe depends on; ignore them and the loop does more +Three caveats the recipe depends on; ignore them and the loop does more harm than good. - **Goodhart's law / metric-gaming.** "Make this number smaller" is not @@ -366,3 +383,10 @@ harm than good. judgement call, not a defect. Set expectations accordingly — wire complexity feedback as advice the agent weighs, not a pass/fail it must drive to zero at any cost. +- **Complexity feedback invites scope creep.** "This function is hard to + follow" reads to an agent as an invitation to restructure, and the + restructuring does not reliably stop at the function the hook named — + a two-line fix becomes a module rewrite nobody asked to review. Bound + it in the rules file: the violation is scoped to the edit that + triggered it. Fix it where it was flagged, mention anything larger you + noticed, and do not widen the change to chase the number. diff --git a/docs/development/translations.md b/docs/development/translations.md index 83aa3857..83a1c398 100644 --- a/docs/development/translations.md +++ b/docs/development/translations.md @@ -23,12 +23,25 @@ marks every paragraph the English edit touched. ```console cargo install mdbook-i18n-helpers --version '=0.3.6' --locked +cargo install mdbook --version '=0.4.40' --locked ``` -The 0.3.x line pairs with the mdbook 0.4.x pinned in -`.github/workflows/pages.yml` (`MDBOOK_VERSION` / +Both pins are load-bearing, and installing only the first is the +common mistake. The 0.3.x helper line pairs with the mdbook 0.4.x +pinned in `.github/workflows/pages.yml` (`MDBOOK_VERSION` / `MDBOOK_I18N_HELPERS_VERSION`); mdbook-i18n-helpers 0.4.0+ targets -mdbook 0.5 and the two pins must move together. The preprocessor is +mdbook 0.5 and the two pins must move together. + +A mismatch fails in one of two ways, neither of which is a normal +build error. Helpers 0.3.x under mdbook 0.5.x aborts with +`missing field 'sections'` — loud, and `make book-pot` now refuses to +run rather than reaching it. The dangerous direction is helpers 0.4.x +under any mdbook: extraction succeeds but splits fenced code blocks +one entry per line instead of one entry per block, so the next +`msgmerge` marks every code-block entry fuzzy and shreds `ja.po` +against msgids that do not exist upstream. If a routine doc edit +suddenly reports dozens of fuzzy code-block entries, check the helper +version before touching the translations. The preprocessor is registered in `book.toml` with `optional = true`, so a plain `mdbook build` keeps working without it (English output only). GNU gettext (`msgmerge`, `msgfmt`, `msgattrib`) comes from the system