Skip to content

Commit 0def805

Browse files
authored
chore: support golangci-lint in drone (#29)
1 parent 8dfa454 commit 0def805

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

.drone.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@ platform:
77
arch: amd64
88

99
steps:
10+
- name: lint
11+
image: golangci/golangci-lint:v1.41.1
12+
commands:
13+
- golangci-lint run -v
14+
volumes:
15+
- name: gopath
16+
path: /go
17+
1018
- name: test
11-
pull: always
1219
image: golang:1.16
1320
commands:
1421
- go test -v -covermode=atomic -coverprofile=coverage.out ./...
@@ -17,7 +24,6 @@ steps:
1724
path: /go
1825

1926
- name: codecov
20-
pull: always
2127
image: robertstettner/drone-codecov
2228
settings:
2329
token:

.golangci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
linters:
2+
disable-all: true
3+
enable:
4+
- bodyclose
5+
- deadcode
6+
- depguard
7+
- dogsled
8+
- dupl
9+
- errcheck
10+
- exportloopref
11+
- exhaustive
12+
- gochecknoinits
13+
- goconst
14+
- gocritic
15+
- gocyclo
16+
- gofmt
17+
- goimports
18+
- goprintffuncname
19+
- gosec
20+
- gosimple
21+
- govet
22+
- ineffassign
23+
- lll
24+
- misspell
25+
- nakedret
26+
- noctx
27+
- nolintlint
28+
- rowserrcheck
29+
- staticcheck
30+
- structcheck
31+
- stylecheck
32+
- typecheck
33+
- unconvert
34+
- unparam
35+
- unused
36+
- varcheck
37+
- whitespace
38+
- gofumpt

0 commit comments

Comments
 (0)