stylecheck: nnkArglist -> nnkArgList (#127)
* stylecheck: nnkArglist -> nnkArgList * --stylecheck:error iff >= 1.6.0
This commit is contained in:
parent
9a3130eb5b
commit
f173efc500
14
stew.nimble
14
stew.nimble
|
@ -12,9 +12,19 @@ requires "nim >= 1.2.0",
|
|||
|
||||
### Helper functions
|
||||
proc test(args, path: string) =
|
||||
# nnkArglist was changed to nnkArgList, so can't always use --styleCheck:error
|
||||
# https://github.com/nim-lang/Nim/pull/17529
|
||||
# https://github.com/nim-lang/Nim/pull/19822
|
||||
let styleCheckStyle =
|
||||
if (NimMajor, NimMinor) < (1, 6):
|
||||
"hint"
|
||||
else:
|
||||
"error"
|
||||
|
||||
# Compilation language is controlled by TEST_LANG
|
||||
exec "nim " & getEnv("TEST_LANG", "c") & " " & getEnv("NIMFLAGS") & " " & args &
|
||||
" -r --hints:off --skipParentCfg --styleCheck:usages --styleCheck:error " & path
|
||||
exec "nim " & getEnv("TEST_LANG", "c") & " " & getEnv("NIMFLAGS") & " " &
|
||||
args & " -r --hints:off --skipParentCfg --styleCheck:usages --styleCheck:" &
|
||||
styleCheckStyle & " " & path
|
||||
|
||||
task test, "Run all tests":
|
||||
test "--threads:off", "tests/all_tests"
|
||||
|
|
|
@ -412,7 +412,7 @@ macro unpackArgs*(callee: untyped, args: untyped): untyped =
|
|||
for arg in args:
|
||||
let arg = if arg.kind == nnkHiddenStdConv: arg[1]
|
||||
else: arg
|
||||
if arg.kind == nnkArglist:
|
||||
if arg.kind == nnkArgList:
|
||||
for subarg in arg:
|
||||
result.add subarg
|
||||
else:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# stew
|
||||
# Copyright 2018-2019 Status Research & Development GmbH
|
||||
# Copyright 2018-2022 Status Research & Development GmbH
|
||||
# Licensed under either of
|
||||
#
|
||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
{.used.}
|
||||
|
||||
import
|
||||
ttypedranges, tstackarrays, tbitranges
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Copyright (c) 2019-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
random, unittest2,
|
||||
../../stew/ranges/bitranges, ../../stew/bitseqs
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Copyright (c) 2019-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest2, math,
|
||||
../../stew/ptrops,
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Copyright (c) 2019-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest2, sets,
|
||||
../../stew/ranges/[typedranges, ptr_arith]
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Copyright (c) 2020-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest2,
|
||||
../stew/assign2
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Copyright (c) 2019-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import unittest2
|
||||
|
||||
import ../stew/bitops2
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Copyright (c) 2019-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest2, strformat,
|
||||
../stew/[bitseqs]
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
# byteutils
|
||||
# Copyright (c) 2018 Status Research & Development GmbH
|
||||
# Copyright (c) 2018-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license (license terms in the root directory or at http://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest2,
|
||||
../stew/byteutils
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Copyright (c) 2020-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import unittest2
|
||||
import ../stew/ctops
|
||||
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Copyright (c) 2019-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import unittest2
|
||||
|
||||
import ../stew/endians2
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Nimbus - Types, data structures and shared utilities used in network sync
|
||||
#
|
||||
# Copyright (c) 2018-2021 Status Research & Development GmbH
|
||||
# Copyright (c) 2018-2022 Status Research & Development GmbH
|
||||
# Licensed under either of
|
||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
||||
# http://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
@ -9,6 +9,8 @@
|
|||
# at your option. This file may not be copied, modified, or
|
||||
# distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest2,
|
||||
../stew/interval_set
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Copyright (c) 2020-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import unittest2
|
||||
import ../stew/io2
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Nimbus
|
||||
# Copyright (c) 2018-2019 Status Research & Development GmbH
|
||||
# Copyright (c) 2018-2022 Status Research & Development GmbH
|
||||
# Licensed under either of
|
||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
||||
# http://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
@ -8,6 +8,8 @@
|
|||
# at your option. This file may not be copied, modified, or distributed except
|
||||
# according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
std/[algorithm, sequtils, strformat, strutils, tables],
|
||||
unittest2,
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
# Copyright (c) 2020-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest2,
|
||||
../stew/shims/macros
|
||||
|
||||
|
||||
template unknown() {.pragma.}
|
||||
template zero() {.pragma.}
|
||||
template one(one: string) {.pragma.}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# stew
|
||||
# Copyright 2018-2019 Status Research & Development GmbH
|
||||
# Copyright 2018-2022 Status Research & Development GmbH
|
||||
# Licensed under either of
|
||||
#
|
||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
@ -7,6 +7,8 @@
|
|||
#
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import unittest2
|
||||
|
||||
import ../stew/ptrops
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{.used.}
|
||||
|
||||
# nim-result is also available stand-alone from https://github.com/arnetheduck/nim-result/
|
||||
|
||||
import ../stew/results
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
# byteutils
|
||||
# Copyright (c) 2018 Status Research & Development GmbH
|
||||
# Copyright (c) 2018-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license (license terms in the root directory or at http://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest2,
|
||||
../stew/sequtils2
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Copyright (c) 2021-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest2,
|
||||
../stew/shims/sets
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Nimbus
|
||||
# Copyright (c) 2018-2019 Status Research & Development GmbH
|
||||
# Copyright (c) 2018-2022 Status Research & Development GmbH
|
||||
# Licensed under either of
|
||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
||||
# http://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
@ -8,6 +8,8 @@
|
|||
# at your option. This file may not be copied, modified, or distributed except
|
||||
# according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
std/[algorithm, sequtils, strformat, tables],
|
||||
../stew/sorted_set,
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Copyright (c) 2021-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest2,
|
||||
../stew/templateutils
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# Copyright (c) 2019-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest2, random,
|
||||
../stew/[varints, byteutils]
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
# Copyright (c) 2020-2022 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license: http://opensource.org/licenses/MIT
|
||||
# * Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.used.}
|
||||
|
||||
import unittest2
|
||||
import ../stew/io2
|
||||
|
||||
when defined(windows):
|
||||
import ../stew/windows/acl
|
||||
|
|
Loading…
Reference in New Issue