mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 20:41:02 +00:00
move to cargo clippy instead of using the clippy plugin (#733)
* move to cargo clippy instead of using the clippy plugin fixes #729 * non-exectable scripts must be run with `sh` * don't build serde in the clippy travis job * only run clippy tests if installing clippy succeeds * why is travis so picky? * no more serde_codegen * serde_test_suite_deps has no features * don't use empty loops, llvm optimizes them to undefined behaviour * abort the clippy job when clippy lints are triggered * use caches on travis to speed up builds * why are we even using `travis-cargo`? * need to reinstall clippy frequently due to nightly updates * command line tools are hard
This commit is contained in:
committed by
David Tolnay
parent
74cf80989d
commit
368784949e
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
set -ev
|
||||
if [ "${CLIPPY}" = "true" ]; then
|
||||
if cargo install clippy -f; then
|
||||
(cd serde && cargo clippy --features unstable-testing -- -Dclippy)
|
||||
(cd serde_derive && cargo clippy --features unstable-testing -- -Dclippy)
|
||||
(cd test_suite && cargo clippy --features unstable-testing -- -Dclippy)
|
||||
(cd test_suite/deps && cargo clippy -- -Dclippy)
|
||||
(cd test_suite/no_std && cargo clippy -- -Dclippy)
|
||||
else
|
||||
echo "could not compile clippy, ignoring clippy tests"
|
||||
fi
|
||||
else
|
||||
(cd serde && travis-cargo build)
|
||||
(cd serde && travis-cargo --only beta test)
|
||||
(cd serde && travis-cargo --only nightly test -- --features unstable-testing)
|
||||
(cd serde && travis-cargo build -- --no-default-features)
|
||||
(cd serde && travis-cargo --only nightly build -- --no-default-features --features alloc)
|
||||
(cd serde && travis-cargo --only nightly build -- --no-default-features --features collections)
|
||||
(cd test_suite && travis-cargo --only beta test)
|
||||
(cd test_suite/deps && travis-cargo --only nightly build)
|
||||
(cd test_suite travis-cargo --only nightly test -- --features unstable-testing)
|
||||
(cd test_suite/no_std && travis-cargo --only nightly build)
|
||||
fi
|
||||
Reference in New Issue
Block a user