tidy: support ignore-tidy for Markdown files
To be used to skip the `tab` check in `jobserver.md`. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
8f359beca4
commit
57da90eedd
1 changed files with 3 additions and 1 deletions
|
|
@ -178,6 +178,7 @@ fn contains_ignore_directive(can_contain: bool, contents: &str, check: &str) ->
|
|||
if contents.contains(&format!("// ignore-tidy-{check}"))
|
||||
|| contents.contains(&format!("# ignore-tidy-{check}"))
|
||||
|| contents.contains(&format!("/* ignore-tidy-{check} */"))
|
||||
|| contents.contains(&format!("<!-- ignore-tidy-{check} -->"))
|
||||
{
|
||||
Directive::Ignore(false)
|
||||
} else {
|
||||
|
|
@ -305,7 +306,8 @@ pub fn check(path: &Path, bad: &mut bool) {
|
|||
|
||||
let can_contain = contents.contains("// ignore-tidy-")
|
||||
|| contents.contains("# ignore-tidy-")
|
||||
|| contents.contains("/* ignore-tidy-");
|
||||
|| contents.contains("/* ignore-tidy-")
|
||||
|| contents.contains("<!-- ignore-tidy-");
|
||||
// Enable testing ICE's that require specific (untidy)
|
||||
// file formats easily eg. `issue-1234-ignore-tidy.rs`
|
||||
if filename.contains("ignore-tidy") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue