Skip to content

Commit

Permalink
Add support for cargo clippy tests
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Jun 16, 2021
1 parent 7e15acf commit 3d015b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build-aux/rust.mk
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,8 @@ cargo-clean:
find "${abs_builddir}/" -type l -delete; \
find "${abs_builddir}/" -type d -empty -delete; \
fi

cargo-check:
$(CARGO) clippy --verbose --all-targets --all-features -- -D warnings

check-local: cargo-check
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ if test "x$enable_rust_bindings" = "xyes"; then
AC_MSG_ERROR(["bindgen command not found"])
fi

AC_PATH_PROG([CLIPPY], [clippy-driver], [no])
if test "x$CLIPPY" = xno; then
AC_MSG_ERROR(["clippy-driver command not found"])
fi

AC_PATH_PROG([RUSTFMT], [rustfmt], [no])
if test "x$RUSTFMT" = xno; then
AC_MSG_WARN(["rustfmt command not found (optional)"])
Expand Down

0 comments on commit 3d015b2

Please sign in to comment.