Skip to content

Commit

Permalink
Ignore gofmt errors from vendor folder
Browse files Browse the repository at this point in the history
This started failing with Go 1.20, but I haven't been able
to find out why yet, despite vendor being excluded from the
list of packages/files to test.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Aug 29, 2023
1 parent 2a30804 commit 1d2e443
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Version := $(shell git describe --tags --dirty)
GitCommit := $(shell git rev-parse HEAD)
LDFLAGS := "-s -w -X github.com/alexellis/k3sup/cmd.Version=$(Version) -X github.com/alexellis/k3sup/cmd.GitCommit=$(GitCommit)"
export GO111MODULE=on
SOURCE_DIRS = cmd pkg main.go
SOURCE_DIRS = main.go cmd pkg

.PHONY: all
all: gofmt test dist hash
Expand All @@ -13,8 +13,8 @@ test:
CGO_ENABLED=0 go test $(shell go list ./... | grep -v /vendor/|xargs echo) -cover

.PHONY: gofmt
gofmt:
@test -z $(shell gofmt -l -s $(SOURCE_DIRS) ./ | tee /dev/stderr) || (echo "[WARN] Fix formatting issues with 'make fmt'" && exit 1)
gofmt:
@test -z $(shell gofmt -l $(SOURCE_DIRS) ./ | grep -v vendor/| tee /dev/stderr) || (echo "[WARN] Fix formatting issues with 'make gofmt'" && exit 1)

.PHONY: dist
dist:
Expand Down
19 changes: 16 additions & 3 deletions vendor/github.com/spf13/pflag/flag.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1d2e443

Please sign in to comment.