diff --git a/.golangci.yml b/.golangci.yml index 2dad27a04c..2375e6c8a4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -31,6 +31,16 @@ run: # autogenerated files. If it's not please let us know. skip-files: + # by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules": + # If invoked with -mod=readonly, the go command is disallowed from the implicit + # automatic updating of go.mod described above. Instead, it fails when any changes + # to go.mod are needed. This setting is most useful to check that go.mod does + # not need updates, such as in a continuous integration and testing system. + # If invoked with -mod=vendor, the go command assumes that the vendor + # directory holds the correct copies of dependencies and ignores + # the dependency descriptions in go.mod. + modules-download-mode: vendor + # output configuration options output: diff --git a/Makefile b/Makefile index c51210df14..1e2f303b16 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ .PHONY : docker-apps docker-bin docker-volume .PHONY : docker-run docker-stop -OPTS?=GO111MODULE=on +OPTS?=GO111MODULE=on DOCKER_IMAGE?=skywire-runner # docker image to use for running skywire-visor.`golang`, `buildpack-deps:stretch-scm` is OK too DOCKER_NETWORK?=SKYNET DOCKER_NODE?=SKY01 @@ -45,7 +45,7 @@ rerun: stop lint: ## Run linters. Use make install-linters first ${OPTS} golangci-lint run -c .golangci.yml ./... # The govet version in golangci-lint is out of date and has spurious warnings, run it separately - ${OPTS} go vet -all ./... + ${OPTS} go vet -mod=vendor -all ./... vendorcheck: ## Run vendorcheck GO111MODULE=off vendorcheck ./internal/...