correctly honor cmdline --hint:conf:on/off ; correctly show Conf hints in order

This commit is contained in:
Timothee Cour 2020-02-24 19:20:52 -08:00 • committed by Andreas Rumpf
commit ce36fdc897
6 changed files with 18 additions and 3 deletions

View file

@ -231,6 +231,8 @@ type
foreignPackageNotes*: TNoteKinds
notes*: TNoteKinds
mainPackageNotes*: TNoteKinds
cmdLineNotes*: TNoteKinds
cmdLineDisabledNotes*: TNoteKinds
mainPackageId*: int
errorCounter*: int
hintCounter*: int
@ -286,6 +288,7 @@ type
structuredErrorHook*: proc (config: ConfigRef; info: TLineInfo; msg: string;
severity: Severity) {.closure, gcsafe.}
cppCustomNamespace*: string
isCmdLine*: bool # whether we are currently processing cmdline args, not cfg files
proc hasHint*(conf: ConfigRef, note: TNoteKind): bool =
optHints in conf.options and note in conf.notes
@ -391,6 +394,7 @@ proc newConfigRef*(): ConfigRef =
arguments: "",
suggestMaxResults: 10_000,
maxLoopIterationsVM: 10_000_000,
isCmdLine: false,
)
setTargetFromSystem(result.target)
# enable colors by default on terminals