Skip to content

Commit

Permalink
chore(minor)!: configure clippy arithmetic lints in cargo.toml (#300)
Browse files Browse the repository at this point in the history
* add workspace lints

* add comment
  • Loading branch information
eguajardo authored Mar 15, 2024
1 parent f0f58b9 commit 27e1abf
Show file tree
Hide file tree
Showing 22 changed files with 66 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.73.0
toolchain: 1.75.0
override: true

- name: Install protoc
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.73.0
toolchain: 1.75.0
target: wasm32-unknown-unknown
override: true

Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.73.0
toolchain: 1.75.0
override: true
components: rustfmt, clippy

Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings -A deprecated
args: -- -D warnings -A deprecated -D clippy::arithmetic_side_effects

- name: Check Diff
# fails if any changes not committed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.73.0
toolchain: 1.75.0
override: true

- name: Install protoc
Expand Down
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["ampd", "contracts/*", "integration-tests", "packages/*"]
resolver = "2"

[workspace.package]
rust-version = "1.73.0"
rust-version = "1.75.0" # be sure there is an optimizer release supporting this version before updating. See https://github.com/CosmWasm/optimizer

[workspace.dependencies]
connection-router = { version = "^0.1.0", path = "contracts/connection-router" }
Expand Down Expand Up @@ -36,6 +36,9 @@ schemars = "0.8.10"
sha3 = { version = "0.10.8", default-features = false, features = [] }
signature-verifier-api = { version = "^0.1.0", path = "packages/signature-verifier-api" }

[workspace.lints.clippy]
arithmetic_side_effects = "deny"

[profile.release]
opt-level = 3
debug = false
Expand Down
3 changes: 3 additions & 0 deletions ampd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,6 @@ random-string = "1.0.0"
[build-dependencies]
ethers = "2.0.8"
tonic-build = "0.8.3"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions contracts/aggregate-verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ voting-verifier = { workspace = true, features = ["library"] }
[dev-dependencies]
cw-multi-test = "0.15.1"
integration-tests = { workspace = true }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions contracts/connection-router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@ cw-multi-test = "0.15.1"
hex = { version = "0.4.3", default-features = false }
integration-tests = { workspace = true }
rand = "0.8.5"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions contracts/gateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ thiserror = { workspace = true }

[dev-dependencies]
cw-multi-test = "0.15.1"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions contracts/multisig-prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ cw-multi-test = "0.15.1"
elliptic-curve = "0.13.5"
ethers = "2.0.8"
generic-array = "0.14.7"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions contracts/multisig/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ thiserror = { workspace = true }

[dev-dependencies]
cw-multi-test = "0.15.1"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions contracts/nexus-gateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ report = { workspace = true }
schemars = "0.8.15"
serde = { version = "1.0.188", features = ["derive"] }
thiserror = { workspace = true }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions contracts/rewards/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ thiserror = { workspace = true }

[dev-dependencies]
cw-multi-test = "0.15.1"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions contracts/service-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ thiserror = { workspace = true }
[dev-dependencies]
cw-multi-test = "0.15.1"
integration-tests = { workspace = true }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions contracts/voting-verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ thiserror = { workspace = true }
[dev-dependencies]
cw-multi-test = "0.15.1"
integration-tests = { workspace = true }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ sha3 = { workspace = true }
thiserror = { workspace = true }
tofn = { git = "https://github.com/axelarnetwork/tofn.git", branch = "update-deps" }
voting-verifier = { workspace = true }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions packages/axelar-wasm-std-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ quote = "1.0.33"
report = { workspace = true }
syn = "2.0.29"
thiserror = { workspace = true }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions packages/axelar-wasm-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ valuable = { version = "0.1.0", features = ["derive"] }
cw-multi-test = "0.15.1"
hex = { version = "0.4.3", default-features = false }
rand = "0.8.5"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions packages/connection-router-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ valuable = "0.1.0"
[dev-dependencies]
hex = "0.4.3"
rand = "0.8.5"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions packages/events-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ quote = "1.0.33"
serde = "1.0.183"
serde_json = "1.0.105"
syn = "2.0.29"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions packages/events/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ serde_json = "1.0.105"
# The fix for the issue is at https://github.com/axelarnetwork/tendermint-rs/commit/e97033e20e660a7e707ea86db174ec047bbba50d.
tendermint = { git = "https://github.com/axelarnetwork/tendermint-rs.git", branch = "v0.33.x" }
thiserror = { workspace = true }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions packages/gateway-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ edition = "2021"
[dependencies]
connection-router-api ={ workspace = true }
cosmwasm-schema = { workspace = true }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions packages/report/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ eyre = "0.6.8"
itertools = { workspace = true }
thiserror = { workspace = true }
valuable = { version = "0.1.0", features = ["derive"] }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions packages/signature-verifier-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ cosmwasm-std = { workspace = true }
cosmwasm-storage = { workspace = true }
error-stack = { workspace = true }
thiserror = { workspace = true }

[lints]
workspace = true

0 comments on commit 27e1abf

Please sign in to comment.