Skip to content

Commit

Permalink
run go build on all modules to catch compilation errors (#250)
Browse files Browse the repository at this point in the history
golangci-lint just issues an unreadable warning and quits with a
successful exit status on compilation error. just run a round of go
build ./... to catch those as hard errors.
  • Loading branch information
krnowak authored and rghetia committed Oct 30, 2019
1 parent f420f74 commit cdf3f49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ $(TOOLS_DIR)/stringer: go.mod go.sum tools.go
precommit: $(TOOLS_DIR)/golangci-lint $(TOOLS_DIR)/misspell $(TOOLS_DIR)/stringer
PATH="$(abspath $(TOOLS_DIR)):$${PATH}" go generate ./...
# TODO: Fix this on windows.
set -e; for dir in $(ALL_GO_MOD_DIRS); do \
echo "compiling all packages in $${dir}"; \
(cd "$${dir}" && go build ./...); \
done
set -e; for dir in $(ALL_GO_MOD_DIRS); do \
echo "golangci-lint in $${dir}"; \
(cd "$${dir}" && $(abspath $(TOOLS_DIR))/golangci-lint run --fix); \
Expand Down

0 comments on commit cdf3f49

Please sign in to comment.