Skip to content

Commit

Permalink
Fix tests/run-make handling.
Browse files Browse the repository at this point in the history
I tried some `rustfmt.toml` changes and these files were changed under
`tests/run-make`:

    tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs
    tests/run-make/compiler-builtins/rmake.rs
    tests/run-make/cross-lang-lto-riscv-abi/rmake.rs
    tests/run-make/issue-26006/in/libc/lib.rs
    tests/run-make/issue-26006/in/time/lib.rs
    tests/run-make/print-cfg/rmake.rs
    tests/run-make/print-native-static-libs/rmake.rs
    tests/run-make/print-to-output/rmake.rs
    tests/run-make/rustdoc-scrape-examples-invalid-expr/src/lib.rs
    tests/run-make/rustdoc-scrape-examples-macros/src/lib.rs
    tests/run-make/rustdoc-scrape-examples-test/examples/ex.rs
    tests/run-make/thumb-none-qemu/example/src/main.rs
    tests/run-make/wasm-exceptions-nostd/src/arena_alloc.rs
    tests/run-make/wasm-exceptions-nostd/src/lib.rs
    tests/run-make/wasm-exceptions-nostd/src/panicking.rs
    tests/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/build.rs

Only the `rmake.rs` files should have been changed.

This commit adjust the rules to initially exclude all files under
`tests/run-make/`, not just `tests/run-make/*/*.rs`. Because there are
some `.rs` files at deeper depths. After that, the changes I get are to
only the desired files:

    tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs
    tests/run-make/compiler-builtins/rmake.rs
    tests/run-make/cross-lang-lto-riscv-abi/rmake.rs
    tests/run-make/print-cfg/rmake.rs
    tests/run-make/print-native-static-libs/rmake.rs
    tests/run-make/print-to-output/rmake.rs
  • Loading branch information
nnethercote committed May 23, 2024
1 parent 39e02f1 commit 8ec5901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ignore = [
# but we still want to format rmake.rs files in tests/run-make/ so we need to do this
# dance to avoid the parent directory from being excluded
"!/tests/run-make/",
"/tests/run-make/*/*.rs",
"/tests/run-make/*",
"!/tests/run-make/*/rmake.rs",

# do not format submodules
Expand Down

0 comments on commit 8ec5901

Please sign in to comment.