use clippy on CI

This commit is contained in:
gnzlbg 2018-11-03 17:01:27 +01:00 committed by gnzlbg
parent b2da4a8e60
commit 0b7c2fdbb4
2 changed files with 11 additions and 0 deletions

View File

@ -108,6 +108,13 @@ matrix:
rust: nightly
before_script: rustup component add rustfmt-preview
script: cargo fmt --all -- --check
- name: "clippy"
install: true
rust: nightly
before_script: rustup component add clippy-preview
script:
- cargo clippy -p jemalloc-sys -- -D clippy::pedantic
- cargo clippy -p jemallocator -- -D clippy::pedantic
- name: "Shellcheck"
install: true
script: shellcheck ci/*.sh

View File

@ -41,6 +41,10 @@
//! [jemalloc_mallctl]: http://jemalloc.net/jemalloc.3.html#mallctl_namespace
#![no_std]
#![allow(non_snake_case, non_camel_case_types)]
#![cfg_attr(
feature = "cargo-clippy",
allow(clippy::cast_possible_truncation, clippy::cast_possible_wrap)
)]
extern crate libc;