* honor --errorMax even for tools (eg drnim, nim doc) (#14546)
* fix a bug that prevented nim doc compiler/nim on windows
This commit is contained in:
parent
621384b8ef
commit
4301a3da9d
9 changed files with 22 additions and 15 deletions
|
|
@ -315,6 +315,14 @@ type
|
|||
severity: Severity) {.closure, gcsafe.}
|
||||
cppCustomNamespace*: string
|
||||
|
||||
proc assignIfDefault*[T](result: var T, val: T, def = default(T)) =
|
||||
## if `result` was already assigned to a value (that wasn't `def`), this is a noop.
|
||||
if result == def: result = val
|
||||
|
||||
template setErrorMaxHighMaybe*(conf: ConfigRef) =
|
||||
## do not stop after first error (but honor --errorMax if provided)
|
||||
assignIfDefault(conf.errorMax, high(int))
|
||||
|
||||
proc setNoteDefaults*(conf: ConfigRef, note: TNoteKind, enabled = true) =
|
||||
template fun(op) =
|
||||
conf.notes.op note
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue