Roman Khimov
186cfa32df
go.sum: go mod tidy
2021-05-13 17:22:30 +03:00
Roman Khimov
db4bd28160
Makefile: drop vendoring
...
It's not really needed.
2021-05-13 17:22:10 +03:00
Roman Khimov
d6364739c5
Dockerfile: use make to build neo-go
...
Don't duplicate go build invocation line there.
2021-05-13 17:16:27 +03:00
Roman Khimov
f2f9ec1a05
Merge pull request #1916 from nspcc-dev/fix/oraclefilter
...
oracle: make JSONPath compatible with C# implementation
2021-05-13 15:34:52 +03:00
Evgeniy Stratonikov
28a0d68c05
jsonpath: allow empty paths
2021-05-13 11:53:49 +03:00
Evgeniy Stratonikov
5fc81c787b
jsonpath: use ordered map json unmarshaler
2021-05-13 11:53:49 +03:00
Evgeniy Stratonikov
6890688b8f
oracle: add max nesting depth to JSONPath filter
2021-05-13 11:53:49 +03:00
Evgeniy Stratonikov
1c30d8c395
oracle: make JSONPath compatible with C# implementation
...
C# node uses simplified implementation which is easy to port.
2021-05-13 11:53:28 +03:00
Roman Khimov
834743ec88
Merge pull request #1958 from nspcc-dev/linter
...
Linter improvements
2021-05-13 10:52:58 +03:00
Roman Khimov
50cb0450f2
circleci/workflows: drop vet run
...
golangci-lint already includes govet, so having it in a separate task doesn't
add any value (only increases CI running time).
2021-05-13 00:08:42 +03:00
Roman Khimov
c76f8b8fbe
Makefile: use golangci-lint instead of golint
...
It includes golint and also has a lot of other useful linters.
2021-05-12 23:38:35 +03:00
Roman Khimov
9d2712573f
*: enable godot linter and fix all its warnings
...
It's important for NeoGo to have clean documentation. No functional changes.
2021-05-12 23:17:03 +03:00
Roman Khimov
3fdba9265f
add golangci-lint configuration
...
It's mostly based on neofs-http-gate configuration, but has exhaustive
disabled and some golint-specific warnings enabled (some of which are
important for us).
2021-05-12 22:53:28 +03:00
Roman Khimov
d4a2f4d8b9
hash: suppress staticcheck warning
2021-05-12 22:52:32 +03:00
Roman Khimov
4e651eaf83
compiler: simplify increments as suggested by golint
2021-05-12 22:52:07 +03:00
Roman Khimov
c4e084b0d8
*: fix whitespace errors
...
leading/trailing newlines
2021-05-12 22:51:41 +03:00
Roman Khimov
6fea16451a
cli/input: ignore term.Restore errors, fix errcheck warnings
...
I'm not sure we can do anything useful here.
2021-05-12 21:53:41 +03:00
Roman Khimov
b1710bebaa
native: fix errcheck errors in nns contract
2021-05-12 21:49:42 +03:00
Roman Khimov
a44376903a
rpc: fix errcheck warnings in websocket code
2021-05-12 21:48:38 +03:00
Roman Khimov
e9cefc4bfc
*: fix all errcheck warnings in testing code
2021-05-12 21:45:12 +03:00
Roman Khimov
0500c8f9d7
cli/wallet: fix error handling
...
cli/wallet/wallet.go:527:19: Error return value of `cli.NewExitError` is not checked (errcheck)
cli.NewExitError("valid account address must be provided", 1)
2021-05-12 20:19:24 +03:00
Roman Khimov
f1f30fd0c5
gendump: fix errcheck warning
...
scripts/gendump/main.go:95:13: Error return value of `rand.Read` is not checked (errcheck)
rand.Read(key)
^
scripts/gendump/main.go:96:13: Error return value of `rand.Read` is not checked (errcheck)
rand.Read(value)
^
2021-05-12 20:18:11 +03:00
Roman Khimov
4caff35e73
consensus: fix error checking in decoders
...
Spotted by errcheck.
2021-05-12 20:14:52 +03:00
Roman Khimov
99108c620f
network: fix errcheck warning
2021-05-12 20:14:35 +03:00
Roman Khimov
601841ef35
*: drop unused structure fields
...
Found by structcheck:
`good` is unused (structcheck)
and alike.
2021-05-12 19:41:23 +03:00
Roman Khimov
4cd3da99b4
core: fix ineffassign warning in test code
...
ineffectual assignment to err (ineffassign)
2021-05-12 19:37:14 +03:00
Roman Khimov
ec50bb4041
cli/wallet: fix error handling
...
ineffectual assignment to err (ineffassign)
`err` is shadowed at `tx, err = c.CreateNEP11TransferTx()` line.
2021-05-12 19:34:12 +03:00
Roman Khimov
78bf172108
network: drop some not really useful test code
...
SA4010: this result of append is never used, except maybe in other appends (staticcheck)
2021-05-12 19:29:45 +03:00
Roman Khimov
b5ff87c2bd
native: fix minimum deployment fee setting
...
SA4003: no value of type uint32 is less than 0 (staticcheck)
But it's more involved than that, we should allow any positive big.Int here.
2021-05-12 19:27:02 +03:00
Roman Khimov
d15cacc1ba
rpc/client: fix broken test code
...
SA1024: cutset contains duplicate characters (staticcheck)
2021-05-12 19:15:21 +03:00
Roman Khimov
b8ba923874
standard: improve testing code
...
staticcheck: SA4021: x = append(y) is equivalent to x = y
2021-05-12 19:12:09 +03:00
Roman Khimov
333f778aa6
*: drop empty branches
...
Fix this warning from staticcheck: SA9003: empty branch
2021-05-12 19:10:31 +03:00
Roman Khimov
92dbb3c4b9
*: fix all unused
warnings
...
From golangci-lint.
2021-05-12 18:53:12 +03:00
Roman Khimov
de5e61588d
vm: simplify some test code
...
gosimple: S1017: should replace this `if` statement with an unconditional `strings.TrimPrefix`
2021-05-12 18:44:35 +03:00
Roman Khimov
7af67d2a3c
vm/cli: simplify buffer-related code
...
gosimple: S1030: should use buf.String() instead of string(buf.Bytes())
2021-05-12 18:42:50 +03:00
Roman Khimov
bd48454c72
mempool: simpilfy boolean comparisons in test code
...
gosimple: S1008: should use 'return t == tx2' instead of 'if t == tx2 { return true }; return false'
2021-05-12 18:40:41 +03:00
Roman Khimov
cf59bd878d
native: simplify escaping in regexp.MustCompile()
...
gosimple: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice
2021-05-12 18:38:24 +03:00
Roman Khimov
0178594850
*: simpilfy make() invocations
...
gosimple: S1019: should use make([]byte, 64) instead
2021-05-12 18:36:45 +03:00
Roman Khimov
07cdbb815c
*: drop unnecessary fmt.Sprintf uses
...
gosimple: S1039: unnecessary use of fmt.Sprintf
2021-05-12 18:29:39 +03:00
Roman Khimov
ad8ffee0ab
*: remove redundant return
statements
...
Found by gosimple via golangci-lint.
2021-05-12 18:24:16 +03:00
Roman Khimov
8322607fd2
rpc/server: silence deadcode warning
2021-05-12 18:22:18 +03:00
Roman Khimov
73ecbbb7c6
compiler: remove unused testPrintHash from test code
2021-05-12 18:18:49 +03:00
Roman Khimov
cfc067dd24
*: remove dead code
...
Found by deadcode via golangci-lint.
2021-05-12 18:13:14 +03:00
Roman Khimov
fbcb08c5f0
Merge pull request #1957 from nspcc-dev/compiler/static
...
Emit debug info for static variables
2021-05-12 18:12:58 +03:00
Roman Khimov
75a55d910e
Merge pull request #1956 from nspcc-dev/interop/checksig-rename
...
core: rename Neo.Crypto.[CheckSig CheckMultisig] interops
2021-05-12 17:06:39 +03:00
Evgeniy Stratonikov
7b638d5489
compiler: emit debug variable info for _deploy()
2021-05-12 16:04:11 +03:00
Evgeniy Stratonikov
b72f6be9e9
compiler: emit debug variable info for init()
2021-05-12 16:04:06 +03:00
Evgeniy Stratonikov
7afca7f8e5
compiler: add support for static-variables
in debug info
2021-05-12 15:05:39 +03:00
Evgeniy Stratonikov
e8ba386e58
compiler: remove offset comparison from debug test
...
We shouldn't test for them anyway plus the error is more
specific now.
2021-05-12 15:04:46 +03:00
Anna Shaleva
f824789116
core: remove neointerops-related files
...
And move their content to systeminterops-related files.
2021-05-12 13:30:04 +03:00