You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,52 @@ Exercises can be tested against the test runner using
26
26
bin/verify-exercises-in-docker
27
27
```
28
28
29
+
## Formatting and linting
30
+
31
+
CI runs the following checks on every pull request, so please run them locally before submitting.
32
+
33
+
All Zig code — exercise stubs, example solutions and test files — must be formatted with `zig fmt`:
34
+
35
+
```bash
36
+
zig fmt --check .
37
+
```
38
+
39
+
The remaining checks use [configlet], Exercism's track maintenance tool.
40
+
Fetch it once before running any `bin/configlet` command — this downloads the binary to `bin/configlet`:
41
+
42
+
```sh
43
+
bin/fetch-configlet
44
+
```
45
+
46
+
Or for Windows:
47
+
48
+
```sh
49
+
bin/fetch-configlet.ps1
50
+
```
51
+
52
+
The track configuration must pass configlet's linter, and the JSON files must be formatted with configlet's formatter:
53
+
54
+
```bash
55
+
bin/configlet lint
56
+
bin/configlet fmt --update
57
+
```
58
+
59
+
When adding an exercise or an approach, generate any new UUIDs with configlet:
60
+
61
+
```bash
62
+
bin/configlet uuid
63
+
```
64
+
65
+
Practice-exercise test files are generated from the canonical data in [`problem-specifications`][problem-specifications]; edit the generator in `generators/exercises/` and regenerate:
0 commit comments