Finding and formatting all .zon files in a build.zig b.addFmt() step

Have you verified this alone isn’t enough? zig fmt . will format all .zig and .zon files recursively.

$ zig fmt .
./dir/recur.zon
./test.zon

Here’s what the zig build fmt step looks like for the main Zig repository FWIW:

6 Likes