Build Cadmus on Linux and macOS hosts using xtask. Use when asked how to compile, test, lint, or run the project locally.
日本語の概要は準備中です。原文の説明を表示しています。
Run clippy locally and report only issues in the current diff, matching the CI reviewdog flow. Use when asked how to lint changed code or get clippy feedback on a branch before pushing.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Running cargo clippy on the whole workspace produces hundreds of warnings
that may have nothing to do with your changes. The CI workflow solves this
with reviewdog — a tool that filters clippy output to only lines touched by
the PR diff.
You can run the same filter locally before pushing.
reviewdog on PATH (provided by the devenv shell)cargo xtask docs --mdbook-only)cargo xtask setup --host)cargo xtask clippy --features emulator --github-report --diff-branch master
This:
cargo clippy --message-format=short for the emulator feature setreviewdog with -filter-mode=addedmaster and prints only warnings on changed lines--features emulatorcadmus-core requires a device feature (emulator, kobo, or deviceless)
to compile — default is empty and --features default fails. For native
host linting use emulator (it matches what run-emulator builds). The full
feature matrix is large and slow; run it only in CI. Use cargo xtask ci matrix to see all available labels if you need a specific one.
If your changes span multiple feature sets (e.g. you added #[cfg(feature = "tracing")] code), run clippy for each relevant combination — every
combination must include a device feature:
cargo xtask clippy --features emulator --github-report --diff-branch master
cargo xtask clippy --features "emulator + profiling + test + tracing" --github-report --diff-branch master
[!NOTE] The
telemetryfeature is excluded from the xtask matrix because it aliasestracing + profilingwith no separatecfgbranches. Use the expanded form (emulator + profiling + test + tracing) instead.
The xtask wrapper constructs a reviewdog invocation equivalent to:
reviewdog \
-f=clippy \
-filter-mode=added \
-fail-on-error=false \
-reporter=local \
-diff="git diff --no-ext-diff master"
-filter-mode=added — only reports diagnostics on lines that appear in the
diff (new or modified lines)-reporter=local — prints to terminal instead of posting GitHub comments-diff=... — tells reviewdog which diff to filter against| Goal | Command |
|---|---|
| Check emulator-feature changes before pushing | cargo xtask clippy --features emulator --github-report --diff-branch master |
| Check telemetry-related changes | cargo xtask clippy --features "emulator + profiling + test + tracing" --github-report --diff-branch master |
| See raw (unfiltered) clippy output for one feature set | cargo xtask clippy --features emulator |
| Run the full matrix (slow — CI only) | cargo xtask clippy --github-report --diff-branch master (omits --features) |
When resolving Clippy warnings introduced by a change:
#[allow(...)] — fix the root cause.field_reassign_with_default: when converting
let mut s = S::default(); s.field = val; to a struct literal, keep
let mut if the variable is mutated again later in the same scope, and
ensure all subsequent mutations are preserved — do not drop them.After fixes, re-run the filtered clippy command above, then complete the
verification sequence in AGENTS.md (fmt → clippy →
tests with --features emulator → build-kobo).
direnv allow or devenv shell).brew install reviewdog) or by downloading the binary from
https://github.com/reviewdog/reviewdog/releases. If you are unsure how to
install it on your platform, ask the operator for help.Your branch may be old. Rebase or merge master first:
git fetch origin master
git rebase origin/master
You probably forgot --diff-branch. Without it, xtask falls back to the
github-pr-review reporter which tries to fetch the PR diff from GitHub and
will fail locally.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Build Cadmus on Linux and macOS hosts using xtask. Use when asked how to compile, test, lint, or run the project locally.
日本語の概要は準備中です。原文の説明を表示しています。
Build, test, and lint Cadmus from a jj sibling workspace that has no .git (non-colocated checkout). Use when jj workspace root is a sibling tmp/agent workspace and builds fail with git submodule or .gitmodules errors, empty thirdparty/ sources, cache-marker misses, or missing sqlite.
日本語の概要は準備中です。原文の説明を表示しています。
Cross-compile Cadmus for Kobo e-reader devices (ARM Linux). Use this when asked to build a Kobo release, cross-compile for ARM, or prepare a device binary.
日本語の概要は準備中です。原文の説明を表示しています。
Resolve failed Renovate or Dependabot dependency update PRs by fixing version constraints, API breaking changes, and verifying build/test/format compliance. Use when a dependency bump PR fails CI, Cargo cannot select versions, or a crate update requires code migration.
日本語の概要は準備中です。原文の説明を表示しています。
Build the full Cadmus documentation website (mdBook + cargo doc + Storybook + Next.js). Use this when asked to build, preview, or update the documentation site.
日本語の概要は準備中です。原文の説明を表示しています。
Fetch Cadmus application logs from Loki by run ID. Use when asked to look up logs for a specific run, debug a device session, or find log output for a given run ID.
日本語の概要は準備中です。原文の説明を表示しています。