2016-03-19 11:59:12 -05:00
|
|
|
//! This file tests for the DOC_MARKDOWN lint
|
|
|
|
//~^ ERROR: you should put `DOC_MARKDOWN` between ticks
|
|
|
|
|
|
|
|
#![feature(plugin)]
|
|
|
|
#![plugin(clippy)]
|
|
|
|
|
|
|
|
#![deny(doc_markdown)]
|
|
|
|
|
2016-03-28 11:00:24 -05:00
|
|
|
/// The foo_bar function does _nothing_. See also foo::bar. (note the dot there)
|
|
|
|
/// Markdown is _weird_. I mean _really weird_. This \_ is ok. So is `_`. But not Foo::some_fun
|
|
|
|
/// which should be reported only once despite being __doubly bad__.
|
2016-03-19 11:59:12 -05:00
|
|
|
fn foo_bar() {
|
2016-03-28 11:00:24 -05:00
|
|
|
//~^ ERROR: you should put `foo_bar` between ticks
|
|
|
|
//~| ERROR: you should put `foo::bar` between ticks
|
|
|
|
//~| ERROR: you should put `Foo::some_fun` between ticks
|
2016-03-19 11:59:12 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/// That one tests multiline ticks.
|
|
|
|
/// ```rust
|
|
|
|
/// foo_bar FOO_BAR
|
2016-03-28 14:23:21 -05:00
|
|
|
/// _foo bar_
|
2016-03-19 11:59:12 -05:00
|
|
|
/// ```
|
|
|
|
fn multiline_ticks() {
|
|
|
|
}
|
|
|
|
|
2016-03-28 14:23:21 -05:00
|
|
|
/// This _is a test for
|
|
|
|
/// multiline
|
|
|
|
/// emphasis_.
|
|
|
|
fn test_emphasis() {
|
|
|
|
}
|
|
|
|
|
2016-04-04 13:18:17 -05:00
|
|
|
/// This tests units. See also #835.
|
|
|
|
/// kiB MiB GiB TiB PiB EiB
|
|
|
|
/// kib Mib Gib Tib Pib Eib
|
|
|
|
/// kB MB GB TB PB EB
|
|
|
|
/// kb Mb Gb Tb Pb Eb
|
|
|
|
/// 32kiB 32MiB 32GiB 32TiB 32PiB 32EiB
|
|
|
|
/// 32kib 32Mib 32Gib 32Tib 32Pib 32Eib
|
|
|
|
/// 32kB 32MB 32GB 32TB 32PB 32EB
|
|
|
|
/// 32kb 32Mb 32Gb 32Tb 32Pb 32Eb
|
|
|
|
fn test_units() {
|
|
|
|
}
|
|
|
|
|
2016-04-01 10:24:55 -05:00
|
|
|
/// This test has [a link with underscores][chunked-example] inside it. See #823.
|
|
|
|
/// See also [the issue tracker](https://github.com/Manishearth/rust-clippy/search?q=doc_markdown&type=Issues).
|
|
|
|
///
|
|
|
|
/// [chunked-example]: http://en.wikipedia.org/wiki/Chunked_transfer_encoding#Example
|
|
|
|
|
2016-03-19 11:59:12 -05:00
|
|
|
/// The `main` function is the entry point of the program. Here it only calls the `foo_bar` and
|
|
|
|
/// `multiline_ticks` functions.
|
|
|
|
fn main() {
|
|
|
|
foo_bar();
|
|
|
|
multiline_ticks();
|
2016-03-28 14:23:21 -05:00
|
|
|
test_emphasis();
|
2016-04-04 13:18:17 -05:00
|
|
|
test_units();
|
2016-03-19 11:59:12 -05:00
|
|
|
}
|