Skip to content

Commit 652ef98

Browse files
cpuchifflier
authored andcommitted
ci: add cargo-check-external-types
1 parent 39af1f1 commit 652ef98

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/rust.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,17 @@ jobs:
8080
uses: actions/checkout@v4
8181
- name: Check semver
8282
uses: obi1kenobi/cargo-semver-checks-action@v2
83+
84+
check-external-types:
85+
name: Validate external types appearing in public API
86+
runs-on: ubuntu-latest
87+
steps:
88+
- name: Checkout sources
89+
uses: actions/checkout@v4
90+
- name: Install rust toolchain
91+
uses: dtolnay/rust-toolchain@master
92+
with:
93+
toolchain: nightly-2024-02-07
94+
# ^ sync with https://github.com/awslabs/cargo-check-external-types/blob/main/rust-toolchain.toml
95+
- run: cargo install cargo-check-external-types
96+
- run: cargo check-external-types

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ rusticata-macros = "4.0"
2121
cookie-factory = { version = "0.3", optional = true }
2222
num-bigint = { version = "0.4", optional = true }
2323
num-traits = { version = "0.2", optional = true }
24+
25+
[package.metadata.cargo_check_external_types]
26+
allowed_external_types = [
27+
"nom",
28+
"nom::*",
29+
]

0 commit comments

Comments
 (0)