mirror of https://github.com/knative/func.git
feat: golangci-lint allow enum shorthand, use config file
This commit is contained in:
parent
3fc39aa773
commit
38d41baaa3
|
@ -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:"
|
2
Makefile
2
Makefile
|
@ -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
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin v1.27.0
|
||||||
|
|
||||||
check: bin/golangci-lint
|
check: bin/golangci-lint
|
||||||
./bin/golangci-lint run --enable=unconvert,prealloc,bodyclose
|
./bin/golangci-lint run
|
||||||
|
|
||||||
release: build test
|
release: build test
|
||||||
go get -u github.com/git-chglog/git-chglog/cmd/git-chglog
|
go get -u github.com/git-chglog/git-chglog/cmd/git-chglog
|
||||||
|
|
Loading…
Reference in New Issue