forked from lug/matterbridge
Move golangci-lint configuration to file (#635)
This commit is contained in:
@@ -12,6 +12,7 @@ git:
|
||||
env:
|
||||
global:
|
||||
- GOOS=linux GOARCH=amd64
|
||||
- GOLANGCI_VERSION="v1.12.3"
|
||||
|
||||
matrix:
|
||||
# It's ok if our code fails on unstable development versions of Go.
|
||||
@@ -26,9 +27,9 @@ notifications:
|
||||
|
||||
before_script:
|
||||
# Get version info from tags.
|
||||
- MY_VERSION=$(git describe --tags)
|
||||
- MY_VERSION="$(git describe --tags)"
|
||||
# Retrieve the golangci-lint linter binary.
|
||||
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.12.2
|
||||
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b ${GOPATH}/bin ${GOLANGCI_VERSION}
|
||||
# Retrieve and prepare CodeClimate's test coverage reporter.
|
||||
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||
- chmod +x ./cc-test-reporter
|
||||
@@ -36,7 +37,7 @@ before_script:
|
||||
|
||||
script:
|
||||
# Run the linter.
|
||||
- golangci-lint run --enable-all -D lll -D errcheck -D gosec -D maligned -D prealloc -D gocyclo -D gochecknoglobals
|
||||
- golangci-lint run
|
||||
# Run all the tests with the race detector and generate coverage.
|
||||
- go test -v -race -coverprofile c.out ./...
|
||||
# Run the build script to generate the necessary binaries and images.
|
||||
|
||||
Reference in New Issue
Block a user