| name | format |
| description | Run all formatting, linting and cleaning checks before committing code |
Run all formatting, linting, and cleaning tasks that should be done before committing code. Fix any issues found automatically where possible.
Steps
-
Rust formatting (requires nightly):
cargo +nightly fmt --all
-
TOML formatting:
taplo format --config .config/taplo.toml
-
Zepter checks (feature propagation):
zepter run --config .config/zepter.yaml
-
Clippy linting:
cargo clippy --all-targets --all-features --workspace -- -D warnings
-
License headers (SPDX):
hawkeye format --config licenserc.apache.toml
hawkeye format --config licenserc.gpl.toml
licenserc.apache.toml covers library/SDK crates (pallets, primitives, client SDKs, precompiles, examples, packages/*) — Apache-2.0
licenserc.gpl.toml covers runtime/node crates (parachain runtimes, provider node, UI apps) — GPL-3.0-only
Notes
- Run formatting commands (steps 1-4) first as they may auto-fix issues
- Clippy warnings should be treated as errors (
-D warnings)
- If
taplo, zepter, or hawkeye are not installed, inform the user how to install them:
cargo install taplo-cli
cargo install zepter
cargo install hawkeye
- If nightly fmt is not installed help user install with
rustup component add rustfmt --toolchain nightly
- Report all errors found and fix them where possible