Skip to content

Commit

Permalink
Use vendor dependencies. Don’t download them. (#2579)
Browse files Browse the repository at this point in the history
This can’t be set on the command line. We have
to use a config file.

Also, removed the `--skip-dirs vendor` because
it’s done by default by golangci-lint.

Signed-off-by: David Gageot <[email protected]>
  • Loading branch information
dgageot authored Jul 31, 2019
1 parent e80a637 commit 323beec
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
27 changes: 27 additions & 0 deletions hack/golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
run:
deadline: 6m
modules-download-mode: vendor

linters:
disable-all: true
enable:
- bodyclose
- deadcode
- goconst
- gocritic
- goimports
- golint
- gosimple
- govet
- ineffassign
- interfacer
- maligned
- misspell
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
27 changes: 2 additions & 25 deletions hack/linter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,5 @@ if [[ "${TRAVIS}" == "true" ]]; then
VERBOSE="-v --print-resources-usage"
fi

golangci-lint run ${VERBOSE} \
--deadline=6m \
--no-config \
--disable-all \
-E bodyclose \
-E deadcode \
-E goconst \
-E gocritic \
-E goimports \
-E golint \
-E gosimple \
-E govet \
-E ineffassign \
-E interfacer \
-E maligned \
-E misspell \
-E staticcheck \
-E structcheck \
-E stylecheck \
-E typecheck \
-E unconvert \
-E unparam \
-E unused \
-E varcheck \
--skip-dirs vendor | awk '/out of memory/ || /Deadline exceeded/ {failed = 1}; {print}; END {exit failed}'
golangci-lint run ${VERBOSE} -c ${DIR}/golangci.yml \
| awk '/out of memory/ || /Deadline exceeded/ {failed = 1}; {print}; END {exit failed}'

0 comments on commit 323beec

Please sign in to comment.