mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
golangci: enable 'gofmt'
This commit is contained in:
parent
62eecc8175
commit
fca1d61528
2 changed files with 9 additions and 13 deletions
|
@ -31,7 +31,7 @@ linters:
|
|||
- goconst
|
||||
#- gocritic
|
||||
#- gocyclo
|
||||
#- gofmt
|
||||
- gofmt
|
||||
- goimports
|
||||
- golint
|
||||
#- gomnd
|
||||
|
|
20
Makefile
20
Makefile
|
@ -5,19 +5,15 @@ ifeq (, $(shell which golangci-lint))
|
|||
$(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh")
|
||||
endif
|
||||
|
||||
.PHONY: fmt lint test install_deps clean
|
||||
.PHONY: lint test install_deps clean
|
||||
|
||||
default: all
|
||||
|
||||
all: fmt test
|
||||
all: test
|
||||
|
||||
fmt:
|
||||
$(info ******************** checking formatting ********************)
|
||||
@test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1)
|
||||
|
||||
lint:
|
||||
$(info ******************** running lint tools ********************)
|
||||
golangci-lint run -v
|
||||
install_deps:
|
||||
$(info ******************** downloading dependencies ********************)
|
||||
go get -v ./...
|
||||
|
||||
test: install_deps
|
||||
$(info ******************** running tests ********************)
|
||||
|
@ -27,9 +23,9 @@ richtest: install_deps
|
|||
$(info ******************** running tests with kyoh86/richgo ********************)
|
||||
richgo test -v ./...
|
||||
|
||||
install_deps:
|
||||
$(info ******************** downloading dependencies ********************)
|
||||
go get -v ./...
|
||||
lint:
|
||||
$(info ******************** running lint tools ********************)
|
||||
golangci-lint run -v
|
||||
|
||||
clean:
|
||||
rm -rf $(BIN)
|
||||
|
|
Loading…
Reference in a new issue