Skip to content

Commit

Permalink
ci: update golangci-lint and check go modules (#12)
Browse files Browse the repository at this point in the history
* chore: update golangci-lint.
* chore: validate go modules and vendor.
* fix: go modules files.
* fix: vendor folder content.
  • Loading branch information
ldez authored Feb 12, 2020
1 parent 0dd24b5 commit 5b8a09a
Show file tree
Hide file tree
Showing 40 changed files with 26 additions and 5,519 deletions.
12 changes: 11 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,14 @@ linters:
- gocritic
- gochecknoinits
- gochecknoglobals
- typecheck # Go 1.13 incompatible pending new golangci-lint binary release
- gomnd
- wsl

issues:
exclude-use-default: true
max-per-linter: 0
max-same-issues: 0
# The following excludes are considered false-positives/known-OK.
exclude-rules:
- path: tlsalpnone.go
text: '`marshalling` is a misspelling of `marshaling`'
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
language: go

go:
- "stable"

cache:
directories:
- $GOPATH/pkg/mod

# Override the base install phase so that the project can be installed using
# `-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.17.1
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.3
# Install `cover` and `goveralls` without `GO111MODULE` enabled so that we
# don't download project dependencies and just put the tools in $GOPATH/bin
- GO111MODULE=off go get golang.org/x/tools/cmd/cover
- GO111MODULE=off go get github.com/mattn/goveralls
- go mod tidy
- git diff --exit-code go.mod
- git diff --exit-code go.sum
- go mod download
- go mod vendor
- go install -mod=vendor -v -race ./...

script:
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module github.com/letsencrypt/challtestsrv

go 1.13

require (
github.com/miekg/dns v1.1.1
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 // indirect
Expand Down
158 changes: 0 additions & 158 deletions vendor/github.com/miekg/dns/duplicate_generate.go

This file was deleted.

Loading

0 comments on commit 5b8a09a

Please sign in to comment.