Skip to content

Commit beae463

Browse files
d-e-s-odanielocfb
authored andcommitted
Add Clippy CI workflow
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]>
1 parent c72dcce commit beae463

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,23 @@ jobs:
183183
- name: Check that C header is up-to-date
184184
run: git diff --exit-code ||
185185
(echo "!!!! CHECKED IN C HEADER IS OUTDATED !!!!" && false)
186+
187+
clippy:
188+
name: Lint with clippy
189+
runs-on: ubuntu-latest
190+
steps:
191+
- name: Checkout repository
192+
uses: actions/checkout@v4
193+
with:
194+
submodules: recursive
195+
196+
- name: Install system dependencies
197+
run: |
198+
sudo apt-get update
199+
sudo apt-get install \
200+
build-essential \
201+
libelf-dev \
202+
zlib1g-dev
203+
204+
- uses: dtolnay/rust-toolchain@stable
205+
- run: cargo clippy --workspace --no-deps -- -A unknown_lints -D clippy::todo

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#![allow(non_camel_case_types)]
55
#![allow(non_snake_case)]
66

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

0 commit comments

Comments
 (0)