aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorWooster <wooster0@proton.me>2023-08-29 23:10:36 +0200
committerVeikka Tuominen <git@vexu.eu>2023-09-09 15:49:18 +0300
commit4d1432299fe5dccef1e8254800e365c4d6c0d435 (patch)
treee9206b8f21e4c3bd5d6c579ad989864a18ce39d9 /build.zig
parentf33bb0228b40a1171fafad40415bd5744e617e21 (diff)
downloadzig-4d1432299fe5dccef1e8254800e365c4d6c0d435.tar.gz
zig-4d1432299fe5dccef1e8254800e365c4d6c0d435.zip
ci: use zig build check-fmt instead of zig fmt --check
We already have a zig build step for this: test-fmt. * Rename the test-fmt step to check-fmt. test-fmt sounds like it runs tests for `zig fmt` itself (lib/std/zig/render.zig). * Use it instead of `zig fmt --check` in the CI scripts. * Also use it in CI scripts that didn't have this check before.
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig9
1 files changed, 7 insertions, 2 deletions
diff --git a/build.zig b/build.zig
index 5211a9a70a..eff017ce22 100644
--- a/build.zig
+++ b/build.zig
@@ -422,13 +422,18 @@ 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"};
+ const fmt_exclude_paths = &.{
+ "test/cases",
+ // This is for the CI scripts.
+ "build-debug",
+ "build-release",
+ };
const do_fmt = b.addFmt(.{
.paths = fmt_include_paths,
.exclude_paths = fmt_exclude_paths,
});
- b.step("test-fmt", "Check source files having conforming formatting").dependOn(&b.addFmt(.{
+ b.step("check-fmt", "Check source files having conforming formatting").dependOn(&b.addFmt(.{
.paths = fmt_include_paths,
.exclude_paths = fmt_exclude_paths,
.check = true,