• Martin Holst Swende's avatar
    all: more linters (#24783) · a907d7e8
    Martin Holst Swende authored
    This enables the following linters
    
    - typecheck
    - unused
    - staticcheck
    - bidichk
    - durationcheck
    - exportloopref
    - gosec
    
    WIth a few exceptions.
    
    - We use a deprecated protobuf in trezor. I didn't want to mess with that, since I cannot meaningfully test any changes there.
    - The deprecated TypeMux is used in a few places still, so the warning for it is silenced for now.
    - Using string type in context.WithValue is apparently wrong, one should use a custom type, to prevent collisions between different places in the hierarchy of callers. That should be fixed at some point, but may require some attention.
    - The warnings for using weak random generator are squashed, since we use a lot of random without need for cryptographic guarantees.
    Unverified
    a907d7e8
Name
Last commit
Last update
..
testdata rpc: fix issue with null JSON-RPC messages (#21497)
client.go rpc: fix godoc (#24488)
client_example_test.go rpc: make ExampleClientSubscription work with the geth API (#19483)
client_test.go all: more linters (#24783)
constants_unix.go all: add go:build lines (#23468)
constants_unix_nocgo.go all: add go:build lines (#23468)
doc.go rpc: remove 'exported or builtin' restriction for parameters (#20332)
endpoints.go trie, rpc, cmd/geth: fix tests on 32-bit and windows + minor rpc fixes (#21871)
errors.go core, eth, les, rpc: polish catalyst errors, add context
handler.go rpc: swap out timer metrics to histograms
http.go all: replace uses of ioutil with io and os (#24869)
http_test.go rpc: add PeerInfo (#24255)
inproc.go rpc, p2p/simulations: use github.com/gorilla/websocket (#20289)
ipc.go rpc, p2p/simulations: use github.com/gorilla/websocket (#20289)
ipc_js.go all: add go:build lines (#23468)
ipc_unix.go all: add go:build lines (#23468)
ipc_windows.go all: add go:build lines (#23468)
json.go rpc: add PeerInfo (#24255)
metrics.go rpc: swap out timer metrics to histograms
server.go cmd/geth, node, rpc: implement jwt tokens (#24364)
server_test.go all: replace non-trivial uses of package ioutil with os (#24886)
service.go rpc: remove 'exported or builtin' restriction for parameters (#20332)
stdio.go rpc, p2p/simulations: use github.com/gorilla/websocket (#20289)
subscription.go rpc: fix godoc (#24488)
subscription_test.go all: fix a bunch of inconsequential goroutine leaks (#20667)
testservice_test.go rpc: add PeerInfo (#24255)
types.go core, eth, internal, rpc: implement final block (#24282)
types_test.go rpc: add BlockNumber.MarshalText (#23324)
websocket.go rpc: add PeerInfo (#24255)
websocket_test.go cmd/geth, node, rpc: implement jwt tokens (#24364)