Skip to content

Commit 9dcf926

Browse files
authored
fix: metadata-collector listing lints when config documents include comma
1 parent 0bf0b88 commit 9dcf926

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

clippy_config/src/conf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ define_Conf! {
550550
/// Lint: PUB_UNDERSCORE_FIELDS
551551
///
552552
/// Lint "public" fields in a struct that are prefixed with an underscore based on their
553-
/// exported visibility; or whether they are marked as "pub".
553+
/// exported visibility, or whether they are marked as "pub".
554554
(pub_underscore_fields_behavior: PubUnderscoreFieldsBehaviour = PubUnderscoreFieldsBehaviour::PublicallyExported),
555555
}
556556

clippy_config/src/metadata.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ fn parse_config_field_doc(doc_comment: &str) -> Option<(Vec<String>, String)> {
9696
doc_comment.make_ascii_lowercase();
9797
let lints: Vec<String> = doc_comment
9898
.split_off(DOC_START.len())
99+
.lines()
100+
.next()
101+
.unwrap()
99102
.split(", ")
100103
.map(str::to_string)
101104
.collect();

0 commit comments

Comments
 (0)