Browse Source

Add golangci linter

pull/661/head
Sukhjit Singh 4 years ago
parent
commit
5232164d78
  1. 1
      .gitignore
  2. 11
      .golangci.yaml
  3. 8
      Makefile

1
.gitignore vendored

@ -0,0 +1 @@
/bin

11
.golangci.yaml

@ -0,0 +1,11 @@
run:
timeout: 5m
linters:
disable-all: true
enable:
- bodyclose
- deadcode
- ineffassign
- staticcheck
- unused

8
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 ./...
Loading…
Cancel
Save