Skip to content

Commit

Permalink
chore(lint): add golang lint config
Browse files Browse the repository at this point in the history
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Jan 2, 2022
1 parent a4427a6 commit f75bacb
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
linters:
enable-all: false
disable-all: true
fast: false
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- exhaustive
- gochecknoinits
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- noctx
- nolintlint
- rowserrcheck
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- gofumpt

run:
timeout: 3m
2 changes: 1 addition & 1 deletion size.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (mbr *maxBytesReader) Read(p []byte) (n int, err error) {
if mbr.remaining < 0 {
mbr.remaining = 0
}
return
return n, err
}

func (mbr *maxBytesReader) Close() error {
Expand Down

0 comments on commit f75bacb

Please sign in to comment.