mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
add -d:nimStrictMode in CI to keep code from regressing; fixes ConvFromXtoItselfNotNeeded, UnusedImport notes (#16764)
This commit is contained in:
@@ -23,7 +23,7 @@ proc getMachine*(): MachineId =
|
||||
var name = execProcess("hostname").strip
|
||||
if name.len == 0:
|
||||
name = when defined(posix): getEnv("HOSTNAME")
|
||||
else: getEnv("COMPUTERNAME").string
|
||||
else: getEnv("COMPUTERNAME")
|
||||
if name.len == 0:
|
||||
quit "cannot determine the machine name"
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ when isMainModule:
|
||||
verbose = false
|
||||
|
||||
for i in 0..paramCount() - 1:
|
||||
let param = string(paramStr(i + 1))
|
||||
let param = paramStr(i + 1)
|
||||
case param
|
||||
of "verbose": verbose = true
|
||||
else: filter = param
|
||||
|
||||
@@ -683,7 +683,7 @@ proc main() =
|
||||
case p.key.normalize
|
||||
of "print", "verbose": optPrintResults = true
|
||||
of "failing": optFailing = true
|
||||
of "pedantic": discard # deadcode
|
||||
of "pedantic": discard # deadcode refs https://github.com/nim-lang/Nim/issues/16731
|
||||
of "targets":
|
||||
targetsStr = p.val
|
||||
gTargets = parseTargets(targetsStr)
|
||||
@@ -739,7 +739,7 @@ proc main() =
|
||||
var r = initResults()
|
||||
case action
|
||||
of "all":
|
||||
#processCategory(r, Category"megatest", p.cmdLineRest.string, testsDir, runJoinableTests = false)
|
||||
#processCategory(r, Category"megatest", p.cmdLineRest, testsDir, runJoinableTests = false)
|
||||
|
||||
var myself = quoteShell(getAppFilename())
|
||||
if targetsStr.len > 0:
|
||||
@@ -798,8 +798,7 @@ proc main() =
|
||||
p.next
|
||||
processPattern(r, pattern, p.cmdLineRest, simulate)
|
||||
of "r", "run":
|
||||
var subPath = p.key
|
||||
let (cat, path) = splitTestFile(subPath)
|
||||
let (cat, path) = splitTestFile(p.key)
|
||||
processSingleTest(r, cat.Category, p.cmdLineRest, path, gTargets, targetsSet)
|
||||
of "html":
|
||||
generateHtml(resultsFile, optFailing)
|
||||
|
||||
Reference in New Issue
Block a user