Skip to content

Commit 57da90e

Browse files
committed
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>
1 parent 8f359be commit 57da90e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/tidy/src/style.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ fn contains_ignore_directive(can_contain: bool, contents: &str, check: &str) ->
178178
if contents.contains(&format!("// ignore-tidy-{check}"))
179179
|| contents.contains(&format!("# ignore-tidy-{check}"))
180180
|| contents.contains(&format!("/* ignore-tidy-{check} */"))
181+
|| contents.contains(&format!("<!-- ignore-tidy-{check} -->"))
181182
{
182183
Directive::Ignore(false)
183184
} else {
@@ -305,7 +306,8 @@ pub fn check(path: &Path, bad: &mut bool) {
305306

306307
let can_contain = contents.contains("// ignore-tidy-")
307308
|| contents.contains("# ignore-tidy-")
308-
|| contents.contains("/* ignore-tidy-");
309+
|| contents.contains("/* ignore-tidy-")
310+
|| contents.contains("<!-- ignore-tidy-");
309311
// Enable testing ICE's that require specific (untidy)
310312
// file formats easily eg. `issue-1234-ignore-tidy.rs`
311313
if filename.contains("ignore-tidy") {

0 commit comments

Comments
 (0)