Skip to content

Commit

Permalink
review: fix issues
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Hiller <[email protected]>
  • Loading branch information
dhiller committed Jan 16, 2025
1 parent e1cb659 commit d2504f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ linters:
- gocyclo
linters-settings:
gocyclo:
min-complexity: 10
min-complexity: 10
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
.PHONY: make-artifacts-dir generate validate-sigs test coverage install-metrics-binaries lint
.PHONY: generate validate-sigs test coverage lint

export GOLANGCI_LINT_VERSION := v1.62.2
ifndef GOPATH
GOPATH=$(shell go env GOPATH)
export GOPATH
endif
WORKDIR := /tmp
LOCAL_BIN := $(WORKDIR)/local_bin
PATH := $(LOCAL_BIN):${PATH}
ifndef ARTIFACTS
ARTIFACTS=/tmp/artifacts
export ARTIFACTS
export ARTIFACTS := $(WORKDIR)/artifacts
endif
ifndef COVERAGE_OUTPUT_PATH
COVERAGE_OUTPUT_PATH=${ARTIFACTS}/coverage.html
export COVERAGE_OUTPUT_PATH
COVERAGE_OUTPUT_PATH := ${ARTIFACTS}/coverage.html
endif

make-artifacts-dir:
work-dirs:
mkdir -p ${ARTIFACTS}
mkdir -p ${LOCAL_BIN}

generate:
go run ./validators/cmd/sigs --dry-run=false
Expand All @@ -28,13 +30,11 @@ validate-sigs:
test:
go test ./...

coverage: make-artifacts-dir
if ! command -V covreport; then go install github.com/cancue/covreport@latest; fi
coverage: work-dirs
if ! command -V covreport; then GOBIN=$(LOCAL_BIN) go install github.com/cancue/covreport@latest; fi
go test ./... -coverprofile=/tmp/coverage.out
covreport -i /tmp/coverage.out -o ${COVERAGE_OUTPUT_PATH}
covreport -i /tmp/coverage.out -o $(COVERAGE_OUTPUT_PATH)

install-metrics-binaries:
if ! command -V golangci-lint; then curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOPATH}/bin ${GOLANGCI_LINT_VERSION} ; fi

lint: install-metrics-binaries
lint: work-dirs
if ! command -V golangci-lint; then curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${LOCAL_BIN}" ${GOLANGCI_LINT_VERSION} ; fi
golangci-lint run --verbose

0 comments on commit d2504f8

Please sign in to comment.