authorgravatar for danielchasehooper@gmail.comDaniel Hooper <danielchasehooper@gmail.com> 2024-11-11 01:24:14-08:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-11-11 01:24:14-08:00
log560d6b99d5be8e906b7d8d70a2b2e1f1d4da4f89
tree0cc72dd625b7b6cb72d0b0d2161aaac0c21e040a
parentf83bb94ca6aec933713f91b73b8a487a701dbfcd
signaturebadge-check Signed by PGP key B5690EEEBB952194

Fix silent zig fmt errors (#21948)


1 files changed, 2 insertions(+), 3 deletions(-)

lib/compiler/fmt.zig+2-3
...@@ -3,7 +3,6 @@ const mem = std.mem;...@@ -3,7 +3,6 @@ const mem = std.mem;
3const fs = std.fs;3const fs = std.fs;
4const process = std.process;4const process = std.process;
5const Allocator = std.mem.Allocator;5const Allocator = std.mem.Allocator;
6const warn = std.log.warn;
7const Color = std.zig.Color;6const Color = std.zig.Color;
87
9const usage_fmt =8const usage_fmt =
...@@ -214,7 +213,7 @@ fn fmtPath(fmt: *Fmt, file_path: []const u8, check_mode: bool, dir: fs.Dir, sub_...@@ -214,7 +213,7 @@ fn fmtPath(fmt: *Fmt, file_path: []const u8, check_mode: bool, dir: fs.Dir, sub_
214 fmtPathFile(fmt, file_path, check_mode, dir, sub_path) catch |err| switch (err) {213 fmtPathFile(fmt, file_path, check_mode, dir, sub_path) catch |err| switch (err) {
215 error.IsDir, error.AccessDenied => return fmtPathDir(fmt, file_path, check_mode, dir, sub_path),214 error.IsDir, error.AccessDenied => return fmtPathDir(fmt, file_path, check_mode, dir, sub_path),
216 else => {215 else => {
217 warn("unable to format '{s}': {s}", .{ file_path, @errorName(err) });216 std.log.err("unable to format '{s}': {s}", .{ file_path, @errorName(err) });
218 fmt.any_error = true;217 fmt.any_error = true;
219 return;218 return;
220 },219 },
...@@ -248,7 +247,7 @@ fn fmtPathDir(...@@ -248,7 +247,7 @@ fn fmtPathDir(
248 try fmtPathDir(fmt, full_path, check_mode, dir, entry.name);247 try fmtPathDir(fmt, full_path, check_mode, dir, entry.name);
249 } else {248 } else {
250 fmtPathFile(fmt, full_path, check_mode, dir, entry.name) catch |err| {249 fmtPathFile(fmt, full_path, check_mode, dir, entry.name) catch |err| {
251 warn("unable to format '{s}': {s}", .{ full_path, @errorName(err) });250 std.log.err("unable to format '{s}': {s}", .{ full_path, @errorName(err) });
252 fmt.any_error = true;251 fmt.any_error = true;
253 return;252 return;
254 };253 };