Skip to content

Commit dbb049f

Browse files
committed
Update latest zig master
1. Exclude zig-pkg from lint paths (like zig-out) 2. Update child process run options to reflect changes to API in master
1 parent dca9ab8 commit dbb049f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

integration_tests/src/test_runner.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,8 @@ fn runLintCommand(
351351
io,
352352
.{
353353
.argv = args,
354-
.max_output_bytes = max_file_size_bytes,
354+
.stdout_limit = .limited(max_file_size_bytes),
355+
.stderr_limit = .limited(max_file_size_bytes),
355356
.environ_map = map,
356357
},
357358
);

src/lib/files.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ pub fn isLintableFilePath(file_path: []const u8) !bool {
119119
while (components.next()) |component| {
120120
if (std.mem.eql(u8, component.name, ".zig-cache")) return false;
121121
if (std.mem.eql(u8, component.name, "zig-out")) return false;
122+
if (std.mem.eql(u8, component.name, "zig-pkg")) return false;
122123
}
123124

124125
return true;
@@ -155,6 +156,9 @@ test "isLintableFilePath" {
155156
".zig-cache/file.zig",
156157
"./parent/.zig-cache/file.zig",
157158
"/other/parent/.zig-cache/file.zig",
159+
"zig-pkg/file.zig",
160+
"./zig-pkg/file.zig",
161+
"/other/parent/zig-pkg/file.zig",
158162
}) |file_path| {
159163
try std.testing.expect(!try isLintableFilePath(testing.paths.posix(file_path)));
160164
}

0 commit comments

Comments
 (0)