Skip to content

Commit

Permalink
Fix tidy issue for rustdoc tests commands
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jun 24, 2024
1 parent 51fedf6 commit 4e258bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tools/tidy/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ fn should_ignore(line: &str) -> bool {
// - `//@[rev] normalize-stderr-test`
|| static_regex!("\\s*//@(\\[.*\\]) (compile-flags|normalize-stderr-test|error-pattern).*")
.is_match(line)
// Matching for rustdoc tests commands.
// It allows to prevent them emitting warnings like `line longer than 100 chars`.
|| static_regex!(
"\\s*//@ \\!?(count|files|has|has-dir|hasraw|matches|matchesraw|snapshot)\\s.*"
).is_match(line)
}

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

0 comments on commit 4e258bb

Please sign in to comment.