Add regression test for #13097

This commit is contained in:
Guillaume Gomez 2024-07-26 11:12:59 +02:00
parent 760c3fab4f
commit 88506a9147
3 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,13 @@
// This test checks that words starting with capital letters and ending with "ified" don't
// trigger the lint.
#![deny(clippy::doc_markdown)]
pub enum OutputFormat {
/// `HumaNified`
//~^ ERROR: item in documentation is missing backticks
Plain,
// Should not warn!
/// JSONified console output
Json,
}

View File

@ -0,0 +1,13 @@
// This test checks that words starting with capital letters and ending with "ified" don't
// trigger the lint.
#![deny(clippy::doc_markdown)]
pub enum OutputFormat {
/// HumaNified
//~^ ERROR: item in documentation is missing backticks
Plain,
// Should not warn!
/// JSONified console output
Json,
}

View File

@ -0,0 +1,18 @@
error: item in documentation is missing backticks
--> tests/ui/doc/doc_markdown-issue_13097.rs:7:9
|
LL | /// HumaNified
| ^^^^^^^^^^
|
note: the lint level is defined here
--> tests/ui/doc/doc_markdown-issue_13097.rs:4:9
|
LL | #![deny(clippy::doc_markdown)]
| ^^^^^^^^^^^^^^^^^^^^
help: try
|
LL | /// `HumaNified`
| ~~~~~~~~~~~~
error: aborting due to 1 previous error