Replace - with _ in generated lint names

This commit is contained in:
Lukas Wirth 2021-06-04 19:03:45 +02:00
parent 0b9ba4977e
commit 0c89f38378
3 changed files with 151 additions and 150 deletions

View file

@ -123,6 +123,7 @@ pub(crate) fn hover(
_ => {
if ast::Comment::cast(token.clone()).is_some() {
cov_mark::hit!(no_highlight_on_comment_hover);
let (attributes, def) = doc_attributes(&sema, &node)?;
let (docs, doc_mapping) = attributes.docs_with_rangemap(db)?;
let (idl_range, link, ns) =
@ -136,8 +137,10 @@ pub(crate) fn hover(
})?;
range = Some(idl_range);
resolve_doc_path_for_def(db, def, &link, ns).map(Definition::ModuleDef)
} else if let res@Some(_) = try_hover_for_attribute(&token) {
return res;
} else {
return try_hover_for_attribute(&token);
None
}
},
}
@ -169,11 +172,6 @@ pub(crate) fn hover(
}
}
if token.kind() == syntax::SyntaxKind::COMMENT {
cov_mark::hit!(no_highlight_on_comment_hover);
return None;
}
if let res @ Some(_) = hover_for_keyword(&sema, links_in_hover, markdown, &token) {
return res;
}