Skip to content

Commit

Permalink
Fix golangci-lint config to use default golint (#2284)
Browse files Browse the repository at this point in the history
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 <siggy@buoyant.io>
  • Loading branch information
siggy authored and klingerf committed Feb 14, 2019
1 parent f383c9e commit 044e0a5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ web/app/yarn-error.log
.protoc
.gorun
.dep*
.golangci*
.golangci-lint*
**.gogen*
**/*.swp
14 changes: 14 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
issues:
exclude-use-default: false
linters:
enable:
- gofmt
- golint
disable:
- deadcode
- errcheck
- gosimple
- staticcheck
- structcheck
- unused
- varcheck
5 changes: 1 addition & 4 deletions bin/lint
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"

0 comments on commit 044e0a5

Please sign in to comment.