Skip to content

Commit

Permalink
Use clippy_wrappers for span_lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jgcrosta committed Nov 6, 2024
1 parent 7d20545 commit eddfc00
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 59 deletions.
5 changes: 2 additions & 3 deletions detectors/token-interface-inference/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ version = "0.1.0"
crate-type = ["cdylib"]

[dependencies]
clippy_utils = { workspace = true }
clippy_wrappers = { workspace = true }
dylint_linting = { workspace = true }
if_chain = { workspace = true }
utils = { workspace = true }
edit-distance = "=2.1.2"
if_chain = { workspace = true }

[package.metadata.rust-analyzer]
rustc_private = true
2 changes: 1 addition & 1 deletion detectors/token-interface-inference/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extern crate rustc_errors;
extern crate rustc_hir;
extern crate rustc_span;

use clippy_utils::diagnostics::span_lint;
use clippy_wrappers::span_lint;
use edit_distance::edit_distance;
use if_chain::if_chain;
use rustc_errors::MultiSpan;
Expand Down
2 changes: 1 addition & 1 deletion test-cases/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
exclude = [".cargo", "soroban-version", "target"]
members = ["*/*/vulnerable-example", "*/*/remediated-example"]
members = ["*/*/remediated-example", "*/*/vulnerable-example"]
resolver = "2"

[workspace.package]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "storage-change-events-remediated-1"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand All @@ -10,9 +10,5 @@ crate-type = ["cdylib"]
soroban-sdk = { workspace = true }
soroban-token-sdk = { workspace = true }

[dev_dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }
soroban-token-sdk = { workspace = true }

[features]
testutils = ["soroban-sdk/testutils"]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "storage-change-events-vulnerable-1"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand All @@ -10,9 +10,5 @@ crate-type = ["cdylib"]
soroban-sdk = { workspace = true }
soroban-token-sdk = { workspace = true }

[dev_dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }
soroban-token-sdk = { workspace = true }

[features]
testutils = ["soroban-sdk/testutils"]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "token-interface-events-remediated-1"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand All @@ -10,26 +10,5 @@ crate-type = ["cdylib"]
soroban-sdk = { workspace = true }
soroban-token-sdk = { workspace = true }


[dev_dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }
soroban-token-sdk = { workspace = true }


[features]
testutils = ["soroban-sdk/testutils"]

[profile.release]
opt-level = "z"
overflow-checks = true
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true

[profile.release-with-logs]
inherits = "release"
debug-assertions = true

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "token-interface-events-vulnerable-1"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand All @@ -10,26 +10,5 @@ crate-type = ["cdylib"]
soroban-sdk = { workspace = true }
soroban-token-sdk = { workspace = true }


[dev_dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }
soroban-token-sdk = { workspace = true }


[features]
testutils = ["soroban-sdk/testutils"]

[profile.release]
opt-level = "z"
overflow-checks = true
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true

[profile.release-with-logs]
inherits = "release"
debug-assertions = true

0 comments on commit eddfc00

Please sign in to comment.