Skip to content

Commit f896a8e

Browse files
committed
Add -D warnings to RUSTFLAGS on CI
By denying warnings explicitly on CI, we don't need to deny warnings in library or binary. `#![warn(clippy::all)]` is used to automatically enable clippy in RLS enabled IDEs. `rust_2018_idioms` is now applied consistently.
1 parent 4a1542c commit f896a8e

13 files changed

+15
-22
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
- PERCY_PROJECT=crates-io/crates.io
2222
- PGPORT=5433
2323
- PATH=$HOME/.cargo/bin:$PATH
24-
- RUSTFLAGS="-C debuginfo=0"
24+
- RUSTFLAGS="-C debuginfo=0 -D warnings"
2525

2626
install:
2727
- sudo cp /etc/postgresql/10/main/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf

src/bin/background-worker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//! Usage:
1111
//! cargo run --bin background-worker
1212
13-
#![deny(warnings, clippy::all, rust_2018_idioms)]
13+
#![warn(clippy::all, rust_2018_idioms)]
1414

1515
use cargo_registry::git::{Repository, RepositoryConfig};
1616
use cargo_registry::{background_jobs::*, db};

src/bin/delete-crate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Usage:
66
// cargo run --bin delete-crate crate-name
77

8-
#![deny(warnings, clippy::all, rust_2018_idioms)]
8+
#![warn(clippy::all, rust_2018_idioms)]
99

1010
use cargo_registry::{db, models::Crate, schema::crates};
1111
use std::{

src/bin/delete-version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Usage:
66
// cargo run --bin delete-version crate-name version-number
77

8-
#![deny(warnings, clippy::all, rust_2018_idioms)]
8+
#![warn(clippy::all, rust_2018_idioms)]
99

1010
use cargo_registry::{
1111
db,

src/bin/monitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! Usage:
55
//! cargo run --bin monitor
66
7-
#![deny(warnings, clippy::all, rust_2018_idioms)]
7+
#![warn(clippy::all, rust_2018_idioms)]
88

99
mod on_call;
1010

src/bin/populate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Usage:
55
// cargo run --bin populate version_id1 version_id2 ...
66

7-
#![deny(warnings, clippy::all, rust_2018_idioms)]
7+
#![warn(clippy::all, rust_2018_idioms)]
88

99
use cargo_registry::{db, schema::version_downloads};
1010
use std::env;

src/bin/render-readmes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
// Warning: this can take a lot of time.
55

6-
#![deny(warnings, clippy::all, rust_2018_idioms)]
6+
#![warn(clippy::all, rust_2018_idioms)]
77

88
#[macro_use]
99
extern crate serde;

src/bin/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![deny(warnings, clippy::all, rust_2018_idioms)]
1+
#![warn(clippy::all, rust_2018_idioms)]
22

33
use cargo_registry::{boot, App, Env};
44
use std::{

src/bin/test-pagerduty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//!
66
//! Event type can be trigger, acknowledge, or resolve
77
8-
#![deny(warnings, clippy::all, rust_2018_idioms)]
8+
#![warn(clippy::all, rust_2018_idioms)]
99

1010
mod on_call;
1111

src/bin/transfer-crates.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Usage:
44
// cargo run --bin transfer-crates from-user to-user
55

6-
#![deny(warnings, clippy::all, rust_2018_idioms)]
6+
#![warn(clippy::all, rust_2018_idioms)]
77

88
use cargo_registry::{
99
db,

src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
//! All implemented routes are defined in the [middleware](fn.middleware.html) function and
44
//! implemented in the [category](category/index.html), [keyword](keyword/index.html),
55
//! [krate](krate/index.html), [user](user/index.html) and [version](version/index.html) modules.
6-
#![deny(warnings, clippy::all, rust_2018_idioms)]
7-
#![deny(missing_debug_implementations, missing_copy_implementations)]
8-
#![deny(bare_trait_objects)]
9-
#![recursion_limit = "256"]
6+
7+
#![warn(clippy::all, rust_2018_idioms)]
8+
#![warn(missing_debug_implementations, missing_copy_implementations)]
109

1110
#[macro_use]
1211
extern crate derive_deref;

src/s3/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![deny(warnings, clippy::all, rust_2018_idioms)]
1+
#![warn(clippy::all, rust_2018_idioms)]
22

33
extern crate base64;
44
extern crate chrono;

src/tests/all.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
#![deny(warnings, clippy::all, rust_2018_idioms)]
2-
// TODO: Remove after we can bump to Rust 1.35 stable in `RustConfig`
3-
#![allow(
4-
renamed_and_removed_lints,
5-
clippy::cyclomatic_complexity,
6-
clippy::unknown_clippy_lints
7-
)]
1+
#![warn(clippy::all, rust_2018_idioms)]
82

93
#[macro_use]
104
extern crate diesel;

0 commit comments

Comments
 (0)