From 28025da170fdd77bf12dd4d9cdb663da0ea0679a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 8 Jul 2022 18:42:28 -0600 Subject: Add a Makefile that runs lint and stuff --- .golangci.yml | 8 + Makefile | 37 ++ tools/src/golangci-lint/go.mod | 165 +++++ tools/src/golangci-lint/go.sum | 1414 ++++++++++++++++++++++++++++++++++++++++ tools/src/golangci-lint/pin.go | 6 + 5 files changed, 1630 insertions(+) create mode 100644 .golangci.yml create mode 100644 Makefile create mode 100644 tools/src/golangci-lint/go.mod create mode 100644 tools/src/golangci-lint/go.sum create mode 100644 tools/src/golangci-lint/pin.go diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..9067d40 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,8 @@ +linters: + disable: + - structcheck # doesn't support Go 1.18 yet + enable: + - gofmt +linters-settings: + gofmt: + simplify: true diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..73263d0 --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +# main + +build: + go build -o bin/ ./cmd/... +.PHONY: build + +check: + go test -race ./... +.PHONY: check + +lint: tools/bin/golangci-lint + tools/bin/golangci-lint run ./... +.PHONY: lint + +# tools + +tools/bin/%: tools/src/%/pin.go tools/src/%/go.mod + cd $(