-
Notifications
You must be signed in to change notification settings - Fork 13.5k
tidy: check for invalid file names #143957
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
Conversation
|
There are changes to the cc @jieyouxu |
Just out of curiosity, how long does it take to run this on your machine? |
To run with this PR:
Executed in 4.26 secs fish external
usr time 14.15 secs 3.70 millis 14.15 secs
sys time 5.47 secs 1.12 millis 5.47 secs
without this PR:
Executed in 4.22 secs fish external
usr time 14.35 secs 0.79 millis 14.35 secs
sys time 5.40 secs 1.13 millis 5.40 secs |
Okay, that should be fine. Hopefully it won't be sluggish e.g. on Windows, but I think that tidy does so much I/O anyway that this won't be bad. |
Yeah, since it uses only file names and not even file contents, there is a good chance that the cache is primed already (or that this primes it for other parts of tidy). If it gets r+, maybe rollup=never would make it easier to roll it back in case it is heavier than expected on some platforms. |
I think it will be fine, I realized that it won't even read all the filenames from disk, which I first wrongly assumed, just return the filenames from the internal git DB, that should be fine. The @bors r+ |
…bzol tidy: check for invalid file names Check for file names added to git with: - non-UTF8 filenames (this would fail "fmt check" with a decoding error for the moment, but maybe we should not count on it as it is an accidental failure) - control characters (such as "\n" or "\r" in file names) - ":" (which is a special character on Windows, made rust-lang#142936 fail in bors while it could have be caught earlier) It only checks files known by git as a developer might want to have "strange" file names alongside their local repository as long as they don't check them in. r? jieyouxu as he stumbled upon such a file in rust-lang#142936
Rollup of 13 pull requests Successful merges: - #142936 (rustdoc-json: Structured attributes) - #143355 (wrapping shift: remove first bitmask and table) - #143448 (remote-test-client: Exit code `128 + <signal-number>` instead of `3`) - #143692 (miri: fix out-of-bounds error for ptrs with negative offsets) - #143719 (Emit warning when there is no space between `-o` and arg) - #143738 (Move several float tests to floats/mod.rs) - #143920 (Make more of codegen_llvm safe) - #143921 (Constify `Index` traits) - #143939 (Add 0323pin as maintainer of NetBSD targets, fix link to pkgsrc-wip and explain.) - #143948 (Update mdbook to 0.4.52) - #143957 (tidy: check for invalid file names) - #143968 (Add tracing to `InterpCx::fn_abi_of_instance/fn_abi_of_fn_ptr`) - #143990 (Add LocalKey<Cell>::update) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 12 pull requests Successful merges: - #142936 (rustdoc-json: Structured attributes) - #143355 (wrapping shift: remove first bitmask and table) - #143448 (remote-test-client: Exit code `128 + <signal-number>` instead of `3`) - #143692 (miri: fix out-of-bounds error for ptrs with negative offsets) - #143738 (Move several float tests to floats/mod.rs) - #143920 (Make more of codegen_llvm safe) - #143921 (Constify `Index` traits) - #143939 (Add 0323pin as maintainer of NetBSD targets, fix link to pkgsrc-wip and explain.) - #143948 (Update mdbook to 0.4.52) - #143957 (tidy: check for invalid file names) - #143968 (Add tracing to `InterpCx::fn_abi_of_instance/fn_abi_of_fn_ptr`) - #143990 (Add LocalKey<Cell>::update) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #143957 - samueltardieu:tidy-filenames, r=Kobzol tidy: check for invalid file names Check for file names added to git with: - non-UTF8 filenames (this would fail "fmt check" with a decoding error for the moment, but maybe we should not count on it as it is an accidental failure) - control characters (such as "\n" or "\r" in file names) - ":" (which is a special character on Windows, made #142936 fail in bors while it could have be caught earlier) It only checks files known by git as a developer might want to have "strange" file names alongside their local repository as long as they don't check them in. r? jieyouxu as he stumbled upon such a file in #142936
Rollup of 12 pull requests Successful merges: - rust-lang/rust#142936 (rustdoc-json: Structured attributes) - rust-lang/rust#143355 (wrapping shift: remove first bitmask and table) - rust-lang/rust#143448 (remote-test-client: Exit code `128 + <signal-number>` instead of `3`) - rust-lang/rust#143692 (miri: fix out-of-bounds error for ptrs with negative offsets) - rust-lang/rust#143738 (Move several float tests to floats/mod.rs) - rust-lang/rust#143920 (Make more of codegen_llvm safe) - rust-lang/rust#143921 (Constify `Index` traits) - rust-lang/rust#143939 (Add 0323pin as maintainer of NetBSD targets, fix link to pkgsrc-wip and explain.) - rust-lang/rust#143948 (Update mdbook to 0.4.52) - rust-lang/rust#143957 (tidy: check for invalid file names) - rust-lang/rust#143968 (Add tracing to `InterpCx::fn_abi_of_instance/fn_abi_of_fn_ptr`) - rust-lang/rust#143990 (Add LocalKey<Cell>::update) r? `@ghost` `@rustbot` modify labels: rollup
Check for file names added to git with:
It only checks files known by git as a developer might want to have "strange" file names alongside their local repository as long as they don't check them in.
r? jieyouxu
as he stumbled upon such a file in #142936