Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Autofix run fmt after clippy (#46935)

Conrad Irwinf319845f9a2c
diff --git a/.github/workflows/autofix_pr.yml b/.github/workflows/autofix_pr.yml
index 5beecf062e2..7ba17b8d57c 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 47017a9ab5b..e1e93e45fc8 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)),