From c581ceb1dc1c7a6457988b84b6cadaa4c5253a81 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Tue, 3 Dec 2019 16:23:09 +0300 Subject: [PATCH] add golanglint-ci Signed-off-by: Vasiliy Tolstov --- .golangci.yml | 26 ++++++++++++++++++++++++++ .travis.yml | 6 ++++++ 2 files changed, 32 insertions(+) create mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 00000000..0228bfc5 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,26 @@ +run: + deadline: 10m +linters: + disable-all: false + enable-all: false + enable: + - megacheck + - staticcheck + - deadcode + - varcheck + - gosimple + - unused + - prealloc + - scopelint + - gocritic + - goimports + - unconvert + - govet + - nakedret + - structcheck + - gosec + disable: + - maligned + - interfacer + - typecheck + - dupl diff --git a/.travis.yml b/.travis.yml index e2a018e2..d26a9c52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,12 @@ go: - 1.13.x env: - GO111MODULE=on IN_TRAVIS_CI=yes +before_script: + - go install github.com/golangci/golangci-lint/cmd/golangci-lint +script: + - golangci-lint run || true + - go test -v -race ./... || true + - go test -v ./... notifications: slack: secure: aEvhLbhujaGaKSrOokiG3//PaVHTIrc3fBpoRbCRqfZpyq6WREoapJJhF+tIpWWOwaC9GmChbD6aHo/jMUgwKXVyPSaNjiEL87YzUUpL8B2zslNp1rgfTg/LrzthOx3Q1TYwpaAl3to0fuHUVFX4yMeC2vuThq7WSXgMMxFCtbc=