From c7abeae816a8170ed8e78c68dc15ee3c10eef2ef Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Mon, 6 May 2019 15:42:50 +0200 Subject: [PATCH] *: enable default linters (#1334) Signed-off-by: Simon Pasquier --- .golangci.yml | 14 +++++++++----- scripts/errcheck_excludes.txt | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 scripts/errcheck_excludes.txt diff --git a/.golangci.yml b/.golangci.yml index fd975b2d..b421c1fe 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,8 +1,12 @@ run: modules-download-mode: vendor -# Run only staticcheck for now. Additional linters will be enabled one-by-one. -linters: - enable: - - staticcheck - disable-all: true +issues: + exclude-rules: + - path: _test.go + linters: + - errcheck + +linters-settings: + errcheck: + exclude: scripts/errcheck_excludes.txt diff --git a/scripts/errcheck_excludes.txt b/scripts/errcheck_excludes.txt new file mode 100644 index 00000000..2cadaa53 --- /dev/null +++ b/scripts/errcheck_excludes.txt @@ -0,0 +1,2 @@ +// Used in HTTP handlers, any error is handled by the server itself. +(net/http.ResponseWriter).Write