diff options
-rw-r--r-- | compiler/main.nim | 18 | ||||
-rw-r--r-- | doc/advopt.txt | 1 |
2 files changed, 18 insertions, 1 deletions
diff --git a/compiler/main.nim b/compiler/main.nim index 6afe57d87..fb8fe8443 100644 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -266,11 +266,27 @@ proc mainCommand*(graph: ModuleGraph) = var libpaths = newJArray() for dir in conf.searchPaths: libpaths.elems.add(%dir.string) + var hints = block: # consider factoring with `listHints` + var ret = newJObject() + for a in hintMin..hintMax: + let key = lineinfos.HintsToStr[ord(a) - ord(hintMin)] + ret[key] = % (a in conf.notes) + ret + var warnings = block: # consider factoring with `listWarnings` + var ret = newJObject() + for a in warnMin..warnMax: + let key = lineinfos.WarningsToStr[ord(a) - ord(warnMin)] + ret[key] = % (a in conf.notes) + ret + var dumpdata = % [ (key: "version", val: %VersionAsString), (key: "project_path", val: %conf.projectFull.string), (key: "defined_symbols", val: definedSymbols), - (key: "lib_paths", val: libpaths) + (key: "lib_paths", val: %libpaths), + (key: "out", val: %conf.outFile.string), + (key: "hints", val: hints), + (key: "warnings", val: warnings), ] msgWriteln(conf, $dumpdata, {msgStdout, msgSkipHook}) diff --git a/doc/advopt.txt b/doc/advopt.txt index 7cd72f6c3..7677ba0d3 100644 --- a/doc/advopt.txt +++ b/doc/advopt.txt @@ -13,6 +13,7 @@ Advanced commands: //genDepend generate a DOT file containing the module dependency graph //dump dump all defined conditionals and search paths + see also: --dump.format:json (useful with: ` | jq`) //check checks the project for syntax and semantic Advanced options: |