Autofix run fmt after clippy (#46935)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2026-01-15 12:35:06 -07:00 committed by GitHub
parent 20163f1bc4
commit f319845f9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 8 deletions

View file

@ -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: |

View file

@ -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)),