Skip to content

Commit

Permalink
use golangci-lint in Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Mar 19, 2019
1 parent c2a23c2 commit 3b60284
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
20 changes: 20 additions & 0 deletions .golangci.yml
@@ -0,0 +1,20 @@
run:
deadline: 5m

linters:
enable:
- deadcode
- govet
- ineffassign
- interfacer
- maligned
- megacheck
- structcheck
- unconvert
- varcheck
enable-all: false
disable-all: true
# presets:
# - bugs
# - unused
fast: false
10 changes: 4 additions & 6 deletions .travis.yml
@@ -1,7 +1,7 @@
language: go

stages:
- diff
- lint
- test

go:
Expand All @@ -14,9 +14,10 @@ matrix:
allow_failures:
- go: tip
include:
- stage: diff
- stage: lint
go: 1.12.x
script: diff -u <(echo -n) <(gofmt -d -s .)
before_install: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest
script: golangci-lint run -v

before_install:
- mkdir -p bin
Expand All @@ -26,6 +27,3 @@ before_install:
script:
- PATH=$PATH:$PWD/bin richgo test -v ./...
- go build
- if [ -z $NOVET ]; then
diff -u <(echo -n) <(go vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint');
fi

0 comments on commit 3b60284

Please sign in to comment.