Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YUNIKORN-2051] fix staticcheck errors #693

Closed
wants to merge 1 commit into from

Conversation

FrankYang0529
Copy link
Member

What is this PR for?

pkg/admission/conf/am_conf.go:400:6: func parseConfigInt is unused (U1000)
pkg/admission/webhook_manager.go:72:2: field namespace is unused (U1000)
pkg/appmgmt/general/general.go:123:9: assigning the result of this type assertion to a variable (switch obj := obj.(type)) could eliminate type assertions in switch cases (S1034)
    pkg/appmgmt/general/general.go:125:10: could eliminate this type assertion
pkg/cache/context_test.go:471:2: this value of found is never used (SA4006)
pkg/cache/task_test.go:31:2: package "k8s.io/apimachinery/pkg/apis/meta/v1" is being imported more than once (ST1019)
    pkg/cache/task_test.go:32:2: other import of "k8s.io/apimachinery/pkg/apis/meta/v1"
pkg/cmd/shim/main.go:53:15: type assertion to the same type: serviceContext.RMProxy already has type api.SchedulerAPI (S1040)
pkg/dispatcher/dispatch_test.go:209:4: should use fmt.Printf instead of fmt.Println(fmt.Sprintf(...)) (but don't forget the newline) (S1038)
pkg/dispatcher/dispatch_test.go:211:4: should use fmt.Printf instead of fmt.Println(fmt.Sprintf(...)) (but don't forget the newline) (S1038)
pkg/plugin/scheduler_plugin.go:268:15: type assertion to the same type: serviceContext.RMProxy already has type api.SchedulerAPI (S1040)
test/e2e/admission_controller/admission_controller_suite_test.go:28:2: package "github.com/onsi/gomega" is being imported more than once (ST1019)
    test/e2e/admission_controller/admission_controller_suite_test.go:29:2: other import of "github.com/onsi/gomega"
test/e2e/framework/helpers/common/utils.go:203:15: error strings should not be capitalized (ST1005)
test/e2e/framework/helpers/k8s/k8s_utils.go:759:99: error should be returned as the last argument (ST1008)
test/e2e/framework/helpers/yunikorn/rest_api_utils.go:294:14: error strings should not be capitalized (ST1005)
test/e2e/node_resources/node_resources_suite_test.go:57:5: var kClient is unused (U1000)

What type of PR is it?

  • - Improvement

What is the Jira issue?

https://issues.apache.org/jira/browse/YUNIKORN-2051

@FrankYang0529 FrankYang0529 self-assigned this Oct 20, 2023
@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

Merging #693 (6c7fcec) into master (7b08702) will increase coverage by 0.07%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #693      +/-   ##
==========================================
+ Coverage   71.81%   71.89%   +0.07%     
==========================================
  Files          51       51              
  Lines        8105     8096       -9     
==========================================
  Hits         5821     5821              
+ Misses       2084     2075       -9     
  Partials      200      200              
Files Coverage Δ
pkg/admission/conf/am_conf.go 72.10% <ø> (+2.68%) ⬆️
pkg/admission/webhook_manager.go 77.06% <ø> (ø)
pkg/appmgmt/general/general.go 65.90% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pbacsko pbacsko self-requested a review October 24, 2023 12:35
Copy link
Contributor

@pbacsko pbacsko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@pbacsko pbacsko closed this in d18f7c2 Oct 24, 2023
@FrankYang0529 FrankYang0529 deleted the YUNIKORN-2051 branch October 24, 2023 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants