nim styleChecker: implemented all the missing features (bugfix)

This commit is contained in:
Araq 2019-07-10 00:27:23 +02:00
commit bd689849f2
7 changed files with 111 additions and 51 deletions

View file

@ -588,3 +588,10 @@ proc listHints*(conf: ConfigRef) =
if hint in conf.notes: "x" else: " ",
lineinfos.HintsToStr[ord(hint) - ord(hintMin)]
])
proc lintReport*(conf: ConfigRef; info: TLineInfo, beau, got: string) =
let m = "'$2' should be: '$1'" % [beau, got]
if optStyleError in conf.globalOptions:
localError(conf, info, m)
else:
message(conf, info, hintName, m)