Skip to content

Commit

Permalink
Document key for exercise files (exercism#407)
Browse files Browse the repository at this point in the history
Document  key for exercise  iles

Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>
  • Loading branch information
ErikSchierboom and ee7 authored Nov 15, 2022
1 parent e3a0faa commit 24881b8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions building/configlet/lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ The `config.json` file should have the following checks:
- The `"forked_from"` values must not have duplicates
- The `"language_versions"` key is optional
- The `"language_versions"` value must be a string
- The `"representer.version"` key is optional
- The `"representer.version"` value must be an integer >= 1
- The `"icon"` key is optional
- The `"icon"` value must be a kebab-case string²

Expand Down Expand Up @@ -321,6 +323,8 @@ The `config.json` file should have the following checks:
- The `"language_versions"` value must be a string
- The `"test_runner"` key is optional
- The `"test_runner"` value must be a boolean
- The `"representer.version"` key is optional
- The `"representer.version"` value must be an integer >= 1

### Rule: exercises/{concept|practice}/&lt;slug&gt;/.approaches/config.json is valid

Expand Down
5 changes: 5 additions & 0 deletions building/tracks/concept-exercises.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ This file contains meta information on the exercise:
- `blurb`: A short description of this exercise. Its length must be <= 350. Markdown is _not_ supported (required)
- `source`: The source this exercise is based on (optional)
- `source_url`: The URL of the source this exercise is based on (optional)
- `representer`: Meta information related to how the representer processes this file (optional)
- `version`: An integer for the version of the representer to use for the exercise (required if parent key is present)
- `icon`: The slug of the icon (see [the full list of icons][exercise-icons]). If not specified, the exercise's slug will be used (optional)

If someone is both an author _and_ a contributor, only list that person as an author.
Expand Down Expand Up @@ -362,6 +364,9 @@ Assume that the user `FSharpForever` has written an exercise called `log-levels`
"blurb": "Learn how to work with strings by processing log lines.",
"source": "Wikipedia",
"source_url": "https://en.wikipedia.org/wiki/Log_file",
"representer": {
"version": 2
},
"icon": "logs"
}
```
Expand Down
2 changes: 2 additions & 0 deletions building/tracks/practice-exercises.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ This file contains meta information on the exercise:
- `source`: The source this exercise is based on (optional)
- `source_url`: The URL of the source this exercise is based on (optional)
- `test_runner`: Indicates if solutions of this exercise should be tested in the test runner. Defaults to `true` if not specified. (optional)
- `representer`: Meta information related to how the representer processes this file (optional)
- `version`: An integer for the version of the representer to use for the exercise (required if parent key is present)
- `icon`: The slug of the icon (see [the full list of icons][exercise-icons]). If not specified, the exercise's slug will be used (optional)

If someone is both an author _and_ a contributor, only list that person as an author.
Expand Down

0 comments on commit 24881b8

Please sign in to comment.