From 1de63ad79331aec9f53a7a9d95069fd0ca5f66f4 Mon Sep 17 00:00:00 2001 From: Cody Tapscott Date: Wed, 23 Mar 2022 23:05:33 -0700 Subject: zig fmt: Add `--exclude` argument to skip dir/file This change adds a "--exclude" parameter to zig format, which can be used to make sure that it does not process certain files or folders when recursively walking a directory. To do this, we simply piggy-back on the existing "seen" logic in zig fmt and mark these files/folders as seen before processing begins. --- ci/zinc/linux_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ci') diff --git a/ci/zinc/linux_test.sh b/ci/zinc/linux_test.sh index 9b0734b170..739d85cff0 100755 --- a/ci/zinc/linux_test.sh +++ b/ci/zinc/linux_test.sh @@ -45,7 +45,7 @@ cd $WORKSPACE # Look for non-conforming code formatting. # Formatting errors can be fixed by running `zig fmt` on the files printed here. -$ZIG fmt --check . +$ZIG fmt --check . --exclude test/compile_errors/ # Build stage2 standalone so that we can test stage2 against stage2 compiler-rt. $ZIG build -p stage2 -Denable-llvm -Duse-zig-libcxx -- cgit v1.2.3