Fix tidy issue for rustdoc tests commands · rust-lang/rust@4e258bb (original) (raw)

Original file line number Diff line number Diff line change
@@ -186,6 +186,11 @@ fn should_ignore(line: &str) -> bool {
186 186 // - `//@[rev] normalize-stderr-test`
187 187 |
188 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 + |
192 +"\\s*//@ \\!?(count|files
193 +).is_match(line)
189 194 }
190 195
191 196 /// Returns `true` if `line` is allowed to be longer than the normal limit.