--styleCheck:error (#122)
* --styleCheck:error * --styleCheck:error iff >= Nim 1.6
This commit is contained in:
parent
f2fb0c3695
commit
8a72c0f769
|
@ -1,5 +1,5 @@
|
|||
## nim-websock
|
||||
## Copyright (c) 2021 Status Research & Development GmbH
|
||||
## Copyright (c) 2021-2022 Status Research & Development GmbH
|
||||
## Licensed under either of
|
||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||
## * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
||||
|
@ -8,7 +8,7 @@
|
|||
## those terms.
|
||||
|
||||
import std/os
|
||||
import pkg/[chronicles, chronos/unittest2/asynctests, stew/io2]
|
||||
import pkg/[chronos/unittest2/asynctests, stew/io2]
|
||||
import ../../websock/websock
|
||||
import ../../websock/extensions/compression/deflate
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
## nim-websock
|
||||
## Copyright (c) 2021 Status Research & Development GmbH
|
||||
## Copyright (c) 2021-2022 Status Research & Development GmbH
|
||||
## Licensed under either of
|
||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||
## * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
||||
|
@ -7,7 +7,7 @@
|
|||
## This file may not be copied, modified, or distributed except according to
|
||||
## those terms.
|
||||
|
||||
import pkg/[chronicles, chronos/unittest2/asynctests, stew/byteutils]
|
||||
import pkg/[chronos/unittest2/asynctests, stew/byteutils]
|
||||
import ./base64ext, ./hexext
|
||||
import ../../websock/websock, ../helpers
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
## nim-websock
|
||||
## Copyright (c) 2021 Status Research & Development GmbH
|
||||
## Copyright (c) 2021-2022 Status Research & Development GmbH
|
||||
## Licensed under either of
|
||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||
## * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
||||
|
@ -10,7 +10,6 @@
|
|||
import pkg/[
|
||||
httputils,
|
||||
chronos/unittest2/asynctests,
|
||||
chronicles,
|
||||
]
|
||||
|
||||
import ../websock/websock
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
## nim-websock
|
||||
## Copyright (c) 2021 Status Research & Development GmbH
|
||||
## Copyright (c) 2021-2022 Status Research & Development GmbH
|
||||
## Licensed under either of
|
||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||
## * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
||||
|
@ -1011,7 +1011,7 @@ suite "Partial frames":
|
|||
if pos >= res.len:
|
||||
break
|
||||
|
||||
res.setlen(pos)
|
||||
res.setLen(pos)
|
||||
check res.len == howMuchWood.toBytes().len
|
||||
check res == howMuchWood.toBytes()
|
||||
await ws.waitForClose()
|
||||
|
|
|
@ -26,9 +26,15 @@ requires "zlib"
|
|||
task test, "run tests":
|
||||
let
|
||||
envNimflags = getEnv("NIMFLAGS")
|
||||
styleCheckStyle =
|
||||
if (NimMajor, NimMinor) < (1, 6):
|
||||
"hint"
|
||||
else:
|
||||
"error"
|
||||
nimFlags = envNimFlags &
|
||||
" --verbosity:0 --hints:off --hint:Name:on " &
|
||||
"--styleCheck:usages --styleCheck:hint -d:chronosStrictException"
|
||||
"--styleCheck:usages --styleCheck:" & styleCheckStyle &
|
||||
" -d:chronosStrictException"
|
||||
|
||||
# dont't need to run it, only want to test if it is compileable
|
||||
exec "nim c -c " & nimFlags & " -d:chronicles_log_level=TRACE -d:chronicles_sinks:json --styleCheck:usages --styleCheck:hint ./tests/all_tests"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
## nim-websock
|
||||
## Copyright (c) 2021 Status Research & Development GmbH
|
||||
## Copyright (c) 2021-2022 Status Research & Development GmbH
|
||||
## Licensed under either of
|
||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||
## * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
||||
|
|
Loading…
Reference in New Issue