-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Ignore non .rs files for tidy libcoretest #50661
Conversation
Previously, any file would be read, which is both unnecessary, and causes issues if irrelevant non-Unicode files were read (e.g. `.DS_STORE`).
src/tools/tidy/src/libcoretest.rs
Outdated
"{} contains #[test]; libcore tests must be placed inside `src/libcore/tests/`", | ||
subpath.display() | ||
); | ||
if subpath.ends_with(".rs") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you verified that adding #[test]
inside libcore still triggers this warning? Path::ends_with
I don't think will work with ".rs"
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, should have tested this properly. I've fixed it, and also improved the error message in the case of failure.
@bors: r+ Thanks! |
📌 Commit 16c088d has been approved by |
…=alexcrichton Ignore non .rs files for tidy libcoretest Previously, any file would be read, which is both unnecessary, and causes issues if irrelevant non-Unicode files were read (e.g. `.DS_STORE`).
@bors rollup |
Rollup of 13 pull requests Successful merges: - #50544 (Cleanup some dependencies) - #50545 (Made some functions in time module const) - #50550 (use fmt::Result where applicable) - #50558 (Remove all reference to DepGraph::work_products) - #50602 (Update canonicalize docs) - #50607 (Allocate Symbol strings from an arena) - #50613 (Migrate the toolstate update bot to rust-highfive) - #50624 (fs::write: Add example writing a &str) - #50634 (Do not silently truncate offsets for `read_at`/`write_at` on emscripten) - #50644 (AppVeyor: Read back trace from crash dump on failure.) - #50661 (Ignore non .rs files for tidy libcoretest) - #50663 (rustc: Allow an edition's feature on that edition) - #50667 (rustc: Only suggest deleting `extern crate` if it works) Failed merges:
…=alexcrichton Ignore non .rs files for tidy libcoretest Previously, any file would be read, which is both unnecessary, and causes issues if irrelevant non-Unicode files were read (e.g. `.DS_STORE`).
Rollup of 8 pull requests Successful merges: - #50624 (fs::write: Add example writing a &str) - #50634 (Do not silently truncate offsets for `read_at`/`write_at` on emscripten) - #50644 (AppVeyor: Read back trace from crash dump on failure.) - #50661 (Ignore non .rs files for tidy libcoretest) - #50663 (rustc: Allow an edition's feature on that edition) - #50667 (rustc: Only suggest deleting `extern crate` if it works) - #50670 (rustc: Include semicolon when removing `extern crate`) - #50678 (Update openbsd targets) Failed merges:
Previously, any file would be read, which is both unnecessary, and causes issues if irrelevant non-Unicode files were read (e.g.
.DS_STORE
).