Skip to content

Commit c34ec01

Browse files
committed
Rewrite of the config parsing code
* More precise spans in diagnostics * Allow multiple diagnostics for each config value * Ability to capture spans in the parsed config * Easier support of `..` in lists * Remove `termize` dependency. Use values from rustc instead.
1 parent 91d7c57 commit c34ec01

114 files changed

Lines changed: 1773 additions & 1493 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ declare_clippy_lint = { path = "declare_clippy_lint" }
2828
rustc_tools_util = { path = "rustc_tools_util", version = "0.4.2" }
2929
clippy_lints_internal = { path = "clippy_lints_internal", optional = true }
3030
tempfile = { version = "3.20", optional = true }
31-
termize = "0.2"
3231
color-print = "0.3.4"
3332
anstream = "0.6.18"
3433
tikv-jemalloc-sys = { version = "0.6.1", optional = true, features = ['override_allocator_on_supported_platforms'] }

book/src/development/adding_lints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ pub struct ManualStrip {
470470

471471
impl ManualStrip {
472472
pub fn new(conf: &'static Conf) -> Self {
473-
Self { msrv: conf.msrv }
473+
Self { msrv: conf.msrv.into() }
474474
}
475475
}
476476
```

clippy_config/Cargo.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ publish = false
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10+
arrayvec = { version = "0.7", default-features = false }
1011
clippy_utils = { path = "../clippy_utils" }
1112
itertools = "0.12"
12-
serde = { version = "1.0", features = ["derive"] }
13-
toml = "0.7.3"
13+
14+
[dependencies.toml]
15+
version = "0.9.7"
16+
default-features = false
17+
# preserve_order keeps diagnostic output in file order
18+
features = ["parse", "preserve_order"]
1419

1520
[dev-dependencies]
1621
walkdir = "2.3"

0 commit comments

Comments
 (0)