1
Fork 0

Add new lint for automatic_links improvements

This commit is contained in:
Guillaume Gomez 2020-10-12 18:28:57 +02:00
parent 8c20701219
commit 2980367030
5 changed files with 114 additions and 1 deletions

View file

@ -1890,6 +1890,17 @@ declare_lint! {
"detects invalid HTML tags in doc comments"
}
declare_lint! {
/// The `automatic_links` lint detects when a URL/email address could be
/// written using only brackets. This is a `rustdoc` only lint, see the
/// documentation in the [rustdoc book].
///
/// [rustdoc book]: ../../../rustdoc/lints.html#automatic_links
pub AUTOMATIC_LINKS,
Allow,
"detects URLs/email adresses that could be written using only brackets"
}
declare_lint! {
/// The `where_clauses_object_safety` lint detects for [object safety] of
/// [where clauses].
@ -2795,6 +2806,7 @@ declare_lint_pass! {
MISSING_DOC_CODE_EXAMPLES,
INVALID_HTML_TAGS,
PRIVATE_DOC_TESTS,
AUTOMATIC_LINKS,
WHERE_CLAUSES_OBJECT_SAFETY,
PROC_MACRO_DERIVE_RESOLUTION_FALLBACK,
MACRO_USE_EXTERN_CRATE,