Skip to content

Commit

Permalink
use golangci-lint (#876)
Browse files Browse the repository at this point in the history
* use golangci-lint in Travis CI
* fix linting issues accordingly
  • Loading branch information
umarcor committed Feb 20, 2020
1 parent e129655 commit 9922ec4
Show file tree
Hide file tree
Showing 31 changed files with 489 additions and 585 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
* text=auto
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -38,3 +38,6 @@ bin

.idea/
*.iml

# test-generated files
cobra/cmd/testproject
25 changes: 25 additions & 0 deletions .golangci.yml
@@ -0,0 +1,25 @@
run:
deadline: 5m

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

stages:
- diff
- lint
- test
- build

Expand All @@ -21,9 +21,10 @@ matrix:
allow_failures:
- go: tip
include:
- stage: diff
- stage: lint
go: 1.13.x
script: make fmt
before_install: go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.19.1
script: golangci-lint run -v
- stage: build
go: 1.13.x
script: make cobra_generator
Expand Down

0 comments on commit 9922ec4

Please sign in to comment.