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

  1. Create the file

    {
      "paths": ["responses/", "answer.txt"],
      "threshold": 70,
      "maxIssues": 3
    }
  2. Run clearrun score

    clearrun score

Fields

Fields
FieldWhat it does
pathsFiles and folders to score, relative to the config file
threshold0 to 100. Fail any answer below it
maxIssuesWhole number. Fail any answer with more issues
baseUrlAPI base URL. Default https://api.clearrun.net
apiKeyAvoid. 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.