How to set up clearrun.config.json
Create clearrun.config.json in your project folder with the paths to score and your rules. Then clearrun score with no arguments uses it. Every field is optional.
Last updated
Steps
Create the file
{ "paths": ["responses/", "answer.txt"], "threshold": 70, "maxIssues": 3 }Run clearrun score
clearrun score
Fields
| Field | What it does |
|---|---|
paths | Files and folders to score, relative to the config file |
threshold | 0 to 100. Fail any answer below it |
maxIssues | Whole number. Fail any answer with more issues |
baseUrl | API base URL. Default https://api.clearrun.net |
apiKey | Avoid. Use CLEARRUN_API_KEY or clearrun login instead |
Flags win
--threshold and --base-url on the command line override the file. Paths given on the command line replace paths.
Keep the key out
The config file is usually committed. Don't put apiKey in it. See How to keep ClearRun API keys out of your repo.