Scripts
This directory contains Nushell scripts for development workflows and policy enforcement.
Requirements
- Nushell (v0.80+)
- Rust toolchain with
rustfmtandclippycomponents
Available Scripts
CI Checks
-
check-fmt.nu: Verify Rust code formattingnu scripts/check-fmt.nu -
check-clippy.nu: Run Clippy lints with warnings as errorsnu scripts/check-clippy.nu -
run-tests.nu: Execute the full test suitenu scripts/run-tests.nu -
ci-local.nu: Run all CI checks locally before pushingnu scripts/ci-local.nu
Usage
Before Committing
Run the full CI suite locally:
nu scripts/ci-local.nuThis runs the same checks that GitHub Actions will run on your PR.
Individual Checks
Run individual checks for faster feedback:
# Just format check
nu scripts/check-fmt.nu
# Just Clippy
nu scripts/check-clippy.nu
# Just tests
nu scripts/run-tests.nuPolicy Adoption
These scripts enforce the project’s code quality policies:
- Formatting: All code must be formatted with
cargo fmt - Linting: All code must pass
cargo clippywith no warnings - Testing: All tests must pass before merging
The same checks run in CI (.github/workflows/ci.yml), so running them locally helps catch issues early.
Adding New Scripts
When adding new scripts:
- Use Nushell for consistency
- Add executable permissions:
chmod +x scripts/your-script.nu - Include usage documentation in script comments
- Update this README with script description
- Consider adding to
ci-local.nuif it’s a CI check