zig

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

commit 3599fb9bfc221c37cdd59d3b19a10eff63a4170e (tree)
parent 391d81a3802e48f59d804746eedc396d60ad3820
Author: Lee Cannon <leecannon@leecannon.xyz>
Date:   Wed,  9 Dec 2020 07:45:54 +0000

Fixes #7352 - ignore zig fmt ignore zig-cache

Diffstat:
Msrc/main.zig | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/main.zig b/src/main.zig @@ -2655,6 +2655,9 @@ fn fmtPathDir( var dir_it = dir.iterate(); while (try dir_it.next()) |entry| { const is_dir = entry.kind == .Directory; + + if (is_dir and std.mem.eql(u8, entry.name, "zig-cache")) continue; + if (is_dir or mem.endsWith(u8, entry.name, ".zig")) { const full_path = try fs.path.join(fmt.gpa, &[_][]const u8{ file_path, entry.name }); defer fmt.gpa.free(full_path);