Skip to content

Commit

Permalink
Update golangci-lint (#3534)
Browse files Browse the repository at this point in the history
Also make sure we alway use the version we’ve just
installed.

Signed-off-by: David Gageot <david@gageot.net>
  • Loading branch information
dgageot authored Jan 20, 2020
1 parent 99870a8 commit d0a9b95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions hack/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ linters:
enable:
- bodyclose
- deadcode
- dogsled
- goconst
- gocritic
- goimports
- golint
- goprintffuncname
- gosimple
- govet
- ineffassign
- interfacer
- maligned
- misspell
- nakedret
- rowserrcheck
- staticcheck
- structcheck
- stylecheck
Expand All @@ -25,8 +29,6 @@ linters:
- unparam
- unused
- varcheck
- dogsled
- nakedret
- whitespace

linters-settings:
Expand Down
4 changes: 2 additions & 2 deletions hack/linter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if ! [ -x "$(command -v golangci-lint)" ]; then
echo "Installing GolangCI-Lint"
${DIR}/install_golint.sh -b $GOPATH/bin v1.22.2
${DIR}/install_golint.sh -b $GOPATH/bin v1.23.0
fi

VERBOSE=""
if [[ "${TRAVIS}" == "true" ]]; then
VERBOSE="-v --print-resources-usage"
fi

golangci-lint run ${VERBOSE} -c ${DIR}/golangci.yml \
$GOPATH/bin/golangci-lint run ${VERBOSE} -c ${DIR}/golangci.yml \
| awk '/out of memory/ || /Timeout exceeded/ {failed = 1}; {print}; END {exit failed}'

0 comments on commit d0a9b95

Please sign in to comment.