Skip to content

Commit

Permalink
Update golangci-lint
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 committed Jan 20, 2020
1 parent 2ba2af8 commit aea00a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions hack/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ linters:
enable:
- bodyclose
- deadcode
- dogsled
- dogsled
- goconst
- gocritic
- goimports
- golint
- goprintffuncname
- gosimple
- govet
- ineffassign
- interfacer
- maligned
- misspell
- nakedret
- nakedret
- rowserrcheck
- staticcheck
- structcheck
- stylecheck
Expand All @@ -25,8 +31,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 aea00a6

Please sign in to comment.