aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorAli Chraghi <alichraghi@pm.me>2023-02-07 16:34:03 +0330
committerAndrew Kelley <andrew@ziglang.org>2023-02-13 02:20:02 -0500
commita8edd67d3d87b585ebbea226bb916ee1f7263458 (patch)
tree1c9f86b28e277d7b838c57aea7db6ee5b8e72f0a /src/main.zig
parent1fa2b37d2948e0e2672785feeb38b30ad72de76f (diff)
downloadzig-a8edd67d3d87b585ebbea226bb916ee1f7263458.tar.gz
zig-a8edd67d3d87b585ebbea226bb916ee1f7263458.zip
zig fmt: additionally format .zon files
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.zig b/src/main.zig
index f634c259ff..00a7b126c8 100644
--- 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);