Skip to content

Commit 1e45745

Browse files
authored
Add cargo udeps to CI (#733)
* Add cargo udeps * Ignore useless deps used to recreate grammar automatically
1 parent 9b13698 commit 1e45745

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ repos:
2828
entry: cargo clippy --all-targets --all -- -D warnings
2929
pass_filenames: false
3030

31+
- id: udeps
32+
name: udeps
33+
language: system
34+
files: '\.rs$'
35+
entry: cargo +nightly udeps --all-targets
36+
pass_filenames: false
37+
3138
- id: test
3239
name: test
3340
language: system

.taskcluster.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ tasks:
4141
- "-cx"
4242
- "curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py &&
4343
rustup component add clippy rustfmt &&
44+
rustup toolchain install nightly &&
45+
curl -L https://github.com/est31/cargo-udeps/releases/download/v0.1.25/cargo-udeps-v0.1.25-x86_64-unknown-linux-gnu.tar.gz | tar xz -C /usr/local/cargo/bin --strip-components 2 &&
4446
git clone --quiet ${repository} &&
4547
cd rust-code-analysis &&
4648
git -c advice.detachedHead=false checkout ${head_rev} &&

tree-sitter-mozcpp/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ cc = "^1.0"
2828
# This dependency is not used at all for this crate, but it is here so that
2929
# dependabot can send notifications when there are updates for this grammar
3030
tree-sitter-cpp = "0.19.0"
31+
32+
[package.metadata.cargo-udeps.ignore]
33+
build = ["tree-sitter-cpp"]

tree-sitter-mozjs/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ cc = "^1.0"
2828
# This dependency is not used at all for this crate, but it is here so that
2929
# dependabot can send notifications when there are updates for this grammar
3030
tree-sitter-javascript = "0.19.0"
31+
32+
[package.metadata.cargo-udeps.ignore]
33+
build = ["tree-sitter-javascript"]

0 commit comments

Comments
 (0)