Commit Graph

6 Commits

Author SHA1 Message Date
Martin Holst Swende
a907d7e81a
all: more linters (#24783)
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.
2022-06-13 16:24:45 +02:00
ligi
a5c0cfb451
build: fix lint on ARM (#24311)
* build: append GOARM to arm lint download URL

otherwise it fails with:

downloading from https://github.com/golangci/golangci-lint/releases/download/v1.42.0/golangci-lint-1.42.0-linux-arm.tar.gz
ci.go:347: download error: status 404

* build: increase timeout for lint

Otherwise it times out on a pi

* Increase timeout even further

saw longer build times
2022-01-31 14:17:18 +02:00
Felix Lange
90987db733
appveyor.yml: add linux/amd64 build job (#23548) 2021-09-08 14:21:59 +02:00
Felix Lange
4873a9d3c3
build: upgrade to golangci lint v1.27.0 (#21127)
* build: upgrade to golangci-lint v1.27.0

* build: raise lint timeout to 3 minutes
2020-05-26 14:24:22 +03:00
Guillaume Ballet
1ee754b056 build: upgrade golangci to 1.22.2 (#20566)
* build: upgrade golangci to 1.22.2

* .golangci.yml: don't fail on asset deadcode
2020-01-16 14:09:38 +02:00
Felix Lange
689486449d build: use golangci-lint (#20295)
* build: use golangci-lint

This changes build/ci.go to download and run golangci-lint instead
of gometalinter.

* core/state: fix unnecessary conversion

* p2p/simulations: fix lock copying (found by go vet)

* signer/core: fix unnecessary conversions

* crypto/ecies: remove unused function cmpPublic

* core/rawdb: remove unused function print

* core/state: remove unused function xTestFuzzCutter

* core/vm: disable TestWriteExpectedValues in a different way

* core/forkid: remove unused function checksum

* les: remove unused type proofsData

* cmd/utils: remove unused functions prefixedNames, prefixFor

* crypto/bn256: run goimports

* p2p/nat: fix goimports lint issue

* cmd/clef: avoid using unkeyed struct fields

* les: cancel context in testRequest

* rlp: delete unreachable code

* core: gofmt

* internal/build: simplify DownloadFile for Go 1.11 compatibility

* build: remove go test --short flag

* .travis.yml: disable build cache

* whisper/whisperv6: fix ineffectual assignment in TestWhisperIdentityManagement

* .golangci.yml: enable goconst and ineffassign linters

* build: print message when there are no lint issues

* internal/build: refactor download a bit
2019-11-18 10:49:17 +02:00