Skip to content

Commit 5c5f2cb

Browse files
Add CLI tooling docs (#504)
1 parent c7abdb7 commit 5c5f2cb

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

building/config.json

+7
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,13 @@
820820
"title": "Snippet Extractor",
821821
"blurb": ""
822822
},
823+
{
824+
"uuid": "0d24b14c-8995-4ca5-8e5f-6ca2dcc5318c",
825+
"slug": "tooling/cli",
826+
"path": "building/tooling/cli.md",
827+
"title": "Exercism CLI",
828+
"blurb": ""
829+
},
823830
{
824831
"uuid": "ba393f61-0f7d-4178-922a-c16cda052338",
825832
"slug": "tooling/test-generators",

building/tooling/cli.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Exercism CLI
2+
3+
The [Exercism CLI][cli] lets students download exercises and submit solutions to the site.
4+
It also supports the `exercism test` command, which then runs the track-specific command to run the tests.
5+
6+
## Adding new language
7+
8+
The track-specific test commands are defined in a [configuration file][test-configurations].
9+
You can add support for your language by adding an entry to that [configuration file][test-configurations], where the key is the track's slug.
10+
11+
### Test command placeholders
12+
13+
There are two placeholders that can be used in the track-specific command:
14+
15+
- `{{test_files}}`: a space-separated list of the test files (as found in the `.files.test` key in the exercise's `.meta/config.json` file)
16+
- `{{solution_files}}`: a space-separated list of the solution files (as found in the `.files.solution` key in the exercise's `.meta/config.json` file)
17+
18+
Here is an [example pull request][example-pr] that adds support for the Arturo language.
19+
20+
[cli]: https://github.com/exercism/cli
21+
[example-pr]: https://github.com/exercism/cli/pull/1147/files
22+
[test-configurations]: https://github.com/exercism/cli/blob/main/workspace/test_configurations.go#L63
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Configure tooling
22

3-
There are two bits of tooling that you can optionally tweak for your track:
3+
There are three bits of tooling that you can optionally tweak for your track:
44

55
- The **[Lines of Code Counter](/docs/building/tooling/lines-of-code-counter)**
66
- The **[Snippet Extractor](/docs/building/tooling/snippet-extractor)**
7+
- The **[Exercism CLI](/docs/building/tooling/cli)**
78

89
While tweaking these tools is optional, doing so can make your track's integration into the website just _that_ bit better.

0 commit comments

Comments
 (0)