# A helper workflow to automatically fixup any linting errors on a PR. Must be # triggered manually. name: Attempt to automatically fix linting errors on: workflow_dispatch: env: # We use nightly so that `fmt` correctly groups together imports, and # clippy correctly fixes up the benchmarks. # # Note: This should match the nightly rust version in `tests.yml`. RUST_VERSION: nightly-2025-03-27 jobs: fixup: name: Fix up runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Rust uses: dtolnay/rust-toolchain@02cb101ec7c40f2c49e1d9714d64511d8e1b74de # master with: toolchain: ${{ env.RUST_VERSION }} components: clippy, rustfmt - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 - name: Setup Poetry uses: matrix-org/setup-python-poetry@5bbf6603c5c930615ec8a29f1b5d7d258d905aa4 # v2.0.0 with: install-project: "false" poetry-version: "2.4.1" - name: Run ruff check continue-on-error: true run: poetry run ruff check --fix . - name: Run ruff format continue-on-error: true run: poetry run ruff format --quiet . - run: cargo clippy --all-features --fix -- -D warnings continue-on-error: true - run: cargo fmt continue-on-error: true - uses: stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7.2.0 with: commit_message: "Attempt to fix linting"