refs #9906; --errorMax:10 allows stopping after 10 errors

This commit is contained in:
Timothee Cour 2018-12-09 19:11:08 -08:00
commit daaf50ae03
2 changed files with 6 additions and 0 deletions

View file

@ -617,6 +617,11 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
of "run", "r": of "run", "r":
expectNoArg(conf, switch, arg, pass, info) expectNoArg(conf, switch, arg, pass, info)
incl(conf.globalOptions, optRun) incl(conf.globalOptions, optRun)
of "errormax":
# Note: `nim check` (etc) can overwrite this;
# `0` is meaningless and has same effect as `1`
expectArg(conf, switch, arg, pass, info)
conf.errorMax = parseInt(arg)
of "verbosity": of "verbosity":
expectArg(conf, switch, arg, pass, info) expectArg(conf, switch, arg, pass, info)
let verbosity = parseInt(arg) let verbosity = parseInt(arg)

View file

@ -103,6 +103,7 @@ Advanced options:
value = number of processors (0 for auto-detect) value = number of processors (0 for auto-detect)
--incremental:on|off only recompile the changed modules (experimental!) --incremental:on|off only recompile the changed modules (experimental!)
--verbosity:0|1|2|3 set Nim's verbosity level (1 is default) --verbosity:0|1|2|3 set Nim's verbosity level (1 is default)
--errorMax:int stop after n (>=1) errors in semantic pass
--experimental:$1 --experimental:$1
enable experimental language feature enable experimental language feature
-v, --version show detailed version information -v, --version show detailed version information