Skip to content

Commit d7c6812

Browse files
authored
make UnusedImport an error; update test summaries (#3687)
* make UnusedImport an error; update test summaries * std/cmdline is only used when isMainModule * std/os is only used when isMainModule * more import cleanups
1 parent b5a9255 commit d7c6812

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

GeneralStateTestsDevnet.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@ OK: 5/5 Fail: 0/5 Skip: 0/5
139139
+ valid_multi_inf.json OK
140140
```
141141
OK: 6/6 Fail: 0/6 Skip: 0/6
142-
## bls12_precompiles_before_fork
143-
```diff
144-
+ precompile_before_fork.json OK
145-
```
146-
OK: 1/1 Fail: 0/1 Skip: 0/1
147142
## bls12_variable_length_input_contracts
148143
```diff
149144
+ invalid_gas_g1msm.json OK
@@ -466,10 +461,9 @@ OK: 50/50 Fail: 0/50 Skip: 0/50
466461
+ pointer_to_precompile.json OK
467462
+ pointer_to_static.json OK
468463
+ pointer_to_static_reentry.json OK
469-
+ set_code_type_tx_pre_fork.json OK
470464
+ static_to_pointer.json OK
471465
```
472-
OK: 16/16 Fail: 0/16 Skip: 0/16
466+
OK: 15/15 Fail: 0/15 Skip: 0/15
473467
## shift_combinations
474468
```diff
475469
+ combinations.json OK
@@ -557,4 +551,4 @@ OK: 2/2 Fail: 0/2 Skip: 0/2
557551
OK: 1/1 Fail: 0/1 Skip: 0/1
558552

559553
---TOTAL---
560-
OK: 267/267 Fail: 0/267 Skip: 0/267
554+
OK: 265/265 Fail: 0/265 Skip: 0/265

config.nims

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ if canEnableDebuggingSymbols:
158158
--define:nimOldCaseObjects # https://github.com/status-im/nim-confutils/issues/9
159159

160160
switch("warningAsError", "BareExcept:on")
161+
switch("warningAsError", "UnusedImport:on")
161162
switch("hintAsError", "ConvFromXtoItselfNotNeeded:on")
162163
switch("hintAsError", "DuplicateModuleImport:on")
163164

tests/eest/eest_engine.nim

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@
77
# This file may not be copied, modified, or distributed except according to
88
# those terms.
99

10-
{.push raises: [].}
10+
{.push raises: [], gcsafe.}
1111

1212
import
13-
std/[cmdline, os],
14-
unittest2,
1513
eth/common/headers_rlp,
1614
web3/eth_api_types,
1715
web3/engine_api_types,
@@ -107,9 +105,13 @@ proc processFile*(fileName: string): bool =
107105
return testPass
108106

109107
when isMainModule:
108+
import
109+
std/[cmdline, os],
110+
unittest2
111+
110112
if paramCount() == 0:
111113
let testFile = getAppFilename().splitPath().tail
112114
echo "Usage: " & testFile & " vector.json"
113115
quit(QuitFailure)
114116

115-
check processFile(paramStr(1))
117+
check processFile(paramStr(1))

tests/eest/eest_engine_test.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
# This file may not be copied, modified, or distributed except according to
88
# those terms.
99

10-
{.push raises: [].}
10+
{.push raises: [], gcsafe.}
1111

1212
import
13-
std/[os, osproc],
13+
std/os,
1414
unittest2,
1515
./eest_helpers,
1616
./eest_engine
@@ -32,4 +32,4 @@ runEESTSuite(
3232
skipFiles,
3333
baseFolder,
3434
eestType
35-
)
35+
)

0 commit comments

Comments
 (0)