feat: golangci-lint allow enum shorthand, use config file

This commit is contained in:
Luke K 2020-08-31 17:09:06 +09:00
parent 3fc39aa773
commit 38d41baaa3
No known key found for this signature in database
GPG Key ID: 4896F75BAF2E1966
2 changed files with 29 additions and 1 deletions

28
.golangci.yaml Normal file
View File

@ -0,0 +1,28 @@
#
# golangci-lint
#
# For defaults, see:
# https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
#
#
#
linters:
enable:
- unconvert
- prealloc
- bodyclose
issues:
exclude-rules:
- linters:
- staticcheck
# Error Text:
# "SA9004: only the first constant in this group has an explicit type"
# Efect:
# Allows short-hand first constant type declarations:
# Example:
# const (
# Name Type = "value"
# Name2 = "value2"
# )
text: "SA9004:"

View File

@ -71,7 +71,7 @@ bin/golangci-lint:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin v1.27.0
check: bin/golangci-lint
./bin/golangci-lint run --enable=unconvert,prealloc,bodyclose
./bin/golangci-lint run
release: build test
go get -u github.com/git-chglog/git-chglog/cmd/git-chglog