Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

lint: Switch golang linter to golangci-lint#1315

Merged
teawater merged 1 commit into
kata-containers:masterfrom
ganeshmaharaj:go-linter-change
Mar 22, 2019
Merged

lint: Switch golang linter to golangci-lint#1315
teawater merged 1 commit into
kata-containers:masterfrom
ganeshmaharaj:go-linter-change

Conversation

@ganeshmaharaj
Copy link
Copy Markdown

@ganeshmaharaj ganeshmaharaj commented Mar 19, 2019

gometalinter is deprecated and will be archived April '19. The
suggestion is to switch to golangci-lint which is apparently 5x faster
than gometalinter.

Partially fixes: github.com/kata-containers/runtime#1377

Signed-off-by: Ganesh Maharaj Mahalingam ganesh.mahalingam@intel.com

@chavafg
Copy link
Copy Markdown
Contributor

chavafg commented Mar 19, 2019

Seems like travis couldnt install the golangci-lint. Actually not sure if it supports dependencies from another PR:

.ci/static-checks.sh: line 254: golangci-lint: command not found
The command "bash .ci/static-checks.sh github.com/kata-containers/tests" exited with 127.

For the jenkins build we should, but can you please change the
Depends-On: to Depends-on: on your commit message?

@ganeshmaharaj
Copy link
Copy Markdown
Author

ganeshmaharaj commented Mar 19, 2019

@chavafg should i just leave the golangci-lint description in the versions.yaml file that exists in the tests repository?

I am also seeing an error with the call to static-checks.sh.

16.59s$ bash .ci/static-checks.sh github.com/kata-containers/tests
/Users/travis/gopath/src/github.com/kata-containers/tests/lib/common.bash: line 37: syntax error near unexpected token `;'
grep: /proc/cpuinfo: No such file or directory

@chavafg
Copy link
Copy Markdown
Contributor

chavafg commented Mar 19, 2019

@ganeshmaharaj yeah, that makes more sense, it is only a tool that we use for testing.

@ganeshmaharaj ganeshmaharaj force-pushed the go-linter-change branch 6 times, most recently from 92093d0 to 602f17d Compare March 19, 2019 23:11
@devimc
Copy link
Copy Markdown

devimc commented Mar 20, 2019

@ganeshmaharaj please rease your pr, #1309 was merged

@ganeshmaharaj ganeshmaharaj force-pushed the go-linter-change branch 4 times, most recently from 69b8739 to fee6f73 Compare March 20, 2019 17:39
@ganeshmaharaj
Copy link
Copy Markdown
Author

/test

Comment thread integration/docker/docker.go Outdated
Comment thread integration/docker/docker.go Outdated
Comment thread integration/docker/docker.go Outdated
Comment thread versions.yaml
@ganeshmaharaj ganeshmaharaj force-pushed the go-linter-change branch 2 times, most recently from 4a9e488 to 8f673f7 Compare March 21, 2019 01:12
gometalinter is deprecated and will be archived April '19. The
suggestion is to switch to golangci-lint which is apparently 5x faster
than gometalinter.

Fixes kata-containers#1323

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
@GabyCT
Copy link
Copy Markdown
Contributor

GabyCT commented Mar 21, 2019

/test

@chavafg
Copy link
Copy Markdown
Contributor

chavafg commented Mar 22, 2019

arm CI failed:

16:43:11 level=info msg="[lintersdb] Optimized sublinters [staticcheck gosimple unused stylecheck] into metalinter megacheck"
16:43:12 level=info msg="[loader] Go packages loading at mode load deps types and syntax took 896.6973ms"
16:43:12 level=error msg="Running error: context loading failed: failed to load program with go/packages: go [list -e -json -compiled -test=true -export=false -deps=true -find=false -- ./...]: exit status 1: go: disabling cache (/home/jenkins/.cache/go-build) due to initialization failure: open /home/jenkins/.cache/go-build/log.txt: permission denied\ngo list -compiled requires build cache\n"
16:43:12 level=info msg="Memory: 11 samples, avg is 69.2MB, max is 69.2MB"

seems like any idea on this error @Pennyzct

@teawater
Copy link
Copy Markdown
Member

jenkins-metrics-ubuntu-16-04:

Drop caches
/usr/local/bin/kata-runtime
Logging kata-env information:
[Meta]
  Version = "1.0.20"

It doesn't call static-checks.sh.
So I think this PR does not relate to this fail.

jenkins-ci-ARM-ubuntu-18-04:

INFO: No katacontainers key found - not removing
~/workspace/kata-containers-tests-ARM-18.04-PR/go/src/github.com/kata-containers/tests ~/workspace/kata-containers-tests-ARM-18.04-PR/go/src/github.com/kata-containers/tests
/tmp/install-go-tmp.zlYjhCEs5z ~/workspace/kata-containers-tests-ARM-18.04-PR/go/src/github.com/kata-containers/tests
/home/jenkins/workspace/kata-containers-tests-ARM-18.04-PR/go/bin/yq: line 1: Not: command not found
Missing go version or -p option
Usage:

Looks it still not arrive static-checks.sh.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants