Commit Graph

46 Commits

Author SHA1 Message Date
mattjmcnaughton
42f8596b13 Fix staticcheck failures in test/utils/...
The `err` return value was being overwritten in an unintended way, which
means the function may not return the proper error value. This diff
ensures it does.
2019-10-01 09:46:45 -04:00
wojtekt
59533f0cd1 Remove deprecated scalability tests 2019-09-30 16:04:09 +02:00
Kubernetes Prow Robot
d82ab4054d Merge pull request #81989 from RainbowMango/pr_cleanup_staticcheck_for_apiextension
Cleanup staticcheck issues for apiextension
2019-09-26 01:25:23 -07:00
RainbowMango
ea75ee32c0 Fix staticcheck issues:
Dealing with unused functions/variables/types. (staticcheck U1000)
Dealing with value never used issue. (staticcheck SA4006)
Dealing with concurrency issue. (staticcheck SA2002 SA4010)
Remove packages from staticcheck failure files: apiextensions-apiserver
2019-09-25 09:40:25 +08:00
Mark Janssen
1a1b7001d6 Fix staticcheck failures for scheduler packages
Errors from staticcheck:
cmd/kube-scheduler/app/server.go:297:27: prometheus.Handler is deprecated: Please note the issues described in the doc comment of InstrumentHandler. You might want to consider using promhttp.Handler instead.  (SA1019)
pkg/apis/scheduling/v1alpha1/defaults.go:27:6: func addDefaultingFuncs is unused (U1000)
pkg/apis/scheduling/v1beta1/defaults.go:27:6: func addDefaultingFuncs is unused (U1000)
test/e2e/scheduling/predicates.go:757:6: func verifyReplicasResult is unused (U1000)
test/e2e/scheduling/predicates.go:765:6: func getPodsByLabels is unused (U1000)
test/e2e/scheduling/predicates.go:772:6: func runAndKeepPodWithLabelAndGetNodeName is unused (U1000)
test/e2e/scheduling/limit_range.go:172:3: this value of pod is never used (SA4006)
test/e2e/scheduling/limit_range.go:177:3: this value of pod is never used (SA4006)
test/e2e/scheduling/limit_range.go:196:3: this value of pod is never used (SA4006)
test/e2e/scheduling/limit_range.go:201:3: this value of pod is never used (SA4006)
test/e2e/scheduling/limit_range.go:240:3: this value of pod is never used (SA4006)
test/e2e/scheduling/taints.go:428:13: this value of err is never used (SA4006)
test/e2e/scheduling/ubernetes_lite.go:219:2: this value of pods is never used (SA4006)
test/integration/scheduler/extender_test.go:78:4: this value of resp is never used (SA4006)
test/integration/volumescheduling/volume_binding_test.go:529:15: this result of append is never used, except maybe in other appends (SA4010)
test/integration/volumescheduling/volume_binding_test.go:538:15: this result of append is never used, except maybe in other appends (SA4010)
2019-09-23 22:52:57 +02:00
Mark Janssen
345e528c86 Fix staticcheck failures for pkg/scheduler/... 2019-09-23 22:49:59 +02:00
Kubernetes Prow Robot
946df1a914 Merge pull request #81932 from palnabarun/fix-staticcheck-tests-e2e_node
Fixes static check failures in test/e2e_node/*
2019-09-20 22:55:37 -07:00
hwdef
4e7ef9ad36 delete unused var 2019-09-19 18:04:13 +08:00
Kubernetes Prow Robot
41b3e60f0e Merge pull request #82325 from RainbowMango/pr_cleanupup_staticcheck_for_client_cache
Cleanup staticcheck for package cache
2019-09-17 00:50:24 -07:00
Kubernetes Prow Robot
84d484bd2c Merge pull request #81944 from carlory/fix-vendor
fix static check failures in staging  pkg
2019-09-16 06:48:39 -07:00
Kubernetes Prow Robot
ab88ff2398 Merge pull request #82571 from haoshuwei/fix-ineffassign-in-pkg-controller
add or fix some errors return statements and ineffassign
2019-09-16 04:50:37 -07:00
carlory
d3578f465d fix static check failures in staging pkg 2019-09-16 18:05:29 +08:00
haoshuwei
b752997036 add or fix some errors return statements and ineffassign
Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
2019-09-14 09:26:17 +08:00
Nabarun Pal
83c443e728 Fixes static check failures in test/e2e_node/* 2019-09-14 00:39:45 +05:30
Kubernetes Prow Robot
16cde44e24 Merge pull request #81703 from RainbowMango/pr_fix_static_failure_for_staging_kube-aggregator
Fix static failure from package: staging/src/k8s.io/kube-aggregator
2019-09-12 20:44:31 -07:00
Kubernetes Prow Robot
9586c602f2 Merge pull request #82486 from haoshuwei/fix-ineffassign
Fix ineffassign
2019-09-11 21:23:19 -07:00
Kubernetes Prow Robot
5b496d2a25 Merge pull request #82477 from haoshuwei/add-missing-err-return
fix some missing errors return statements
2019-09-11 18:29:57 -07:00
Kubernetes Prow Robot
99c4f1301d Merge pull request #81667 from mnogu/fix-static-check-in-controller-manager
Fix a static check failure in controller-manager
2019-09-11 18:26:39 -07:00
haoshuwei
573dcd7364 remove packages in hack/.staticcheck_failures which are passing staticcheck
Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
2019-09-10 11:01:32 +08:00
haoshuwei
ef0fe263aa remove packages in hack/.staticcheck_failures which are passing staticcheck
Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
2019-09-09 18:57:44 +08:00
RainbowMango
19e5c8565d Cleanup staticcheck from staging/src/k8s.io/client-go/tools/cache. 2019-09-04 18:35:24 +08:00
Maciej Szulik
786acdb668 Remove symlink support from kubectl cp 2019-09-03 10:42:30 +02:00
Muneyuki Noguchi
9f19665eb6 Fix a static check failure in controller-manager 2019-08-31 03:01:02 +00:00
Kubernetes Prow Robot
45522ebaca Merge pull request #82087 from soltysh/cp_back
Move kubectl cp back to k/k
2019-08-30 06:25:58 -07:00
Kubernetes Prow Robot
b131b4b4ca Merge pull request #81947 from RainbowMango/pr_cleanup_staticcheck_for_client_p1
Cleanup client-go static analysis issues-phase 1
2019-08-29 07:27:55 -07:00
Maciej Szulik
ab1c56ae87 Move kubectl cp back to k/k 2019-08-29 09:00:47 +02:00
RainbowMango
c8c055b316 Cleanup staticcheck issues for package in client-go. 2019-08-28 23:08:17 +08:00
Kubernetes Prow Robot
f0be447922 Merge pull request #81931 from RainbowMango/pr_cleanup_staticcheck_issues_for_vsphere
Cleanup vsphere staticcheck issue
2019-08-28 03:10:10 -07:00
RainbowMango
a36704b444 Clean up staticcheck issues. 2019-08-26 15:35:32 +08:00
Guangming Wang
c6791aa82b v1beta1: bugfix in Event struct definition
rebase master, handle staticcheck error
2019-08-26 11:06:16 +08:00
RainbowMango
4b6ac364f8 Clean up staticcheck issues for gce.
Dealing with deprecated issues. (staticcheck SA1019)
Dealing with error discard issue. (staticcheck SA4006)
Dealing with context overwritten issue. (staticcheck SA4009)
Dealing with unused functions. (staticcheck U1000)
Remove gce from staticcheck failure list
2019-08-24 10:14:39 +08:00
Travis Rhoden
dde8a6f7f6 Remove nsenter impl from pkg/vol/util
With the removal of the `--containerized` flag from kubelet, nothing
uses this code anymore.
2019-08-23 10:09:49 -06:00
Kubernetes Prow Robot
994bc115f9 Merge pull request #81510 from serathius/stable-metrics-analysis
Finish implementation of stable metrics static analysis
2019-08-23 03:27:17 -07:00
Kubernetes Prow Robot
01d1748d10 Merge pull request #81718 from hwdef/fix-cluster-images-conformance-go-runner
fix cluster/images/conformance/go-runner/tar_test.go
2019-08-22 23:28:13 -07:00
Kubernetes Prow Robot
81c0febcd0 Merge pull request #81715 from SataQiu/fix-test-e2e-framework
Fix static check for test/e2e/framework
2019-08-22 23:27:55 -07:00
Kubernetes Prow Robot
39d5fc7501 Merge pull request #81656 from SataQiu/fix-kubeadm-static-20190820
kubeadm: fix static check failures
2019-08-22 23:27:28 -07:00
Kubernetes Prow Robot
b8f4f27eda Merge pull request #81680 from sadlil/sadlil/fix-static-check-volume-controller
volume-controller: fix static check failures
2019-08-22 22:03:44 -07:00
SataQiu
7a4cf591ea kubeadm: fix static check failures 2019-08-23 10:51:12 +08:00
hwdef
296705b9c0 fix cluster/images/conformance/go-runner/tar_test.go 2019-08-22 11:32:18 +08:00
Marek Siarkowicz
53fc6f9b58 Finish implementation of stable metrics static analysis
Handle "DeprecatedVersion" field
Fix kube metrics framework path
Implement handling prometheus util functions for generating buckets
2019-08-21 23:46:36 +02:00
Tim Allclair
b3f8671c61 Un-blacklist pkg/kubelet for staticcheck 2019-08-21 10:59:39 -07:00
Davanum Srinivas
26899c1e34 disable staticcheck on a few more packages 2019-08-21 08:16:35 -04:00
SataQiu
c60377c682 fix static check for test/e2e/framework 2019-08-21 17:28:36 +08:00
Sadlil Rhythom
7a8eaf4561 controller:volume fix static check failures 2019-08-21 09:37:42 +02:00
RainbowMango
9b34fb0b62 Fix static failure from package: vendor/k8s.io/kube-aggregator 2019-08-21 11:36:37 +08:00
Tim Allclair
76e40248a2 Add static analysis verify script 2019-08-19 17:34:02 -07:00