How to limit issues per answer (maxIssues)

Set maxIssues in clearrun.config.json. Any answer with more issues than that number fails, and the run exits 1. There is no command-line flag for it.

Last updated

Steps

  1. Add maxIssues to the config file

    {
      "paths": ["responses/"],
      "maxIssues": 2
    }

    It must be a whole number, 0 or more. 0 means any issue fails.

  2. Run the score

    clearrun score

    A failing answer shows a line such as Failed: 3 issues, maxIssues is 2.

Use it with a threshold

maxIssues and threshold work together. An answer must pass both.

If the config is rejected

Config "maxIssues" must be a whole number, 0 or more means the value is negative, a decimal, or in quotes.