Skip to content

Commit

Permalink
ci: add cargo-check-external-types
Browse files Browse the repository at this point in the history
  • Loading branch information
cpu authored and chifflier committed Apr 19, 2024
1 parent 39af1f1 commit 652ef98
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,17 @@ jobs:
uses: actions/checkout@v4
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2

check-external-types:
name: Validate external types appearing in public API
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-02-07
# ^ sync with https://github.com/awslabs/cargo-check-external-types/blob/main/rust-toolchain.toml
- run: cargo install cargo-check-external-types
- run: cargo check-external-types
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ rusticata-macros = "4.0"
cookie-factory = { version = "0.3", optional = true }
num-bigint = { version = "0.4", optional = true }
num-traits = { version = "0.2", optional = true }

[package.metadata.cargo_check_external_types]
allowed_external_types = [
"nom",
"nom::*",
]

0 comments on commit 652ef98

Please sign in to comment.