Skip to content

Commit 229108a

Browse files
authored
Rollup merge of #121375 - chenyukang:yukang-fix-tidy, r=albertlarsan68
Print proper relative path for descriptive name check The `stripped_path` starts with `ui/...`, while we are mostly working in `rust` directory. print a relative path starting with `tests/ui/...` so that we can copy and use the path when renaming. Hardcoding the `tests` maybe not good style, but seems we have a lot of hardcoded `tests/..` paths in tidy check :(.
2 parents 860ad7c + 3da200d commit 229108a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/tools/tidy/src/ui_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pub fn check(path: &Path, bless: bool, bad: &mut bool) {
162162
if !remaining_issue_names.remove(stripped_path) {
163163
tidy_error!(
164164
bad,
165-
"file `{stripped_path}` must begin with a descriptive name, consider `{{reason}}-issue-{issue_n}.rs`",
165+
"file `tests/{stripped_path}` must begin with a descriptive name, consider `{{reason}}-issue-{issue_n}.rs`",
166166
issue_n = &test_name[1],
167167
);
168168
}

0 commit comments

Comments
 (0)