--styleCheck:error (#122)

* --styleCheck:error

* --styleCheck:error iff >= Nim 1.6
This commit is contained in:
tersec 2022-07-21 15:38:13 +00:00 committed by GitHub
parent f2fb0c3695
commit 8a72c0f769
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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()

View File

@ -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"

View File

@ -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))