|
|
@@ -9,6 +9,8 @@
|
|
9
|
9
|
* [Advanced: Complete Local Setup](#advanced-complete-local-setup)
|
|
10
|
10
|
* [Tip: `gradle clean` before `exercism fetch`](#tip-gradle-clean-before-exercism-fetch)
|
|
11
|
11
|
* [Adding a New Exercise](#adding-a-new-exercise)
|
|
|
12
|
+* [Updating the READMEs](#updating-the-readmes)
|
|
|
13
|
+* [Checking tests are up to date](#checking-tests-are-up-to-date)
|
|
12
|
14
|
|
|
13
|
15
|
## Overview
|
|
14
|
16
|
|
|
|
@@ -184,3 +186,33 @@ See other exercises, e.g. [acronym](https://github.com/exercism/java/tree/master
|
|
184
|
186
|
|
|
185
|
187
|
Hopefully that should be enough information to help you port an exercise to the Java track.
|
|
186
|
188
|
Feel free to open an issue or post in the [Gitter exercism/java room](https://gitter.im/exercism/java) if you have any questions and we'll try and answer as soon as we can.
|
|
|
189
|
+
|
|
|
190
|
+## Updating the READMEs
|
|
|
191
|
+
|
|
|
192
|
+The `README.md` files are generated from the exercise descriptions in [problem specifications](https://github.com/exercism/problem-specifications/tree/master/exercises).
|
|
|
193
|
+They need to be regenerated regularly so that any changes to the descriptions in problem specifications propagate to our REAMEs.
|
|
|
194
|
+This can be done using [configlet](https://github.com/exercism/configlet/releases):
|
|
|
195
|
+
|
|
|
196
|
+ 1. Download configlet and put it somewhere in your PATH
|
|
|
197
|
+
|
|
|
198
|
+ 2. Clone [the problem-specifications repository](https://github.com/exercism/problem-specifications).
|
|
|
199
|
+
|
|
|
200
|
+ 3. Run `configlet generate . --spec-path path_to_problem_specifications` from the root of this repository.
|
|
|
201
|
+
|
|
|
202
|
+## Checking tests are up to date
|
|
|
203
|
+
|
|
|
204
|
+The tests for each exercise should follow the canonical data in [problem specifications](https://github.com/exercism/problem-specifications/tree/master/exercises) as closely as possible.
|
|
|
205
|
+The canonical data can change quite regularly, in which case the [canonical data version](https://github.com/exercism/problem-specifications#test-data-versioning) for that exercise will be updated.
|
|
|
206
|
+
|
|
|
207
|
+We keep track of which version of the canonical data each exercise implements in a version file, for example: https://github.com/exercism/java/blob/master/exercises/two-fer/.meta/version.
|
|
|
208
|
+Not all exercises have canonical data in problem specifications.
|
|
|
209
|
+For those that don't we don't add a version file.
|
|
|
210
|
+
|
|
|
211
|
+We have [a script](https://github.com/exercism/java/blob/master/scripts/canonical_data_check.sh) which can check if these version are up to date with the ones in problem specification.
|
|
|
212
|
+This script can be used to check if any version files, tests and reference implementations need updating.
|
|
|
213
|
+
|
|
|
214
|
+To run this script:
|
|
|
215
|
+
|
|
|
216
|
+ 1. Clone [the problem-specifications repository](https://github.com/exercism/problem-specifications).
|
|
|
217
|
+
|
|
|
218
|
+ 2. Run `./scripts/canonical_data_check.sh -t . -s --spec-path path_to_problem_specifications` from the root of this repository.
|