Skip to content

Commit 7d19c65

Browse files
committed
chore(ci): update cargo-shear in CI/local and fix shear warnings (#19302)
## Summary - pin `cargo-shear` to `1.9.1` in local setup (`just init`) - pin `cargo-shear` to `1.9.1` in CI workflows (`autofix`, `update_submodules`, `copilot-setup-steps`) - add `cargo-shear` ignore metadata for `schemars` in `crates/oxc_span` to avoid a known optional-dependency false-positive ## Validation - `cargo shear` - `cargo shear --fix` ## AI Usage Disclosure This PR was prepared with assistance from an AI coding tool (Codex). I have reviewed the generated changes and take full responsibility for this PR.
1 parent b7c3bf3 commit 7d19c65

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

.github/workflows/autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
restore-cache: true
2929
cache-key: warm
30-
tools: just,cargo-shear@1.9.0
30+
tools: just,cargo-shear@1.9.1
3131
components: rustfmt
3232

3333
- name: cargo-shear

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
cache-key: warm
3434
save-cache: false
35-
tools: just,cargo-insta,typos-cli,cargo-shear,ast-grep
35+
tools: just,cargo-insta,typos-cli,cargo-shear@1.9.1,ast-grep
3636
components: clippy rust-docs rustfmt rust-analyzer
3737

3838
- uses: oxc-project/setup-node@8958a8e040102244b619c4a94fccb657a44b1c21 # v1.0.6

.github/workflows/update_submodules.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- uses: oxc-project/setup-rust@c8224157c0bf235aabc633e8cd50d344f087a7de # v1.0.12
5353
with:
5454
cache-key: conformance
55-
tools: just,cargo-shear@1.3.0
55+
tools: just,cargo-shear@1.9.1
5656
components: rustfmt
5757

5858
- name: Get latest SHAs for all submodules

crates/oxc_span/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ serde = { workspace = true, optional = true }
3535
default = []
3636
serialize = ["compact_str/serde", "dep:serde", "oxc_estree/serialize", "oxc_str/serialize"]
3737
schemars = ["dep:schemars", "oxc_str/schemars"]
38+
39+
[package.metadata.cargo-shear]
40+
ignored = ["schemars"]

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ alias f := fix
1616
# Initialize the project by installing all necessary tools
1717
init:
1818
# Rust related init
19-
cargo binstall watchexec-cli cargo-insta typos-cli cargo-shear -y
19+
cargo binstall watchexec-cli cargo-insta typos-cli cargo-shear@1.9.1 -y
2020
# Node.js related init
2121
pnpm install
2222

0 commit comments

Comments
 (0)