Exercism exercises in Tcl.
Tcl installation is described in the INSTALLATION document.
Please read the CONTRIBUTING doc.
At the most basic level, Exercism is all about the tests. You can read more about how we think about test suites in the Exercism documentation.
Tcl test files use the tcltest core package. Here are two excellent introductory overviews:
- Getting started with tcltest
- Getting Started with tcltest (goes more in-depth)
If you plan to make significant or breaking changes, please create a topic on the forum so we can discuss it first.
Pull requests should be focused on a single exercise, issue, or conceptually cohesive change. Please refer to Exercism's pull request guidelines.
Please follow the existing coding style for Tcl. (TODO: reference one...)
Before submitting your pull request, you'll want to verify the changes in two ways:
- Run all the tests for the Tcl exercises
- Run an Exercism-specific linter to verify the track
All the tests for Tcl exercises can be run from the top level of the repo with:
bin/test_all_exercisesTo test a single exercise:
bin/test_one_exercise exercises/practice/<slug>To run the linter, use the configlet tool (you can fetch it with bin/fetch-configlet if needed):
bin/configlet lintPlease see CONTRIBUTING.md and the documentation about adding new exercises.
Note that:
-
Each exercise must stand on its own. Do not reference files outside the exercise directory. They will not be included when the user fetches the exercise.
-
Exercises should use only the Tcl core libraries.
-
Exercises must conform to the Exercism-wide standards described in the documentation.
-
Each exercise should have a test suite, an example solution and a stub file for the real implementation. Use the
canonical-data.jsonfile for the exercise from the problem-specifications repo to guide your test implementation. -
Exercises follow this layout:
exercises/practice/ └── hello-world/ # (dir name == "slug" name) ├── .docs/ │ └── instructions.md ├── .meta/ │ ├── config.json │ ├── example.tcl │ └── tests.toml ├── hello-world.tcl # "slug".tcl ├── hello-world.test # "slug".test └── testHelpers.tcl -
Use
bin/add-practice-exercise <slug>to scaffold the exercise directory and add it toconfig.json.