Run build, lint, or test for the Pocket Ratings backend (Rust). Use when the user asks to build, lint, or test the backend. For task completion or full verification use backend-quality-control.
Use this skill when the user asks to build, lint, or test the backend (individual or combined). Run commands from the repo root with cd backend or set working-directory: backend in CI.
For task completion or full verification (format, lint, test, and coverage): use the backend-quality-control skill. Do not use this skill as the completion gate; it does not include format or coverage.
When adding or changing backend code, follow existing patterns so build and lint stay clean and the codebase stays consistent.
backend/src/cli/): Use full-word module names (e.g. database, not db_cmd). No _cmd or two-letter shorthand. Add a module alias in mod.rs: use crate::cli::<module> as <module>_cli.*Args, *Cmd, and *Opts in cli/mod.rs with the other entity types — not in the handler module. Use full words for both the variant and the CLI subcommand (e.g. so the command is ).Database(DatabaseArgs)databasecli::run: Use the type name directly (e.g. DatabaseCmd::Backup) and call the handler via the alias (e.g. database_cli::backup(...)). Do not use inline modulename::TypeName in the match.db crate (backend/src/db/). CLI handlers call db::* functions; they do not use sqlx::query (or similar) directly.output: Option<&str>) into handler functions, not whole opts structs, matching how other entity handlers are called from mod.rs.//! Database subcommands (backup).). In doc comments, put identifiers and env names in backticks (e.g. `DB_PATH`) for doc_markdown compliance.If cargo fails with "rustup could not choose a version" or "no default is configured": run rustup default stable (with network permission) first, then retry. Do not treat it as a code bug.
cd backend
cargo build --release
Strict pedantic mode; all warnings are errors. Run Clippy on all targets (lib, bin, tests, examples):
cd backend
cargo clippy --all-targets --release -- -W clippy::pedantic -W clippy::nursery -W clippy::cargo -D warnings
Skip the long-running server_start_and_stop_via_cli test (starts/stops the server; can exceed timeouts):
cd backend
cargo test --release -- --skip server_start_and_stop_via_cli
This runs build, lint, and test only. It does not include format or coverage. For the full gate (format, Clippy, test, coverage) use backend-quality-control.
cd backend
cargo build --release && \
cargo clippy --all-targets --release -- -W clippy::pedantic -W clippy::nursery -W clippy::cargo -D warnings && \
cargo test --release -- --skip server_start_and_stop_via_cli