From f319845f9a2c35e0fecab057c8aed1ce52d0e980 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Thu, 15 Jan 2026 12:35:06 -0700 Subject: [PATCH] Autofix run fmt after clippy (#46935) Release Notes: - N/A --- .github/workflows/autofix_pr.yml | 12 ++++++------ tooling/xtask/src/tasks/workflows/autofix_pr.rs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/autofix_pr.yml b/.github/workflows/autofix_pr.yml index 5beecf062e2112e217b11a7ea3a0192987bec2f2..7ba17b8d57cd2adf294d4e565cf18b1ae06a1843 100644 --- a/.github/workflows/autofix_pr.yml +++ b/.github/workflows/autofix_pr.yml @@ -48,12 +48,6 @@ jobs: uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 with: version: '9' - - name: autofix_pr::run_autofix::run_prettier_fix - run: ./script/prettier --write - shell: bash -euxo pipefail {0} - - name: autofix_pr::run_autofix::run_cargo_fmt - run: cargo fmt --all - shell: bash -euxo pipefail {0} - name: autofix_pr::run_autofix::install_cargo_machete if: ${{ inputs.run_clippy }} uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386 @@ -72,6 +66,12 @@ jobs: if: ${{ inputs.run_clippy }} run: cargo clippy --workspace --release --all-targets --all-features --fix --allow-dirty --allow-staged shell: bash -euxo pipefail {0} + - name: autofix_pr::run_autofix::run_prettier_fix + run: ./script/prettier --write + shell: bash -euxo pipefail {0} + - name: autofix_pr::run_autofix::run_cargo_fmt + run: cargo fmt --all + shell: bash -euxo pipefail {0} - id: create-patch name: autofix_pr::run_autofix::create_patch run: | diff --git a/tooling/xtask/src/tasks/workflows/autofix_pr.rs b/tooling/xtask/src/tasks/workflows/autofix_pr.rs index 47017a9ab5b453cfe72154ef939ee082f5358d41..e1e93e45fc8094217485c5b99a0f9a79d0ae1f81 100644 --- a/tooling/xtask/src/tasks/workflows/autofix_pr.rs +++ b/tooling/xtask/src/tasks/workflows/autofix_pr.rs @@ -119,12 +119,12 @@ fn run_autofix(pr_number: &WorkflowInput, run_clippy: &WorkflowInput) -> NamedJo .add_step(steps::cache_rust_dependencies_namespace()) .map(steps::install_linux_dependencies) .add_step(steps::setup_pnpm()) - .add_step(run_prettier_fix()) - .add_step(run_cargo_fmt()) .add_step(install_cargo_machete().if_condition(Expression::new(run_clippy.to_string()))) .add_step(run_cargo_fix().if_condition(Expression::new(run_clippy.to_string()))) .add_step(run_cargo_machete_fix().if_condition(Expression::new(run_clippy.to_string()))) .add_step(run_clippy_fix().if_condition(Expression::new(run_clippy.to_string()))) + .add_step(run_prettier_fix()) + .add_step(run_cargo_fmt()) .add_step(create_patch()) .add_step(upload_patch_artifact()) .add_step(steps::cleanup_cargo_config(runners::Platform::Linux)),