Skip to content

chore: clearify tidy's error message#152202

Open
nyurik wants to merge 3 commits intorust-lang:mainfrom
nyurik:better-msg
Open

chore: clearify tidy's error message#152202
nyurik wants to merge 3 commits intorust-lang:mainfrom
nyurik:better-msg

Conversation

@nyurik
Copy link
Contributor

@nyurik nyurik commented Feb 6, 2026

it took me a while to realize this error was due to the name of the file, not the file's content

@rustbot rustbot added A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 6, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 6, 2026

r? @Zalathar

rustbot has assigned @Zalathar.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • People who recently interacted with files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, Zalathar, clubby789, jieyouxu

{
check.error(format!(
"file `tests/{stripped_path}` must begin with a descriptive name, consider `{{reason}}-issue-{issue_n}.rs`",
"the name of the file `tests/{stripped_path}` must begin with a descriptive prefix, consider `{{reason}}-issue-{issue_n}.rs`",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"prefix" is misleading as it is not essential that it includes issue-{NN} as part of the filename and thus there is no "prefix" if it's the entire thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think would be a good error here?

Copy link
Member

@workingjubilee workingjubilee Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mm. If I had my druthers, it would be "test filenames should be descriptive instead of context-free integers", but that's probably too snarky.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about this?

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jieyouxu
Copy link
Member

jieyouxu commented Feb 6, 2026

r? me @bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 6, 2026

📌 Commit dc87b28 has been approved by jieyouxu

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 6, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 6, 2026
chore: clearify tidy's error message

it took me a while to realize this error was due to the name of the file, not the file's content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tidy Area: The tidy tool S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants