Skip to content

Commit

Permalink
lints: use [workspace.lints]
Browse files Browse the repository at this point in the history
Depends on a newly stabilized feature which will be in 1.75 and available on nightly today

rust-lang/cargo#12115 (comment)
  • Loading branch information
dignifiedquire committed Oct 26, 2023
1 parent da717bd commit 915daf4
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[build]
rustflags = ["-Wmissing_debug_implementations", "-Wclippy::unused-async"]
rustflags = []
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: dtolnay/rust-toolchain@stable
# Can be switched back once 1.75 lands
# https://github.com/rust-lang/cargo/issues/12115#issuecomment-1768170381
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy

Expand Down
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@ debug-assertions = false
opt-level = 3
panic = 'abort'
incremental = false


[workspace.lints.rust]
missing_debug_implementations = "warn"

[workspace.lints.clippy]
unused-async = "warn"
3 changes: 3 additions & 0 deletions iroh-bytes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ repository = "https://github.com/n0-computer/iroh"
# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.72"

[lints]
workspace = true

[dependencies]
anyhow = { version = "1", features = ["backtrace"] }
bao-tree = { version = "0.9.1", features = ["tokio_fsm"], default-features = false }
Expand Down
3 changes: 3 additions & 0 deletions iroh-gossip/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ repository = "https://github.com/n0-computer/iroh-sync"
# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.72"

[lints]
workspace = true

[dependencies]
# proto dependencies (required)
anyhow = { version = "1", features = ["backtrace"] }
Expand Down
3 changes: 3 additions & 0 deletions iroh-metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ repository = "https://github.com/n0-computer/iroh"
# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.72"

[lints]
workspace = true

[dependencies]
prometheus-client = { version = "0.21.0", optional = true }
once_cell = "1.17.0"
Expand Down
3 changes: 3 additions & 0 deletions iroh-net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ repository = "https://github.com/n0-computer/iroh"
# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.72"

[lints]
workspace = true

[dependencies]
aead = { version = "0.5.2", features = ["bytes"] }
anyhow = { version = "1", features = ["backtrace"] }
Expand Down
3 changes: 3 additions & 0 deletions iroh-sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ repository = "https://github.com/n0-computer/iroh"
# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.72"

[lints]
workspace = true

[dependencies]
anyhow = "1"
blake3 = { package = "iroh-blake3", version = "1.4.3"}
Expand Down
3 changes: 3 additions & 0 deletions iroh-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ publish = true
# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.72"

[lints]
workspace = true

[dependencies]
anyhow = "1"
tokio = { version = "1", features = ["full"] }
Expand Down
3 changes: 3 additions & 0 deletions iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ default-run = "iroh"
# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.72"

[lints]
workspace = true

[dependencies]
anyhow = { version = "1", features = ["backtrace"] }
bao-tree = { version = "0.9.1", features = ["tokio_fsm"], default-features = false }
Expand Down

0 comments on commit 915daf4

Please sign in to comment.