Skip to content

Commit 87fd800

Browse files
Add linting section on practice exercise .meta/config.json validation
1 parent c92613b commit 87fd800

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

building/configlet/lint.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,34 @@ The `config.json` file should have the following checks:
215215
- The Markdown must conform to the [Markdown standards](../../../contributing/standards/markdown.md)
216216
- Links must be absolute (relative links are not allowed)
217217

218+
### Rule: exercises/practice/<slug>/.meta/config.json is valid
219+
220+
- The file must be valid JSON
221+
- The JSON root must be an object
222+
- The `"authors"` key is optional
223+
- The `"authors"` value must be an array
224+
- The `"authors"` values must be non-empty, non-blank strings
225+
- The `"authors"` values must not have duplicates
226+
- The `"authors"` values are treated case-insensitively
227+
- The `"contributors"` key is optional
228+
- The `"contributors"` value must be an array
229+
- The `"contributors"` values must be non-empty, non-blank strings
230+
- The `"contributors"` values must not have duplicates
231+
- The `"contributors"` values are treated case-insensitively
232+
- Users can only be listed in either the `"authors"` or `"contributors"` array (no overlap)
233+
- The `"files.solution"` key is required
234+
- The `"files.solution"` value must be a non-empty array
235+
- The `"files.test"` key is required
236+
- The `"files.test"` value must be a non-empty array
237+
- The `"files.example"` key is required
238+
- The `"files.example"` value must be a non-empty array
239+
- The files listed in the `"files.solution"` must exist
240+
- The files listed in the `"files.test"` must exist
241+
- The files listed in the `"files.example"` must exist
242+
- Files can only be listed in either the `"files.solution"`, `"files.test"` or `"files.example` array (no overlap)
243+
- The `"language_versions"` key is optional
244+
- The `"language_versions"` value must be a string
245+
218246
### Rule: exercises/shared/.docs/cli.md is valid
219247

220248
- The Markdown must conform to the [Markdown standards](../../../contributing/standards/markdown.md)

0 commit comments

Comments
 (0)