Skip to content

Commit 322565e

Browse files
committed
Add lint
1 parent 279acf1 commit 322565e

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

.golangci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
run:
2+
timeout: 3m
3+
4+
linters:
5+
enable:
6+
- gofmt

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
PRE_COMMIT := pre-commit
2+
23
JSONNET_VERSION := v0.18.0
4+
GOLANGCI_VERSION := v1.46.1
35

46
.PHONY: fmt
57
fmt:
68
@go fmt ./...
79

10+
.PHONY: lint
11+
lint:
12+
@golangci-lint run ./...
13+
814
.PHONY: test
915
test:
1016
@go test -v ./...
@@ -18,3 +24,5 @@ run:
1824
setup:
1925
@go install github.com/google/go-jsonnet/cmd/jsonnet-lint@$(JSONNET_VERSION)
2026
@go install github.com/google/go-jsonnet/cmd/jsonnetfmt@$(JSONNET_VERSION)
27+
28+
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin $(GOLANGCI_VERSION)

0 commit comments

Comments
 (0)