Skip to content

Commit

Permalink
Use more workspace dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Dec 23, 2024
1 parent 7216b6d commit b169e1f
Show file tree
Hide file tree
Showing 28 changed files with 196 additions and 128 deletions.
42 changes: 42 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,48 @@ members = [
]
resolver = "2"

[workspace.dependencies]
ansi_term = "0.12"
anyhow = "1.0"
assert_cmd = "2.0"
bitflags = "2.6"
cargo = "0.81"
cargo-platform = "0.1"
cargo-util = "0.2"
cargo-util-schemas = "0.7"
cargo_metadata = "0.19"
clap = "4.5"
compiletest_rs = "0.11"
ctor = "0.2"
dirs = "5.0"
dunce = "1.0"
env_logger = "0.11"
fs_extra = "1.3"
git2 = "0.18"
glob = "0.3"
heck = "0.5"
hex = "0.4"
home = "0.5"
if_chain = "1.0"
is-terminal = "0.4"
log = "0.4"
once_cell = "1.20"
predicates = "3.1"
regex = "1.11"
rewriter = "0.1"
rust-embed = "8.5"
semver = "1.0"
serde = "1.0"
serde-untagged = "0.1"
serde_json = "1.0"
similar-asserts = "1.6"
tempfile = "3.14"
thiserror = "2.0"
toml = "0.8"
toml_edit = "0.22"
url = "2.5"
walkdir = "2.5"

