Jonas Franz
6 years ago
9 changed files with 62 additions and 6 deletions
@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
|
||||
kind: pipeline |
||||
name: default |
||||
|
||||
steps: |
||||
- name: lint |
||||
image: golang:1.12 |
||||
commands: |
||||
- make lint |
||||
- make golangci-lint |
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
linters: |
||||
enable: |
||||
- gosimple |
||||
- deadcode |
||||
- typecheck |
||||
- govet |
||||
- errcheck |
||||
- staticcheck |
||||
- unused |
||||
- structcheck |
||||
- varcheck |
||||
- golint |
||||
- dupl |
||||
- gofmt |
||||
- misspell |
||||
- gocritic |
||||
enable-all: false |
||||
disable-all: true |
||||
fast: false |
||||
|
||||
linters-settings: |
||||
gocritic: |
||||
disabled-checks: |
||||
- ifElseChain |
||||
- singleCaseSwitch # Every time this occured in the code, there was no other way. |
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
.PHONY: golangci-lint |
||||
golangci-lint: |
||||
@hash golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ |
||||
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.16.0; \ |
||||
fi |
||||
golangci-lint run |
||||
|
||||
.PHONY: lint |
||||
lint: |
||||
@hash golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ |
||||
go get -u golang.org/x/lint/golint; \ |
||||
fi |
||||
golint ./... |
Loading…
Reference in new issue