zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit a8edd67d3d87b585ebbea226bb916ee1f7263458 (tree)
parent 1fa2b37d2948e0e2672785feeb38b30ad72de76f
Author: Ali Chraghi <alichraghi@pm.me>
Date:   Tue,  7 Feb 2023 16:34:03 +0330

zig fmt: additionally format .zon files

Diffstat:
Msrc/main.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.zig b/src/main.zig @@ -4523,7 +4523,7 @@ fn fmtPathDir( if (is_dir and (mem.eql(u8, entry.name, "zig-cache") or mem.eql(u8, entry.name, "zig-out"))) continue; - if (is_dir or entry.kind == .File and mem.endsWith(u8, entry.name, ".zig")) { + if (is_dir or entry.kind == .File and (mem.endsWith(u8, entry.name, ".zig") or mem.endsWith(u8, entry.name, ".zon"))) { const full_path = try fs.path.join(fmt.gpa, &[_][]const u8{ file_path, entry.name }); defer fmt.gpa.free(full_path);