Skip to content

Commit db6f676

Browse files
tidy: Ignore rustdoc comments commands
1 parent dcb6cba commit db6f676

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/tools/tidy/src/style.rs

+4
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ fn should_ignore(line: &str) -> bool {
186186
// - `//@[rev] normalize-stderr-test`
187187
|| static_regex!("\\s*//@(\\[.*\\]) (compile-flags|normalize-stderr-test|error-pattern).*")
188188
.is_match(line)
189+
// Matching for rustdoc tests commands.
190+
|| static_regex!(
191+
"\\s*//@ \\!?(count|files|has|has-dir|hasraw|matches|matchesraw|snapshot)\\s.*"
192+
).is_match(line)
189193
}
190194

191195
/// Returns `true` if `line` is allowed to be longer than the normal limit.

0 commit comments

Comments
 (0)