2020-12-29 23:16:16 -05:00
|
|
|
#![deny(rustdoc::non_autolinks)]
|
2020-10-12 18:29:56 +02:00
|
|
|
|
2020-10-31 15:14:44 +01:00
|
|
|
/// [http://aa.com](http://aa.com)
|
2020-10-13 15:46:34 +02:00
|
|
|
//~^ ERROR unneeded long form for URL
|
2020-10-31 15:14:44 +01:00
|
|
|
/// [http://bb.com]
|
2020-10-13 15:46:34 +02:00
|
|
|
//~^ ERROR unneeded long form for URL
|
2020-10-12 18:29:56 +02:00
|
|
|
///
|
2020-10-31 15:14:44 +01:00
|
|
|
/// [http://bb.com]: http://bb.com
|
2020-10-12 18:29:56 +02:00
|
|
|
///
|
|
|
|
/// [http://c.com][http://c.com]
|
|
|
|
pub fn a() {}
|
|
|
|
|
2020-10-14 15:11:55 +02:00
|
|
|
/// https://somewhere.com
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://somewhere.com/a
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://www.somewhere.com
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://www.somewhere.com/a
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://subdomain.example.com
|
|
|
|
//~^ ERROR not a hyperlink
|
|
|
|
/// https://somewhere.com?
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://somewhere.com/a?
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
2020-10-13 15:46:34 +02:00
|
|
|
/// https://somewhere.com?hello=12
|
2020-10-14 15:11:55 +02:00
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://somewhere.com/a?hello=12
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://example.com?hello=12#xyz
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://example.com/a?hello=12#xyz
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://example.com#xyz
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://example.com/a#xyz
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://somewhere.com?hello=12&bye=11
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://somewhere.com/a?hello=12&bye=11
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// https://somewhere.com?hello=12&bye=11#xyz
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
|
|
|
/// hey! https://somewhere.com/a?hello=12&bye=11#xyz
|
|
|
|
//~^ ERROR this URL is not a hyperlink
|
2020-10-13 15:46:34 +02:00
|
|
|
pub fn c() {}
|
|
|
|
|
|
|
|
/// <https://somewhere.com>
|
2020-10-12 18:29:56 +02:00
|
|
|
/// [a](http://a.com)
|
|
|
|
/// [b]
|
|
|
|
///
|
|
|
|
/// [b]: http://b.com
|
2020-10-17 23:58:46 +02:00
|
|
|
///
|
|
|
|
/// ```
|
|
|
|
/// This link should not be linted: http://example.com
|
|
|
|
/// ```
|
2020-10-31 13:46:28 +01:00
|
|
|
///
|
|
|
|
/// [should_not.lint](should_not.lint)
|
2020-10-12 18:29:56 +02:00
|
|
|
pub fn everything_is_fine_here() {}
|
2020-10-14 15:11:55 +02:00
|
|
|
|
2020-12-29 23:16:16 -05:00
|
|
|
#[allow(rustdoc::non_autolinks)]
|
2020-10-14 15:11:55 +02:00
|
|
|
pub mod foo {
|
|
|
|
/// https://somewhere.com/a?hello=12&bye=11#xyz
|
|
|
|
pub fn bar() {}
|
|
|
|
}
|