Skip to content

Commit

Permalink
ci: update golangci-lint and check go modules (#299)
Browse files Browse the repository at this point in the history
* chore: update golangci-lint.
* chore: validate go modules and vendor.
* fix: go.sum
* fix: vendor folder content.
* fix: windows path.
  • Loading branch information
ldez authored Feb 10, 2020
1 parent 295d9c1 commit 52b9274
Show file tree
Hide file tree
Showing 41 changed files with 27 additions and 5,534 deletions.
20 changes: 12 additions & 8 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ linters:
- funlen
- wsl
- whitespace
- gomnd

issues:
exclude:
# The following excludes are considered false-positives/known-OK.
# ca/ca.go:
- "type name will be used as ca.CAImpl by other packages, and that stutters; consider calling this Impl"
# va/va.go:
- "type name will be used as va.VAImpl by other packages, and that stutters; consider calling this Impl"
# wfe/wfe.go: L1647 and L1878
- "if` block ends with a `return` statement, so drop this `else` and outdent its block"
exclude-use-default: true
max-per-linter: 0
max-same-issues: 0
# The following excludes are considered false-positives/known-OK.
exclude-rules:
- path: ca([/|\\])ca.go
text: 'type name will be used as ca.CAImpl by other packages, and that stutters; consider calling this Impl'
- path: va([/|\\])va.go
text: 'type name will be used as va.VAImpl by other packages, and that stutters; consider calling this Impl'
- path: wfe([/|\\])wfe.go
text: 'if` block ends with a `return` statement, so drop this `else` and outdent its block'
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ addons:
- example.letsencrypt.org
- elpmaxe.letsencrypt.org

cache:
directories:
- $GOPATH/pkg/mod

go:
- "1.13.x"

Expand All @@ -25,13 +29,19 @@ before_install:
# `-mod=vendor` to use the vendored dependencies
install:
# Install `golangci-lint` using their installer script
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.3
# Install tools without `GO111MODULE` enabled so that we
# don't download Pebble's deps and just put the tools in our
# gobin.
- GO111MODULE=off go get golang.org/x/tools/cmd/cover
- GO111MODULE=off go get github.com/mattn/goveralls
- GO111MODULE=off go get github.com/letsencrypt/boulder/test/load-generator
- go mod tidy
- git diff --exit-code go.mod
- git diff --exit-code go.sum
- go mod download
- go mod vendor
- git diff --exit-code vendor/
- go install -v -race -mod=vendor ./...

before_script:
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ install:

before_build:
# Install `golangci-lint` using go get (installer not available for Windows)
- go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.21.0
- go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.23.3

build_script:
- go install -v -mod=vendor ./...
Expand Down
30 changes: 0 additions & 30 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 h1:dYTbLf4m0a5u0KLmPfB6mgxbcV7588bOCx79hxa5Sr4=
github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548/go.mod h1:hGT6jSUVzF6no3QaDSMLGLEHtHSBSefs+MgcDWnmhmo=
github.com/letsencrypt/challtestsrv v0.0.0-20181206200831-495441a88800 h1:lLMZpQheDEtEhwDglvCbZlU3KAJma9gKWxWKwEo3Fkc=
github.com/letsencrypt/challtestsrv v0.0.0-20181206200831-495441a88800/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.0.0 h1:qWZX81YKt+ke5U4jJePbO3hDtdEbKC93aHYxgJNFvTI=
github.com/letsencrypt/challtestsrv v1.0.0/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181212211153-921078ce7fc4 h1:NgzUgTJ5BbPt13D7T7Is+dyzZ4KW0Ognc6oT9WT5aJI=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181212211153-921078ce7fc4/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181212211825-6441a6a4faad h1:GAhfHjMmok/3SXsygak5o3RI0OPP+0/cGs0UXR0SJDE=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181212211825-6441a6a4faad/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181212222758-e1173e47e167 h1:QH2bqxMbHIrpX+s/+z5Z/dlfWrJJVtOAHmZobt8ztDQ=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181212222758-e1173e47e167/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181213164708-7ac06f2c48ad h1:WKfASZKhpfYh+wggJWPtKWDiRSN93GOnGHfTdCGCqU8=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181213164708-7ac06f2c48ad/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181214141602-e2eba9b59bf7 h1:/Kl45ZozvwLA7sl7sikILYS0orc6bRrd++qP8tNqjf0=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181214141602-e2eba9b59bf7/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181214205357-9a3b55451bba h1:cZjwNzTr4ZukBk6/cfqwBQsvZuhme8gELXR2Upzbv1U=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181214205357-9a3b55451bba/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181214211236-91d66851530d h1:fViNBP77AG+QEWUNPKLLOmUtX/shnfljrfVtNRK7fVE=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181214211236-91d66851530d/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181214212133-97213d51de4b h1:skXVfdU3xp5ULyjjY4rRBLeFNZAtvYpTZ7dEvge8fvc=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181214212133-97213d51de4b/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181214212536-8d77fe6e69cc h1:XKu0K6+XznHIJXP0gv+jkHZUleFBqWPw3HT/RSdS9FY=
github.com/letsencrypt/challtestsrv v1.0.1-0.20181214212536-8d77fe6e69cc/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.0.1 h1:9K3DJleJxOnP3YlFPWeNydca61Lwj4vySqP4W9hi8vE=
github.com/letsencrypt/challtestsrv v1.0.1/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.0.2 h1:nBAQjKvVMLhpj4cg2Px6jMyvMbQNdJrCEd6gdcmEuOU=
github.com/letsencrypt/challtestsrv v1.0.2/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.1.0 h1:2r5Wa7LvOqUsM8skGSaRnf3CV6WYPQ/OgLF1U6bCt4I=
github.com/letsencrypt/challtestsrv v1.1.0/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/letsencrypt/challtestsrv v1.2.0 h1:Z/hu1JPFR+cCuI92Hb+LFNxSHG4ARjRYGUipW1S71Vo=
github.com/letsencrypt/challtestsrv v1.2.0/go.mod h1:/gzSMb+5FjprRIa1TtW6ngjhUOr8JbEFM2XESzK2zPg=
github.com/miekg/dns v1.1.1 h1:DVkblRdiScEnEr0LR9nTnEQqHYycjkXW9bOjd+2EL2o=
Expand Down
144 changes: 0 additions & 144 deletions vendor/github.com/miekg/dns/duplicate_generate.go

This file was deleted.

Loading

0 comments on commit 52b9274

Please sign in to comment.