We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51fedf6 commit 4e258bbCopy full SHA for 4e258bb
src/tools/tidy/src/style.rs
@@ -186,6 +186,11 @@ fn should_ignore(line: &str) -> bool {
186
// - `//@[rev] normalize-stderr-test`
187
|| static_regex!("\\s*//@(\\[.*\\]) (compile-flags|normalize-stderr-test|error-pattern).*")
188
.is_match(line)
189
+ // Matching for rustdoc tests commands.
190
+ // It allows to prevent them emitting warnings like `line longer than 100 chars`.
191
+ || static_regex!(
192
+ "\\s*//@ \\!?(count|files|has|has-dir|hasraw|matches|matchesraw|snapshot)\\s.*"
193
+ ).is_match(line)
194
}
195
196
/// Returns `true` if `line` is allowed to be longer than the normal limit.
0 commit comments