-
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
Check that executable file is in-tree before failing tidy check #35848
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks for the PR! Looks reasonable to me, but can you confirm that this still works by checking in an executable file and running |
Fails for me. (I probably wasn't clear in the description--I did a basic check, just not for what happens when the file is ignored or only staged, etc.) |
…r=alexcrichton Check that executable file is in-tree before failing tidy check I silenced stdout and stderr for ls-files, not sure if that's appropriate (is `make tidy` intended to give debugging information)? Otherwise it prints each file it find to stdout/stderr, which currently prints nothing (only executable files are checked). I have not done major testing regarding the behavior of ls-files when the file is ignored, but judging by the man page everything should be fine. I've duplicated the code which makes the path git-friendly from the `Cargo.lock` checking code; I can extract that into a common helper if wanted (it's only two lines). Fixes rust-lang#35689.
Check that executable file is in-tree before failing tidy check I silenced stdout and stderr for ls-files, not sure if that's appropriate (is `make tidy` intended to give debugging information)? Otherwise it prints each file it find to stdout/stderr, which currently prints nothing (only executable files are checked). I have not done major testing regarding the behavior of ls-files when the file is ignored, but judging by the man page everything should be fine. I've duplicated the code which makes the path git-friendly from the `Cargo.lock` checking code; I can extract that into a common helper if wanted (it's only two lines). Fixes #35689.
I silenced stdout and stderr for ls-files, not sure if that's appropriate (is
make tidy
intended to give debugging information)? Otherwise it prints each file it find to stdout/stderr, which currently prints nothing (only executable files are checked).I have not done major testing regarding the behavior of ls-files when the file is ignored, but judging by the man page everything should be fine.
I've duplicated the code which makes the path git-friendly from the
Cargo.lock
checking code; I can extract that into a common helper if wanted (it's only two lines).Fixes #35689.