Merge pull request #9916 from timotheecour/pr_ref_9906_errorMax
refs #9906; --errorMax:10 allows stopping after 10 errors (more robust than nim check)
This commit is contained in:
commit
c58f430e2e
2 changed files with 10 additions and 0 deletions
|
|
@ -617,6 +617,15 @@ 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":
|
||||||
|
expectArg(conf, switch, arg, pass, info)
|
||||||
|
conf.errorMax = block:
|
||||||
|
# Note: `nim check` (etc) can overwrite this.
|
||||||
|
# `0` is meaningless, give it a useful meaning as in clang's -ferror-limit
|
||||||
|
# If user doesn't set this flag and the code doesn't either, it'd
|
||||||
|
# have the same effect as errorMax = 1
|
||||||
|
let ret = parseInt(arg)
|
||||||
|
if ret == 0: high(int) else: ret
|
||||||
of "verbosity":
|
of "verbosity":
|
||||||
expectArg(conf, switch, arg, pass, info)
|
expectArg(conf, switch, arg, pass, info)
|
||||||
let verbosity = parseInt(arg)
|
let verbosity = parseInt(arg)
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,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 errors in semantic pass; 0 means unlimited
|
||||||
--experimental:$1
|
--experimental:$1
|
||||||
enable experimental language feature
|
enable experimental language feature
|
||||||
-v, --version show detailed version information
|
-v, --version show detailed version information
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue