From 044e0a5bb4fcbc01330ebb15a476fa997fcc66fc Mon Sep 17 00:00:00 2001 From: Andrew Seigner Date: Thu, 14 Feb 2019 13:55:30 -0800 Subject: [PATCH] Fix golangci-lint config to use default golint (#2284) golangci-lint disables some checks for golint, including checks for well-formed comments on all exported symbols This change disables the golangci-lint's `exclude-use-default` setting, to run golint with default settings. Also introduce a `.golangci.yml` file to centralize config. Signed-off-by: Andrew Seigner --- .gitignore | 2 +- .golangci.yml | 14 ++++++++++++++ bin/lint | 5 +---- 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 .golangci.yml diff --git a/.gitignore b/.gitignore index 189761b298c5a..aa2ecf33abfc3 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,6 @@ web/app/yarn-error.log .protoc .gorun .dep* -.golangci* +.golangci-lint* **.gogen* **/*.swp diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000000000..f8e0c21e393d4 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,14 @@ +issues: + exclude-use-default: false +linters: + enable: + - gofmt + - golint + disable: + - deadcode + - errcheck + - gosimple + - staticcheck + - structcheck + - unused + - varcheck diff --git a/bin/lint b/bin/lint index a48d095a95ea5..e0cef8db19d12 100755 --- a/bin/lint +++ b/bin/lint @@ -27,7 +27,4 @@ if [ ! -f "$lintbin" ]; then mv ./golangci-lint${exe} $lintbin fi -$lintbin run \ - --enable gofmt,golint \ - --disable deadcode,errcheck,gosimple,staticcheck,structcheck,unused,varcheck \ - "$@" +$lintbin run "$@"