summary refs log tree commit diff stats
path: root/compiler/suggest.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-07-10 00:27:23 +0200
committerAraq <rumpf_a@web.de>2019-07-10 00:29:58 +0200
commitbd689849f28ba98b9b2581605234a2b52fb2e392 (patch)
tree868b293cda5151623b6083044bd7a7a0c187713e /compiler/suggest.nim
parentc6c9e30379dbf1016f336495b073b233fe1a2563 (diff)
downloadNim-bd689849f28ba98b9b2581605234a2b52fb2e392.tar.gz
nim styleChecker: implemented all the missing features (bugfix)
Diffstat (limited to 'compiler/suggest.nim')
-rw-r--r--compiler/suggest.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/suggest.nim b/compiler/suggest.nim
index e98451510..705d723d1 100644
--- a/compiler/suggest.nim
+++ b/compiler/suggest.nim
@@ -32,7 +32,7 @@
 
 # included from sigmatch.nim
 
-import algorithm, prefixmatches, lineinfos, pathutils, parseutils
+import algorithm, prefixmatches, lineinfos, pathutils, parseutils, linter
 from wordrecg import wDeprecated, wError, wAddr, wYield, specialWords
 
 when defined(nimsuggest):
@@ -539,6 +539,8 @@ proc markUsed(conf: ConfigRef; info: TLineInfo; s: PSym; usageSym: var PSym) =
     if sfError in s.flags: userError(conf, info, s)
   when defined(nimsuggest):
     suggestSym(conf, info, s, usageSym, false)
+  if {optStyleHint, optStyleError} * conf.globalOptions != {}:
+    styleCheckUse(conf, info, s)
 
 proc safeSemExpr*(c: PContext, n: PNode): PNode =
   # use only for idetools support!