diff --git a/build.zig b/build.zig index eff017ce22ea740c83cdd1222fe88927205be81f..5211a9a70a9bd0ef15efabe1ed0bc04724776f8b 100644 --- a/build.zig +++ b/build.zig @@ -422,18 +422,13 @@ pub fn build(b: *std.Build) !void { const optimization_modes = chosen_opt_modes_buf[0..chosen_mode_index]; const fmt_include_paths = &.{ "doc", "lib", "src", "test", "tools", "build.zig" }; - const fmt_exclude_paths = &.{ - "test/cases", - // This is for the CI scripts. - "build-debug", - "build-release", - }; + const fmt_exclude_paths = &.{"test/cases"}; const do_fmt = b.addFmt(.{ .paths = fmt_include_paths, .exclude_paths = fmt_exclude_paths, }); - b.step("check-fmt", "Check source files having conforming formatting").dependOn(&b.addFmt(.{ + b.step("test-fmt", "Check source files having conforming formatting").dependOn(&b.addFmt(.{ .paths = fmt_include_paths, .exclude_paths = fmt_exclude_paths, .check = true, diff --git a/ci/aarch64-linux-debug.sh b/ci/aarch64-linux-debug.sh index da77601ce53bdf14b2af5b2455a8a83a4be5c5db..6369777e884e56bc8b2c758955ad755d34445e05 100644 --- a/ci/aarch64-linux-debug.sh +++ b/ci/aarch64-linux-debug.sh @@ -50,8 +50,11 @@ unset CXX ninja install +# TODO: move this to a build.zig step (check-fmt) echo "Looking for non-conforming code formatting..." -stage3-debug/bin/zig build check-fmt +stage3-debug/bin/zig fmt --check .. \ + --exclude ../test/cases/ \ + --exclude ../build-debug # simultaneously test building self-hosted without LLVM and with 32-bit arm stage3-debug/bin/zig build \ diff --git a/ci/aarch64-linux-release.sh b/ci/aarch64-linux-release.sh index bd9854cedc2f50d0e51011a4f99d91382de0453a..369c14dc5f8dcf9f10da60f2a8d48d2c64f7a4fe 100644 --- a/ci/aarch64-linux-release.sh +++ b/ci/aarch64-linux-release.sh @@ -50,8 +50,11 @@ unset CXX ninja install +# TODO: move this to a build.zig step (check-fmt) echo "Looking for non-conforming code formatting..." -stage3-release/bin/zig build check-fmt +stage3-release/bin/zig fmt --check .. \ + --exclude ../test/cases/ \ + --exclude ../build-release # simultaneously test building self-hosted without LLVM and with 32-bit arm stage3-release/bin/zig build \ diff --git a/ci/x86_64-linux-debug.sh b/ci/x86_64-linux-debug.sh index e007d4001398d9de4bf62a6dbb960b932cc3e04a..2efca8f7746c3e80c98e63035a4041eb5149df32 100755 --- a/ci/x86_64-linux-debug.sh +++ b/ci/x86_64-linux-debug.sh @@ -50,8 +50,11 @@ unset CXX ninja install +# TODO: move this to a build.zig step (check-fmt) echo "Looking for non-conforming code formatting..." -stage3-debug/bin/zig build check-fmt +stage3-debug/bin/zig fmt --check .. \ + --exclude ../test/cases/ \ + --exclude ../build-debug # simultaneously test building self-hosted without LLVM and with 32-bit arm stage3-debug/bin/zig build \ diff --git a/ci/x86_64-linux-release.sh b/ci/x86_64-linux-release.sh index 99c4eae73297c81f992064014e979201351c770c..4dc5c379270d3b5fc23993da812a3a6fbd2dc298 100755 --- a/ci/x86_64-linux-release.sh +++ b/ci/x86_64-linux-release.sh @@ -50,8 +50,12 @@ unset CXX ninja install +# TODO: move this to a build.zig step (check-fmt) echo "Looking for non-conforming code formatting..." -stage3-release/bin/zig build check-fmt +stage3-release/bin/zig fmt --check .. \ + --exclude ../test/cases/ \ + --exclude ../build-debug \ + --exclude ../build-release # simultaneously test building self-hosted without LLVM and with 32-bit arm stage3-release/bin/zig build \