Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: add more info about what failed in tidy tests #4008

Merged
merged 1 commit into from Apr 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions xtask/tests/tidy-tests/main.rs
Expand Up @@ -35,7 +35,7 @@ fn check_todo(path: &Path, text: &str) {
}
if text.contains("TODO") || text.contains("TOOD") || text.contains("todo!") {
panic!(
"\nTODO markers should not be committed to the master branch,\n\
"\nTODO markers or todo! macros should not be committed to the master branch,\n\
use FIXME instead\n\
{}\n",
path.display(),
Expand All @@ -47,9 +47,9 @@ fn check_trailing_ws(path: &Path, text: &str) {
if is_exclude_dir(path, &["test_data"]) {
return;
}
for line in text.lines() {
for (line_number, line) in text.lines().enumerate() {
if line.chars().last().map(char::is_whitespace) == Some(true) {
panic!("Trailing whitespace in {}", path.display())
panic!("Trailing whitespace in {} at line {}", path.display(), line_number)
}
}
}
Expand Down