Skip to content

Commit

Permalink
Makefile: Align golangci-lint with Incus
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed Sep 4, 2024
1 parent d71e81f commit 6039c5a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ VERSION=$(shell grep "var Version" shared/version/version.go | cut -d'"' -f2)
ARCHIVE=distrobuilder-$(VERSION).tar
GO111MODULE=on
SPHINXENV=.sphinx/venv/bin/activate
GOPATH=$(shell go env GOPATH)

.PHONY: default
default:
Expand Down Expand Up @@ -75,8 +76,8 @@ doc-lint:

.PHONY: static-analysis
static-analysis:
ifeq ($(shell command -v golangci-lint 2> /dev/null),)
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.0
ifeq ($(shell command -v golangci-lint),)
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin
endif
golangci-lint run --timeout 5m
$(GOPATH)/bin/golangci-lint run --timeout 5m
run-parts $(shell run-parts -V 2> /dev/null 1> /dev/null && echo -n "--exit-on-error --regex '.sh'") test/lint

0 comments on commit 6039c5a

Please sign in to comment.