[workspace.lints.rust.unexpected_cfgs]
level = "deny"
check-cfg = [
Expand Down
34 changes: 17 additions & 17 deletions cargo-dylint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@ name = "ci"
required-features = ["__ci"]

[dependencies]
anyhow = { version = "1.0", features = ["backtrace"] }
clap = { version = "4.5", features = ["cargo", "derive", "wrap_help"] }
env_logger = "0.11"
anyhow = { workspace = true, features = ["backtrace"] }
clap = { workspace = true, features = ["cargo", "derive", "wrap_help"] }
env_logger = { workspace = true }

dylint = { version = "=3.3.0", path = "../dylint", features = [
"package_options",
] }
dylint_internal = { version = "=3.3.0", path = "../internal" }

[dev-dependencies]
assert_cmd = "2.0"
cargo_metadata = "0.19"
ctor = "0.2"
glob = "0.3"
home = "0.5"
log = "0.4"
once_cell = "1.20"
predicates = "3.1"
regex = "1.11"
semver = "1.0"
serde_json = "1.0"
similar-asserts = "1.6"
tempfile = "3.14"
walkdir = "2.5"
assert_cmd = { workspace = true }
cargo_metadata = { workspace = true }
ctor = { workspace = true }
glob = { workspace = true }
home = { workspace = true }
log = { workspace = true }
once_cell = { workspace = true }
predicates = { workspace = true }
regex = { workspace = true }
semver = { workspace = true }
serde_json = { workspace = true }
similar-asserts = { workspace = true }
tempfile = { workspace = true }
walkdir = { workspace = true }

dylint_internal = { version = "=3.3.0", path = "../internal", features = [
"examples",
Expand Down
14 changes: 7 additions & 7 deletions dylint-link/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ license = "MIT OR Apache-2.0"
repository = "https://github.com/trailofbits/dylint"

[dependencies]
anyhow = "1.0"
env_logger = "0.11"
if_chain = "1.0"
toml_edit = "0.22"
anyhow = { workspace = true }
env_logger = { workspace = true }
if_chain = { workspace = true }
toml_edit = { workspace = true }

dylint_internal = { version = "=3.3.0", path = "../internal", features = [
"cargo",
Expand All @@ -21,9 +21,9 @@ dylint_internal = { version = "=3.3.0", path = "../internal", features = [
dylint_internal = { version = "=3.3.0", path = "../internal" }

[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.1"
tempfile = "3.14"
assert_cmd = { workspace = true }
predicates = { workspace = true }
tempfile = { workspace = true }

dylint_internal = { version = "=3.3.0", path = "../internal", features = [
"packaging",
Expand Down
56 changes: 28 additions & 28 deletions dylint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,34 @@ repository = "https://github.com/trailofbits/dylint"
rust-version = "1.78"

[dependencies]
ansi_term = "0.12"
anyhow = "1.0"
ansi_term = { workspace = true }
anyhow = { workspace = true }
# smoelius: The `cargo` dependency should be kept in sync with: dylint/src/library_packages/cargo_lib/toml/mod.rs
cargo = { version = "0.81", optional = true }
cargo-platform = { version = "0.1", optional = true }
cargo-util = { version = "0.2", optional = true }
cargo-util-schemas = { version = "0.7", optional = true }
cargo_metadata = "0.19"
dirs = "5.0"
dunce = { version = "1.0", optional = true }
fs_extra = { version = "1.3", optional = true }
glob = { version = "0.3", optional = true }
heck = { version = "0.5", optional = true }
hex = { version = "0.4", optional = true }
home = { version = "0.5", optional = true }
if_chain = { version = "1.0", optional = true }
is-terminal = "0.4"
log = "0.4"
once_cell = "1.20"
rewriter = { version = "0.1", optional = true }
semver = "1.0"
serde = "1.0"
serde-untagged = { version = "0.1", optional = true }
serde_json = "1.0"
tempfile = "3.14"
toml = { version = "0.8", optional = true }
url = { version = "2.5", optional = true }
walkdir = "2.5"
cargo = { workspace = true, optional = true }
cargo-platform = { workspace = true, optional = true }
cargo-util = { workspace = true, optional = true }
cargo-util-schemas = { workspace = true, optional = true }
cargo_metadata = { workspace = true }
dirs = { workspace = true }
dunce = { workspace = true, optional = true }
fs_extra = { workspace = true, optional = true }
glob = { workspace = true, optional = true }
heck = { workspace = true, optional = true }
hex = { workspace = true, optional = true }
home = { workspace = true, optional = true }
if_chain = { workspace = true, optional = true }
is-terminal = { workspace = true }
log = { workspace = true }
once_cell = { workspace = true }
rewriter = { workspace = true, optional = true }
semver = { workspace = true }
serde = { workspace = true }
serde-untagged = { workspace = true, optional = true }
serde_json = { workspace = true }
tempfile = { workspace = true }
toml = { workspace = true, optional = true }
url = { workspace = true, optional = true }
walkdir = { workspace = true }

dylint_internal = { version = "=3.3.0", path = "../internal", features = [
"config",
Expand All @@ -52,7 +52,7 @@ dylint_internal = { version = "=3.3.0", path = "../internal", features = [
] }

[dev-dependencies]
env_logger = "0.11"
env_logger = { workspace = true }

dylint_internal = { version = "=3.3.0", path = "../internal", features = [
"examples",
Expand Down
8 changes: 4 additions & 4 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ license = "MIT OR Apache-2.0"
publish = false

[dev-dependencies]
cargo-util = "0.2"
cargo_metadata = "0.19"
toml_edit = "0.22"
walkdir = "2.5"
cargo-util = { workspace = true }
cargo_metadata = { workspace = true }
toml_edit = { workspace = true }
walkdir = { workspace = true }

dylint_internal = { version = "=3.3.0", path = "../internal", features = [
"clippy_utils",
Expand Down
7 changes: 7 additions & 0 deletions examples/general/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ members = [
]

[workspace.dependencies]
bitflags = "2.6"
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "ff4a26d442bead94a4c96fb1de967374bc4fbd8e" }
derivative = "2.2.0"
home = "0.5"
once_cell = "1.20"
serde = "1.0"
serde_json = "1.0"
tracing = "0.1"

[workspace.lints.rust.unexpected_cfgs]
level = "deny"
Expand Down
4 changes: 2 additions & 2 deletions examples/general/abs_home_path/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ crate-type = ["cdylib", "rlib"]

[dependencies]
clippy_utils = { workspace = true }
home = "0.5"
once_cell = "1.20"
home = { workspace = true }
once_cell = { workspace = true }

dylint_internal = { path = "../../../internal" }
dylint_linting = { path = "../../../utils/linting" }
Expand Down
2 changes: 1 addition & 1 deletion examples/general/await_holding_span_guard/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ clippy_utils = { workspace = true }
dylint_linting = { path = "../../../utils/linting" }

[dev-dependencies]
tracing = "0.1"
tracing = { workspace = true }

dylint_testing = { path = "../../../utils/testing" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ path = "ui_public_only/main.rs"

[dependencies]
clippy_utils = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
serde = { workspace = true, features = ["derive"] }

dylint_linting = { path = "../../../utils/linting" }

[dev-dependencies]
bitflags = "2.6"
derivative = "2.2.0"
once_cell = "1.20"
bitflags = { workspace = true }
derivative = { workspace = true }
once_cell = { workspace = true }

dylint_testing = { path = "../../../utils/testing" }

Expand Down
4 changes: 2 additions & 2 deletions examples/general/wrong_serialize_struct_arg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ dylint_internal = { path = "../../../internal" }
dylint_linting = { path = "../../../utils/linting" }

[dev-dependencies]
serde = "1.0"
serde_json = "1.0"
serde = { workspace = true }
serde_json = { workspace = true }

dylint_testing = { path = "../../../utils/testing" }

Expand Down
13 changes: 13 additions & 0 deletions examples/restriction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,20 @@ members = [
resolver = "2"

[workspace.dependencies]
anyhow = "1.0"
assert_cmd = "2.0"
camino = "1.1"
cargo_metadata = "0.18"
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "ff4a26d442bead94a4c96fb1de967374bc4fbd8e" }
diesel = "2.2"
git2 = "0.18"
heck = "0.5"
once_cell = "1.20"
serde = "1.0"
serde_json = "1.0"
tempfile = "3.14"
thiserror = "2.0"
toml = "0.8"

[workspace.lints.rust.unexpected_cfgs]
level = "deny"
Expand Down
4 changes: 2 additions & 2 deletions examples/restriction/collapsible_unwrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ path = "ui/main.rs"

[dependencies]
clippy_utils = { workspace = true }
heck = "0.5"
heck = { workspace = true }

dylint_linting = { path = "../../../utils/linting" }

[dev-dependencies]
toml = "0.8"
toml = { workspace = true }

dylint_testing = { path = "../../../utils/testing" }

Expand Down
2 changes: 1 addition & 1 deletion examples/restriction/const_path_join/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dylint_internal = { path = "../../../internal" }
dylint_linting = { path = "../../../utils/linting" }

[dev-dependencies]
camino = "1.1"
camino = { workspace = true }

dylint_testing = { path = "../../../utils/testing" }

Expand Down
2 changes: 1 addition & 1 deletion examples/restriction/inconsistent_qualification/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ clippy_utils = { workspace = true }
dylint_linting = { path = "../../../utils/linting" }

[dev-dependencies]
diesel = "2.2"
diesel = { workspace = true }

dylint_testing = { path = "../../../utils/testing" }

Expand Down
6 changes: 3 additions & 3 deletions examples/restriction/misleading_variable_name/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ path = "ui/main.rs"

[dependencies]
clippy_utils = { workspace = true }
heck = "0.5"
heck = { workspace = true }

dylint_linting = { path = "../../../utils/linting" }

[dev-dependencies]
anyhow = "1.0"
cargo_metadata = "0.18"
anyhow = { workspace = true }
cargo_metadata = { workspace = true }

dylint_testing = { path = "../../../utils/testing" }

Expand Down
14 changes: 7 additions & 7 deletions examples/restriction/overscoped_allow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ name = "ui_test"
path = "ui_test/main.rs"

[dependencies]
anyhow = "1.0"
cargo_metadata = "0.18"
anyhow = { workspace = true }
cargo_metadata = { workspace = true }
clippy_utils = { workspace = true }
once_cell = "1.20"
serde = "1.0"
serde_json = "1.0"
once_cell = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }

dylint_internal = { path = "../../../internal" }
dylint_linting = { path = "../../../utils/linting" }

[dev-dependencies]
assert_cmd = "2.0"
tempfile = "3.14"
assert_cmd = { workspace = true }
tempfile = { workspace = true }

dylint_testing = { path = "../../../utils/testing" }

Expand Down
4 changes: 2 additions & 2 deletions examples/restriction/question_mark_in_expression/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ clippy_utils = { workspace = true }
dylint_linting = { path = "../../../utils/linting" }

[dev-dependencies]
git2 = "0.18"
tempfile = "3.14"
git2 = { workspace = true }
tempfile = { workspace = true }

dylint_testing = { path = "../../../utils/testing" }

Expand Down
2 changes: 1 addition & 1 deletion examples/restriction/suboptimal_pattern/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib"]

[dependencies]
clippy_utils = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
serde = { workspace = true, features = ["derive"] }

dylint_linting = { path = "../../../utils/linting" }

Expand Down
Loading

0 comments on commit b169e1f

Please sign in to comment.