Skip to content

Commit

Permalink
fix: metadata-collector listing lints when config documents include c…
Browse files Browse the repository at this point in the history
…omma
  • Loading branch information
granddaifuku authored Jan 4, 2024
1 parent 0bf0b88 commit 9dcf926
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_config/src/conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ define_Conf! {
/// Lint: PUB_UNDERSCORE_FIELDS
///
/// Lint "public" fields in a struct that are prefixed with an underscore based on their
/// exported visibility; or whether they are marked as "pub".
/// exported visibility, or whether they are marked as "pub".
(pub_underscore_fields_behavior: PubUnderscoreFieldsBehaviour = PubUnderscoreFieldsBehaviour::PublicallyExported),
}

Expand Down
3 changes: 3 additions & 0 deletions clippy_config/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ fn parse_config_field_doc(doc_comment: &str) -> Option<(Vec<String>, String)> {
doc_comment.make_ascii_lowercase();
let lints: Vec<String> = doc_comment
.split_off(DOC_START.len())
.lines()
.next()
.unwrap()
.split(", ")
.map(str::to_string)
.collect();
Expand Down

0 comments on commit 9dcf926

Please sign in to comment.