From e7a86c93e1eb814d13d7d284fbc660e00a31b1fb Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Fri, 9 Oct 2020 13:48:51 +0200 Subject: [PATCH] Add README (#23) * Add README * Make exit code terminating more clear --- README.md | 29 +++++++++++++++++++++++++++++ src/arguments.nim | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..4212984a --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# Exercism Canonical Data Syncer + +This small application is used to help Exercism tracks keep their exercise-specific `tests.toml` files in sync with the latest canonical data in the [problem-specifications repo](https://github.com/exercism/problem-specifications). + +## Usage + +The application is a single binary and can be used as follows: + +``` +Usage: canonicaldatasyncer [options] + +Options: + -e, --exercise Only sync this exercise + -c, --check Check if there missing tests. Doesn't update the tests. Terminates with a non-zero exit code if any one or more test cases are missing. + -d, --default What to do with missing test cases. Allowed values: c[hoose], i[nclude], e[xclude] + -o, --verbosity The verbosity of output. Allowed values: q[uiet], n[ormal], d[etailed] + -h, --help Show CLI usage + -v, --version Display version information +``` + +Running the application will prompt the user to choose whether to include or exclude missing tests. It will update the `tests.toml` file accordingly. If you only want a quick check, you can use the `--check` option. + +## Use in your track + +To use the application in your track, you can copy the [`scripts/fetch-canonicaldatasyncer`](./scripts/fetch-canonicaldatasyncer) and/or [`scripts/fetch-canonicaldatasyncer.ps1`](./scripts/fetch-canonicaldatasyncer.ps1) files to your track's repository. Running either of these scripts will download the latest version of the `canonicaldatasyncer` tool to your track's `bin` directory. + +## Contributing + +Bug reports and pull requests are welcome on GitHub at https://github.com/exercism/canonical-data-syncer. diff --git a/src/arguments.nim b/src/arguments.nim index 39db95b6..c7da74f8 100644 --- a/src/arguments.nim +++ b/src/arguments.nim @@ -34,7 +34,7 @@ proc showHelp* = Options: -{ExerciseArgument.short}, --{ExerciseArgument.long} Only sync this exercise - -{CheckArgument.short}, --{CheckArgument.long} Check if there missing tests. Doesn't update the tests + -{CheckArgument.short}, --{CheckArgument.long} Check if there missing tests. Doesn't update the tests. Terminates with a non-zero exit code if any one or more tests are missing. -{DefaultArgument.short}, --{DefaultArgument.long} What to do with missing test cases. Allowed values: c[hoose], i[nclude], e[xclude] -{VerbosityArgument.short}, --{VerbosityArgument.long} The verbosity of output. Allowed values: q[uiet], n[ormal], d[etailed] -{HelpArgument.short}, --{HelpArgument.long} Show CLI usage