Ensure the exercises use the canonical format

Add the check-exercises.py tool in the new tools directory.  It is used
to check that the exercises are correctly formatted, printing on stderr
the invalid ones and the diff in the unified format.

Update the exercises that don't use the canonical zig fmt format.

Update some patches that cause the generated zig file to be incorrectly
formatted.
This commit is contained in:
Manlio Perillo
2023-04-16 12:23:10 +02:00
parent b59bef29b9
commit 6b17a18893
10 changed files with 127 additions and 30 deletions

View File

@@ -18,8 +18,8 @@ pub fn main() void {
//
// Don't change this part:
//
// = .{'h', 'e', 'l', 'l', 'o'};
// = .{ 'h', 'e', 'l', 'l', 'o' };
//
const hello = .{'h', 'e', 'l', 'l', 'o'};
const hello = .{ 'h', 'e', 'l', 'l', 'o' };
print("I say {s}!\n", .{hello});
}