بنقرة واحدة
testing
Run tests, linting, and formatting checks for cargo-version-info
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Run tests, linting, and formatting checks for cargo-version-info
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Bump version in Cargo.toml using cargo-version-info bump command
Create commits following Angular Conventional Commits format with proper scope naming for consistent changelog generation
Prepare a release including version bump, testing, and PR creation
| name | testing |
| description | Run tests, linting, and formatting checks for cargo-version-info |
Use this skill when running tests, checking code quality, or verifying the codebase compiles and passes all checks.
Tests must run single-threaded due to shared state:
# Run all tests
cargo test -- --test-threads=1
# Run a specific test
cargo test test_name -- --test-threads=1
# Run tests with output
cargo test -- --test-threads=1 --nocapture
Formatting requires the nightly toolchain:
# Check formatting (CI mode)
cargo +nightly fmt --all -- --check
# Apply formatting fixes
cargo +nightly fmt --all
Clippy also requires nightly with strict settings:
cargo +nightly clippy --all-targets --all-features -- -D warnings -W missing-docs
This enforces:
-D warnings)-W missing-docs)Run all checks in sequence:
cargo +nightly fmt --all -- --check && \
cargo +nightly clippy --all-targets --all-features -- -D warnings -W missing-docs && \
cargo test -- --test-threads=1
# Debug build
cargo build
# Release build
cargo build --release
# Check only (faster, no codegen)
cargo check
Git hooks in .githooks/ run automatically on commit via Rhusky:
If hooks aren't active, run cargo build to trigger Rhusky
installation. Hooks are skipped in CI environments.
rustup install nightly
Always use --test-threads=1. Tests share git repository state and
will fail with race conditions otherwise.
All public items need documentation. Add doc comments:
/// Brief description of the function.
pub fn my_function() {}