no more code duplication bw liMessage and rawMessage + several bug fixes (#14415)

* no more code duplication bw rawMessage and liMessage; fixes some bugs in rawMessage
* all compiler messages work with hint:msgorigin
This commit is contained in:
Timothee Cour 2020-05-22 03:02:10 -07:00 • committed by GitHub
commit 0d0ea3a11e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 91 additions and 152 deletions

View file

@ -345,12 +345,10 @@ proc mainCommand*(graph: ModuleGraph) =
var hints = newJObject() # consider factoring with `listHints`
for a in hintMin..hintMax:
let key = lineinfos.HintsToStr[ord(a) - ord(hintMin)]
hints[key] = %(a in conf.notes)
hints[a.msgToStr] = %(a in conf.notes)
var warnings = newJObject()
for a in warnMin..warnMax:
let key = lineinfos.WarningsToStr[ord(a) - ord(warnMin)]
warnings[key] = %(a in conf.notes)
warnings[a.msgToStr] = %(a in conf.notes)
var dumpdata = %[
(key: "version", val: %VersionAsString),