Skip to content

Commit ee0d4d4

Browse files
committed
Add dylint test
1 parent 704ce77 commit ee0d4d4

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
npm install -g prettier
3939
rustup install nightly
4040
rustup component add clippy --toolchain nightly
41+
cargo install cargo-dylint dylint-link || true
4142
4243
- name: Test
4344
run: cargo test

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@ toml = "0.8"
2121
pedantic = { level = "warn", priority = -1 }
2222
format-collect = "allow"
2323
struct-field-names = "allow"
24+
25+
[[workspace.metadata.dylint.libraries]]
26+
git = "https://github.com/trailofbits/dylint"
27+
pattern = [
28+
"examples/general",
29+
"examples/supplementary",
30+
"examples/restriction/inconsistent_qualification",
31+
]

tests/ci.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,12 @@ fn clippy() {
1313
.assert()
1414
.success();
1515
}
16+
17+
#[test]
18+
fn dylint() {
19+
Command::new("cargo")
20+
.args(["dylint", "--all", "--", "--all-targets"])
21+
.env("DYLINT_RUSTFLAGS", "--deny=warnings")
22+
.assert()
23+
.success();
24+
}

0 commit comments

Comments
 (0)