--styleCheck:error iff Nim >= 1.6

This commit is contained in:
Dustin Brody 2022-07-22 10:40:38 +00:00
parent e726bfd969
commit 27a7608f33
No known key found for this signature in database
GPG Key ID: 3D7A11A0156519DC
1 changed files with 6 additions and 1 deletions

View File

@ -14,9 +14,14 @@ requires "nim >= 0.19",
proc test(args, path: string) =
if not dirExists "build":
mkDir "build"
let styleCheckStyle =
if (NimMajor, NimMinor) < (1, 6):
"hint"
else:
"error"
exec "nim " & getEnv("TEST_LANG", "c") & " " & getEnv("NIMFLAGS") & " " & args &
" --outdir:build -r --hints:off --warnings:off --skipParentCfg" &
" --styleCheck:usages --styleCheck:error " & path
" --styleCheck:usages --styleCheck:" & styleCheckStyle & " " & path
task test, "Run all tests - test and production implementation":
# Run tests for internal procs - test implementation (StUint[64] = 2x uint32