Skip to content

Commit

Permalink
Added nilaway to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
fra98 authored and adamjensenbot committed Jan 3, 2024
1 parent 1b05108 commit 4456cf7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,20 @@ md-lint: markdownlint
lint: golangci-lint
$(GOLANGCILINT) run --new

# Install nilaway if not available
nilaway:
ifeq (, $(shell which nilaway))
@go install go.uber.org/nilaway/cmd/nilaway@latest
NILAWAY=$(GOBIN)/nilaway
else
NILAWAY=$(shell which nilaway)
endif

# Run static check anaylisis tools.
# - nilaway: static analysis tool to detect potential Nil panics in Go code
staticcheck: nilaway
$(NILAWAY) -include-pkgs github.com/liqotech/liqo ./...

generate-controller: controller-gen
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./apis/..."

Expand Down

0 comments on commit 4456cf7

Please sign in to comment.