Skip to content

Commit f75bacb

Browse files
committed
chore(lint): add golang lint config
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent a4427a6 commit f75bacb

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

.golangci.yml

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

size.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (mbr *maxBytesReader) Read(p []byte) (n int, err error) {
6363
if mbr.remaining < 0 {
6464
mbr.remaining = 0
6565
}
66-
return
66+
return n, err
6767
}
6868

6969
func (mbr *maxBytesReader) Close() error {

0 commit comments

Comments
 (0)