mirror of
https://github.com/diesel-rs/diesel.git
synced 2024-10-04 09:39:24 +03:00
Don't deny warning when developing, only on CI
This changes the lint settings to only emit warnings by default. This means that during development, you'll get to see warnings, but rustc will continue on with compiling diesel. When explicitly checking the code for code style (on CI in the clippy build step, or when using `bin/check`), we supply `--deny warnings` as a flag to `rustc` to error out on warnings. This does not change anything when using diesel as a dependency, as cargo automatically sets all lints to allow in that case.
This commit is contained in:
parent
beec142e67
commit
ffe3221571
@ -43,10 +43,10 @@ matrix:
|
||||
- rust: nightly-2017-06-06
|
||||
env: CLIPPY_AND_COMPILE_TESTS=YESPLEASE
|
||||
script:
|
||||
- (cd diesel && cargo rustc --no-default-features --features "lint unstable sqlite postgres mysql extras" -- -Zno-trans)
|
||||
- (cd diesel_cli && cargo rustc --no-default-features --features "lint sqlite postgres mysql" -- -Zno-trans)
|
||||
- (cd diesel_codegen && cargo rustc --no-default-features --features "lint dotenv sqlite postgres mysql" -- -Zno-trans)
|
||||
- (cd diesel_infer_schema && cargo rustc --no-default-features --features "lint dotenv sqlite postgres mysql" -- -Zno-trans)
|
||||
- (cd diesel && cargo rustc --no-default-features --features "lint unstable sqlite postgres mysql extras" -- -Zno-trans --deny warnings)
|
||||
- (cd diesel_cli && cargo rustc --no-default-features --features "lint sqlite postgres mysql" -- -Zno-trans --deny warnings)
|
||||
- (cd diesel_codegen && cargo rustc --no-default-features --features "lint dotenv sqlite postgres mysql" -- -Zno-trans --deny warnings)
|
||||
- (cd diesel_infer_schema && cargo rustc --no-default-features --features "lint dotenv sqlite postgres mysql" -- -Zno-trans --deny warnings)
|
||||
- (cd diesel_compile_tests && travis-cargo test)
|
||||
env:
|
||||
# TODO: why is there no database specified for Postgres?
|
||||
|
@ -4,7 +4,7 @@ set -e
|
||||
BACKENDS="sqlite postgres mysql"
|
||||
|
||||
check() {
|
||||
cargo rustc --quiet --features "lint $BACKENDS $1" -- -Zno-trans
|
||||
cargo rustc --quiet --features "lint $BACKENDS $1" -- -Zno-trans --deny warnings
|
||||
}
|
||||
|
||||
(cd diesel &&
|
||||
|
@ -4,7 +4,7 @@
|
||||
#![cfg_attr(feature = "unstable", feature(specialization))]
|
||||
|
||||
// Built-in Lints
|
||||
#![deny(warnings, missing_debug_implementations, missing_copy_implementations)]
|
||||
#![warn(missing_debug_implementations, missing_copy_implementations)]
|
||||
|
||||
// Clippy lints
|
||||
#![cfg_attr(feature = "clippy", allow(unstable_features))]
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Built-in Lints
|
||||
#![deny(warnings, missing_copy_implementations)]
|
||||
#![warn(missing_copy_implementations)]
|
||||
|
||||
// Clippy lints
|
||||
#![cfg_attr(feature = "clippy", allow(unstable_features))]
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Built-in Lints
|
||||
#![deny(warnings, missing_copy_implementations)]
|
||||
#![warn(missing_copy_implementations)]
|
||||
|
||||
// Clippy lints
|
||||
#![cfg_attr(feature = "clippy", allow(needless_pass_by_value))]
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Built-in Lints
|
||||
#![deny(warnings, missing_debug_implementations, missing_copy_implementations)]
|
||||
#![warn(missing_debug_implementations, missing_copy_implementations)]
|
||||
|
||||
// Clippy lints
|
||||
#![cfg_attr(feature = "clippy", allow(unstable_features))]
|
||||
|
Loading…
Reference in New Issue
Block a user