Skip to content

Commit af08873

Browse files
committed
Auto merge of #124704 - Urgau:fix-ignored-tests-fmt, r=GuillaumeGomez
Fix ignored tests for formatting This PR fixes the ignored rules in `rustfmt.toml` that were changed in rust-lang/rust#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/rust#124613 (comment) cc `@GuillaumeGomez` r? `@onur-ozkan`
2 parents 134566d + 50d9b30 commit af08873

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)