Skip to content

Commit f6edb87

Browse files
authored
Merge pull request #7548 from Turbo87/lints
Move lint rule configuration into `Cargo.toml` file
2 parents bd0346d + 517eb8e commit f6edb87

File tree

14 files changed

+34
-15
lines changed

14 files changed

+34
-15
lines changed

Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@ default-run = "server"
1111
[workspace]
1212
members = ["crates_io_*"]
1313

14+
[workspace.lints.rust]
15+
future_incompatible = "warn"
16+
nonstandard_style = "warn"
17+
rust_2018_idioms = "warn"
18+
rust_2018_compatibility = "warn"
19+
rust_2021_compatibility = "warn"
20+
unused = "warn"
21+
22+
[workspace.lints.clippy]
23+
all = "warn"
24+
25+
[lints]
26+
workspace = true
27+
1428
[profile.release]
1529
opt-level = 2
1630

crates_io_env_vars/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ version = "0.0.0"
44
license = "MIT OR Apache-2.0"
55
edition = "2021"
66

7+
[lints]
8+
workspace = true
9+
710
[dependencies]
811
anyhow = "=1.0.75"
912
dotenvy = "=0.15.7"

crates_io_index/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ repository = "https://github.com/rust-lang/crates.io"
66
description = "crates.io package index utilities"
77
edition = "2021"
88

9+
[lints]
10+
workspace = true
11+
912
[lib]
1013
path = "lib.rs"
1114

crates_io_markdown/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ repository = "https://github.com/rust-lang/crates.io"
66
description = "crates.io markdown renderer"
77
edition = "2021"
88

9+
[lints]
10+
workspace = true
11+
912
[lib]
1013
path = "lib.rs"
1114

crates_io_smoke_test/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ version = "0.0.0"
44
license = "MIT OR Apache-2.0"
55
edition = "2021"
66

7+
[lints]
8+
workspace = true
9+
710
[dependencies]
811
anyhow = "=1.0.75"
912
bytes = "=1.5.0"

crates_io_smoke_test/src/cargo.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use secrecy::{ExposeSecret, SecretString};
33
use std::path::Path;
44
use tokio::process::Command;
55

6+
#[allow(unstable_name_collisions)]
67
pub async fn new_lib(parent_path: &Path, name: &str) -> anyhow::Result<()> {
78
Command::new("cargo")
89
.args(["new", "--lib", name])
@@ -14,6 +15,7 @@ pub async fn new_lib(parent_path: &Path, name: &str) -> anyhow::Result<()> {
1415
.map_err(Into::into)
1516
}
1617

18+
#[allow(unstable_name_collisions)]
1719
pub async fn publish(project_path: &Path, token: &SecretString) -> anyhow::Result<()> {
1820
Command::new("cargo")
1921
.args(["publish", "--registry", "staging", "--allow-dirty"])

crates_io_smoke_test/src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(unstable_name_collisions)]
2-
31
mod api;
42
mod cargo;
53
mod exit_status_ext;

crates_io_tarball/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ version = "0.0.0"
44
license = "MIT OR Apache-2.0"
55
edition = "2021"
66

7+
[lints]
8+
workspace = true
9+
710
[features]
811
builder = []
912

crates_io_test_db/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ version = "0.0.0"
44
license = "MIT OR Apache-2.0"
55
edition = "2021"
66

7+
[lints]
8+
workspace = true
9+
710
[dependencies]
811
crates_io_env_vars = { path = "../crates_io_env_vars" }
912
diesel = { version = "=2.1.4", features = ["postgres", "r2d2"] }

src/bin/background-worker.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
//! Usage:
1111
//! cargo run --bin background-worker
1212
13-
#![warn(clippy::all, rust_2018_idioms)]
14-
1513
#[macro_use]
1614
extern crate tracing;
1715

0 commit comments

Comments
 (0)