-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix makefile common case sensitivity
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# In order to ensure make instructions fail if there is command that fails a pipe (ie: `go test ... | tee -a ./test_results.txt`) | ||
# the value `-o pipefail` (or `set -o pipefail`) is added to each shell command that make runs | ||
# otherwise in the example command pipe, only the exit code of `tee` is recorded instead of `go test` which can cause | ||
# test to pass in CI when they should not. | ||
SHELL = /bin/bash | ||
ifeq ($(shell uname -s),Windows) | ||
.SHELLFLAGS = /o pipefile /c | ||
else | ||
.SHELLFLAGS = -o pipefail -c | ||
endif | ||
|
||
# SRC_ROOT is the top of the source tree. | ||
SRC_ROOT := $(shell git rev-parse --show-toplevel) | ||
|
||
.PHONY: lint | ||
lint: | ||
@go fmt ./... | ||
@go vet ./... | ||
@staticcheck ./... | ||
@gosec ./... | ||
@goimports -w ./ | ||
|
||
.PHONY: tidy | ||
tidy: | ||
@rm go.sum | ||
@go mod tidy -compat=1.19 |