diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5e56e04 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000..c50a73b --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,11 @@ +run: + timeout: 5m + +linters: + disable-all: true + enable: + - bodyclose + - deadcode + - ineffassign + - staticcheck + - unused diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..65f2212 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +GOBIN=$(shell pwd)/bin + +install-lint: + @curl -sSfL -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.42.0 + +lint: install-lint + @echo "golangci-lint run ../..." + @$(GOBIN)/golangci-lint run ./...