ci-requirements: record how to format the Rust lane without a local toolchain
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SreJkbxB4gx8pPsu8QbLPi
This commit is contained in:
@@ -131,3 +131,23 @@ backend/frontend push.
|
||||
a TLS-backend change as a change to *this lane*, not just a dependency bump.
|
||||
- No Postgres lane (unchanged): the desktop app's local store + sync behavior is
|
||||
verified on the operator's machine, not in CI.
|
||||
|
||||
## Formatting the Rust lane before pushing
|
||||
|
||||
`cargo fmt --check` runs in CI and had failed on four consecutive desktop pushes
|
||||
by itself, each costing a full cycle to learn a whitespace nit. There is no Rust
|
||||
toolchain on the workstation (rule 10), but the CI image is pullable, and running
|
||||
a formatter is neither a test run nor a local stack:
|
||||
|
||||
```
|
||||
docker run --rm --user "$(id -u):$(id -g)" -e CARGO_HOME=/tmp/cargo \
|
||||
-v "$PWD/desktop/src-tauri:/w" -w /w \
|
||||
git.fabledsword.com/bvandeusen/ci-tauri:1.97 cargo fmt --check
|
||||
```
|
||||
|
||||
Drop `--check` to apply. `--user` keeps the container from leaving root-owned
|
||||
files behind; `CARGO_HOME` points somewhere writable for that user.
|
||||
|
||||
**Don't infer formatting from existing code.** Several lines in `local/store.rs`
|
||||
exceed 100 characters and survive only because rustfmt cannot break a string
|
||||
literal — copying that shape caused one of the four failures.
|
||||
|
||||
Reference in New Issue
Block a user