-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Tidy rule against issue-*
filenames in tests?
#113345
Comments
For random ICE tests and such it's not always clear we have a better name - I think before we lint we should have guidelines on good alternatives. (Or decide that if you can't name it you shouldn't add it, but that seems strictly worse). |
Yes, we have to at least have a minimum bar of "what else, then?" before we discourage them programmatically. Though perhaps we could also say that, for instance, tests in some specific folder, like |
I think sometimes having the issue number is useful for context, but
|
Test files named |
I think every ICE has a better potential name than |
@rustbot claim |
Initial investigation: Wow that's a lot of tests. I'm not sure it's feasible for this to retroactively apply to existing tests because each of these tests requires manual investigation to determine what it's meant to be testing. I suspect that a large number of the tests are very old, and the older tests, especially pre-1.0, often need much deeper investigation. This at least cannot be in one large PR, and we'd certainly want to stop new tests from being like this as soon as possible. |
I believe that we should grandfather clause all the existing ones rather than simply forcing them all to migrate immediately. |
…=workingjubilee add tidy check that forbids issue-XXXX and ice-XXXX test filenames Helps with rust-lang#113345 by preventing any future tests with non-descriptive names from being added. This PR only checks modified ui test files because there are far too many existing problematic tests to be fixed at once: 3063/15424 (~19.86%) `*.rs` ui test files match `^issue[-_ ]?\d+$`. Another 1349 files, totaling ~28.60% of all ui test files, contain that pattern in addition to some other text, where they should probably omit it in favor of a comment. note: between the creation of this PR and 2023-07-25 (14 days), 10 more tests were added that failed this check. r? `@workingjubilee`
@rustbot release-assignment |
These filenames are really quite confounding as they mean that everything requires looking at its contents to understand what it is about. This kind of filename is only slightly better than naming it
test.rs
. We may want to lint against adding new ones.The text was updated successfully, but these errors were encountered: