Skip to content

Commit

Permalink
Rollup merge of rust-lang#121375 - chenyukang:yukang-fix-tidy, r=albe…
Browse files Browse the repository at this point in the history
…rtlarsan68

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 :(.
  • Loading branch information
Dylan-DPC authored Feb 21, 2024
2 parents 860ad7c + 3da200d commit 229108a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pub fn check(path: &Path, bless: bool, bad: &mut bool) {
if !remaining_issue_names.remove(stripped_path) {
tidy_error!(
bad,
"file `{stripped_path}` must begin with a descriptive name, consider `{{reason}}-issue-{issue_n}.rs`",
"file `tests/{stripped_path}` must begin with a descriptive name, consider `{{reason}}-issue-{issue_n}.rs`",
issue_n = &test_name[1],
);
}
Expand Down

0 comments on commit 229108a

Please sign in to comment.