mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-07 12:24:19 +00:00
nimfix now in its own directory; single file mode now the default
This commit is contained in:
@@ -234,7 +234,9 @@ proc processPath(path: string, notRelativeToProj = false): string =
|
||||
path
|
||||
else:
|
||||
options.gProjectPath / path
|
||||
result = unixToNativePath(p % ["nimrod", getPrefixDir(), "lib", libpath,
|
||||
result = unixToNativePath(p % ["nimrod", getPrefixDir(),
|
||||
"nim", getPrefixDir(),
|
||||
"lib", libpath,
|
||||
"home", removeTrailingDirSep(os.getHomeDir()),
|
||||
"projectname", options.gProjectName,
|
||||
"projectpath", options.gProjectPath])
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
import
|
||||
intsets, ast, astalgo, idents, semdata, types, msgs, options, rodread,
|
||||
renderer, wordrecg, idgen, prettybase
|
||||
renderer, wordrecg, idgen, nimfix.prettybase
|
||||
|
||||
proc ensureNoMissingOrUnusedSymbols(scope: PScope)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Usage:
|
||||
Options:
|
||||
--overwriteFiles:on|off overwrite the original nim files.
|
||||
DEFAULT is ON!
|
||||
--onlyMainfile overwrite only the main file.
|
||||
--wholeProject overwrite every processed file.
|
||||
--checkExtern:on|off style check also extern names
|
||||
--styleCheck:on|off|auto performs style checking for identifiers
|
||||
and suggests an alternative spelling;
|
||||
@@ -46,6 +46,7 @@ proc mainCommand =
|
||||
proc processCmdLine*(pass: TCmdLinePass, cmd: string) =
|
||||
var p = parseopt.initOptParser(cmd)
|
||||
var argsCount = 0
|
||||
gOnlyMainfile = true
|
||||
while true:
|
||||
parseopt.next(p)
|
||||
case p.kind
|
||||
@@ -68,7 +69,7 @@ proc processCmdLine*(pass: TCmdLinePass, cmd: string) =
|
||||
of "on": gStyleCheck = StyleCheck.Warn
|
||||
of "auto": gStyleCheck = StyleCheck.Auto
|
||||
else: localError(gCmdLineInfo, errOnOrOffExpected)
|
||||
of "onlymainfile": gOnlyMainfile = true
|
||||
of "wholeproject": gOnlyMainfile = false
|
||||
else:
|
||||
processSwitch(pass, p)
|
||||
of cmdArgument:
|
||||
@@ -2,9 +2,10 @@
|
||||
# gc:markAndSweep
|
||||
|
||||
hint[XDeclaredButNotUsed]:off
|
||||
path:"$projectPath/.."
|
||||
path:"$projectPath/../.."
|
||||
|
||||
path:"$lib/packages/docutils"
|
||||
path:"$nim/compiler"
|
||||
|
||||
define:useStdoutAsStdmsg
|
||||
symbol:nimfix
|
||||
@@ -15,11 +15,11 @@ import
|
||||
magicsys, parser, nversion, nimsets, semfold, importer,
|
||||
procfind, lookups, rodread, pragmas, passes, semdata, semtypinst, sigmatch,
|
||||
intsets, transf, vmdef, vm, idgen, aliases, cgmeth, lambdalifting,
|
||||
evaltempl, patterns, parampatterns, sempass2, pretty, semmacrosanity,
|
||||
evaltempl, patterns, parampatterns, sempass2, nimfix.pretty, semmacrosanity,
|
||||
semparallel, lowerings
|
||||
|
||||
when defined(nimfix):
|
||||
import prettybase
|
||||
import nimfix.prettybase
|
||||
|
||||
# implementation
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import
|
||||
intsets, ast, astalgo, semdata, types, msgs, renderer, lookups, semtypinst,
|
||||
magicsys, condsyms, idents, lexer, options, parampatterns, strutils, trees,
|
||||
pretty
|
||||
nimfix.pretty
|
||||
|
||||
when not defined(noDocgen):
|
||||
import docgen
|
||||
|
||||
Reference in New Issue
Block a user