summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-12-26 22:43:14 +0100
committerAraq <rumpf_a@web.de>2014-12-26 22:43:14 +0100
commitcaf2f6ecfea021fe0d25e5f49e2f318c371324d1 (patch)
treed0f1a41748a85ccf4ef8d35d094572c4fd6fd67a /compiler
parent4db50dcd84043e086b2d56f33aee7f4998e4062e (diff)
downloadNim-caf2f6ecfea021fe0d25e5f49e2f318c371324d1.tar.gz
implemented --bestEffort switch for nimfix
Diffstat (limited to 'compiler')
-rw-r--r--compiler/nimfix/nimfix.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/nimfix/nimfix.nim b/compiler/nimfix/nimfix.nim
index 7b42537c4..918f58e3d 100644
--- a/compiler/nimfix/nimfix.nim
+++ b/compiler/nimfix/nimfix.nim
@@ -26,12 +26,13 @@ Options:
   --styleCheck:on|off|auto         performs style checking for identifiers
                                    and suggests an alternative spelling; 
                                    'auto' corrects the spelling.
+  --bestEffort                     try to fix the code even when there
+                                   are errors.
 
 In addition, all command line options of Nim are supported.
 """
 
 proc mainCommand =
-  #msgs.gErrorMax = high(int)  # do not stop after first error
   registerPass verbosePass
   registerPass semPass
   gCmd = cmdPretty
@@ -63,13 +64,14 @@ proc processCmdLine*(pass: TCmdLinePass, cmd: string) =
         of "on": gCheckExtern = true
         of "off": gCheckExtern = false
         else: localError(gCmdLineInfo, errOnOrOffExpected)
-      of "stylecheck": 
+      of "stylecheck":
         case p.val.normalize
         of "off": gStyleCheck = StyleCheck.None
         of "on": gStyleCheck = StyleCheck.Warn
         of "auto": gStyleCheck = StyleCheck.Auto
         else: localError(gCmdLineInfo, errOnOrOffExpected)
       of "wholeproject": gOnlyMainfile = false
+      of "besteffort": msgs.gErrorMax = high(int) # dont stop after first error
       else:
         processSwitch(pass, p)
     of cmdArgument: