Skip to content

Commit

Permalink
Add Clippy CI workflow
Browse files Browse the repository at this point in the history
Add a CI workflow running Clippy on the crate to weed out a chunk of
trivial to catch issues.

Signed-off-by: Daniel Müller <[email protected]>
  • Loading branch information
d-e-s-o authored and danielocfb committed Oct 10, 2024
1 parent c72dcce commit beae463
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,23 @@ jobs:
- name: Check that C header is up-to-date
run: git diff --exit-code ||
(echo "!!!! CHECKED IN C HEADER IS OUTDATED !!!!" && false)

clippy:
name: Lint with clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install \
build-essential \
libelf-dev \
zlib1g-dev
- uses: dtolnay/rust-toolchain@stable
- run: cargo clippy --workspace --no-deps -- -A unknown_lints -D clippy::todo
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]

#[allow(clippy::all)]
mod bindings {
#[cfg(all(feature = "bindgen", not(feature = "bindgen-source")))]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
Expand Down

0 comments on commit beae463

Please sign in to comment.