Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

linter: remove deadcode linter check for generic item#1433

Merged
teawater merged 1 commit into
kata-containers:masterfrom
Pennyzct:nolint/deadcode
Apr 2, 2019
Merged

linter: remove deadcode linter check for generic item#1433
teawater merged 1 commit into
kata-containers:masterfrom
Pennyzct:nolint/deadcode

Conversation

@Pennyzct
Copy link
Copy Markdown
Contributor

@Pennyzct Pennyzct commented Mar 28, 2019

ARM CI is failing.
Copy log from #1414:

18:09:54 func genericMemoryTopology(memoryMb, hostMemoryMb uint64, slots uint8, memoryOffset uint32) govmmQemu.Memory {
18:09:54      ^
18:09:54 cli/kata-check.go:55:2: `genericCPUFlagsTag` is unused (deadcode)
18:09:54 	genericCPUFlagsTag    = "flags"      // nolint: varcheck, unused
18:09:54 	^
18:09:54 cli/kata-check.go:56:2: `genericCPUVendorField` is unused (deadcode)
18:09:54 	genericCPUVendorField = "vendor_id"  // nolint: varcheck, unused
18:09:54 	^
18:09:54 cli/kata-check.go:57:2: `genericCPUModelField` is unused (deadcode)
18:09:54 	genericCPUModelField  = "model name" // nolint: varcheck, unused
18:09:54 	^
18:09:54 cli/kata-check_test.go:31:6: `testCPUData` is unused (deadcode)
18:09:54 type testCPUData struct {
18:09:54      ^
18:09:54 cli/kata-check_test.go:151:6: `genericTestGetCPUDetails` is unused (deadcode)
18:09:54 func genericTestGetCPUDetails(t *testing.T, validVendor string, validModel string, validContents string, data []testCPUDetail) {
18:09:54      ^
18:10:07 Build step 'Execute shell' marked build as failure

After we switched golang linter to golangci-lint, we has extra deadcode linter check, and we need to remove this linter check for all generic* items.

Fixes: #1432

Signed-off-by: Penny Zheng penny.zheng@arm.com

After we switched golang linter to golangci-lint, we has extra 'deadcode'
linter check, and we need to remove this linter check for all
generic items.

Fixes: kata-containers#1432

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
@Pennyzct
Copy link
Copy Markdown
Contributor Author

/test

@Pennyzct
Copy link
Copy Markdown
Contributor Author

@teawater ARM CI is working well now. ;)

@Pennyzct
Copy link
Copy Markdown
Contributor Author

I will /retest to see if it's repeatable. ;)

@devimc
Copy link
Copy Markdown

devimc commented Apr 1, 2019

can we merge this?

@teawater
Copy link
Copy Markdown
Member

teawater commented Apr 2, 2019

jenkins-ci-opensuse-15 failed:

GitHub pull request #1433 of commit 2e5194e2795ae997a5d2ca0406fff6dd8bee3770, no merge conflicts.
Setting status of 2e5194e2795ae997a5d2ca0406fff6dd8bee3770 to PENDING with url http://jenkins.katacontainers.io/job/kata-containers-runtime-opensuse-15-PR/150/ and message: 'Build running'
Using context: jenkins-ci-opensuse-15
Building remotely on opensuse15-azure63d9c0 (opensuse15-azure opensuse15_azure) in workspace /tmp/jenkins/workspace/kata-containers-runtime-opensuse-15-PR
No credentials specified
Cloning the remote Git repository
Cloning repository https://github.com/kata-containers/runtime.git
 > git init /tmp/jenkins/workspace/kata-containers-runtime-opensuse-15-PR # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init /tmp/jenkins/workspace/kata-containers-runtime-opensuse-15-PR
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:882)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:662)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:154)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to opensuse15-azure63d9c0
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:957)

I think this PR does not relate to this fail.

@teawater teawater merged commit 12437c2 into kata-containers:master Apr 2, 2019
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.

3 participants