-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix ignored tests for formatting #124704
Fix ignored tests for formatting #124704
Conversation
It's super weird that @bors r+ p=1 |
|
…llaumeGomez Fix ignored tests for formatting This PR fixes the ignored rules in `rustfmt.toml` that were changed in rust-lang#124613 to allow formatting `rmake.rs` but ended up allowing formatting every Rust files in `tests/`. The fix is a bit involved since we need to workaround a [`.gitignore` pattern limitation](https://git-scm.com/docs/gitignore#_pattern_format): > An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again. It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined. Workaround using https://stackoverflow.com/a/5534865 I tested the fix by changing the formatting in an `rmake.rs` and UI test, and verifying that only the `rmake.rs` files were formatted. Fixes rust-lang#124613 (comment) cc `@GuillaumeGomez` r? `@onur-ozkan`
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#122441 (Improve several `Read` implementations) - rust-lang#124584 (Various improvements to entrypoint code) - rust-lang#124699 (Use `unchecked_sub` in `split_at`) - rust-lang#124704 (Fix ignored tests for formatting) - rust-lang#124709 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
…aumeGomez Fix ignored tests for formatting This PR fixes the ignored rules in `rustfmt.toml` that were changed in rust-lang#124613 to allow formatting `rmake.rs` but ended up allowing formatting every Rust files in `tests/`. The fix is a bit involved since we need to workaround a [`.gitignore` pattern limitation](https://git-scm.com/docs/gitignore#_pattern_format): > An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again. It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined. Workaround using https://stackoverflow.com/a/5534865 I tested the fix by changing the formatting in an `rmake.rs` and UI test, and verifying that only the `rmake.rs` files were formatted. Fixes rust-lang#124613 (comment) cc `@GuillaumeGomez` r? `@onur-ozkan`
@bors retry |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#122441 (Improve several `Read` implementations) - rust-lang#124584 (Various improvements to entrypoint code) - rust-lang#124699 (Use `unchecked_sub` in `split_at`) - rust-lang#124704 (Fix ignored tests for formatting) - rust-lang#124709 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
☀️ Test successful - checks-actions |
Finished benchmarking commit (1a851da): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 674.772s -> 674.198s (-0.09%) |
This PR fixes the ignored rules in
rustfmt.toml
that were changed in #124613 to allow formattingrmake.rs
but ended up allowing formatting every Rust files intests/
.The fix is a bit involved since we need to workaround a
.gitignore
pattern limitation:Workaround using https://stackoverflow.com/a/5534865
I tested the fix by changing the formatting in an
rmake.rs
and UI test, and verifying that only thermake.rs
files were formatted.Fixes #124613 (comment)
cc @GuillaumeGomez
r? @onur-ozkan