Skip to content

Commit 5905ce1

Browse files
feat: add cargo-deny (#1929)
1 parent 8fe56ba commit 5905ce1

File tree

6 files changed

+77
-2
lines changed

6 files changed

+77
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ target/
44
.idea/
55
__pycache__/
66
.pytest_cache/
7+
.DS_STORE
78

89
# mkdocs
910
.cache

deny.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[licenses]
2+
allow = [
3+
"0BSD",
4+
"Apache-2.0 WITH LLVM-exception",
5+
"Apache-2.0",
6+
"BSD-2-Clause",
7+
"BSD-3-Clause",
8+
"BSL-1.0",
9+
"bzip2-1.0.6",
10+
"CC0-1.0",
11+
"CDLA-Permissive-2.0",
12+
"ISC",
13+
"MIT",
14+
"MPL-2.0",
15+
"Unicode-3.0",
16+
"Zlib",
17+
]
18+
confidence-threshold = 0.8
19+
private = { ignore = true }

lefthook.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ pre-commit:
2121
jobs:
2222
- name: actionlint
2323
run: pixi {run} actionlint
24+
- name: cargo-deny
25+
glob: "Cargo.lock,Cargo.toml"
26+
stage_fixed: true
27+
run: pixi {run} cargo-deny
2428
- name: cargo-fmt
2529
glob: "*.rs"
2630
stage_fixed: true

pixi.lock

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,18 @@ boto3 = "*"
4646

4747
[feature.lint.dependencies]
4848
actionlint = ">=1.7.4,<2"
49+
cargo-deny = ">=0.18.3,<0.19"
50+
dprint = ">=0.50.0,<0.51"
51+
lefthook = ">=1.12.2,<2"
4952
ruff = ">=0.4.8,<0.5"
5053
shellcheck = ">=0.10.0,<0.11"
5154
taplo = ">=0.9.1,<0.10"
5255
typos = ">=1.23.1,<2"
53-
lefthook = ">=1.12.2,<2"
54-
dprint = ">=0.50.0,<0.51"
5556

5657
[feature.lint.tasks]
5758
actionlint = { cmd = "actionlint", env = { SHELLCHECK_OPTS = "-e SC2086" } }
5859
cargo-clippy = "cargo clippy --all-targets --all-features --workspace -- -D warnings -Dclippy::dbg_macro"
60+
cargo-deny = "cargo deny --workspace check license --deny warnings"
5961
cargo-fmt = "cargo fmt"
6062
dprint-check = { cmd = "dprint check --log-level=silent", description = "Check formatting with dprint" }
6163
dprint-fmt = { cmd = "dprint fmt --incremental=false", description = "Format with dprint" }

rust-tests/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "rust-tests"
33
version = "0.1.0"
44
edition = "2024"
5+
license = "BSD-3-Clause"
56

67
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
78

0 commit comments

Comments
 (0)