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

linter: update & use revive instead of golint #1901

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

zroubalik
Copy link
Member

@zroubalik zroubalik commented Jun 24, 2021

Signed-off-by: Zbynek Roubalik zroubali@redhat.com

Update golint to 1.41.1 and minor related fixes

level=warning msg="[runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner.  Replaced by revive."


controllers/scaledjob_controller.go:179:2: if-return: redundant if ...; err != nil check, just return error instead. (revive)
        if err := r.scaleHandler.DeleteScalableObject(scaledJob); err != nil {
                return err
        }
controllers/scaledobject_controller_test.go:46:19: ST1023: should omit type []map[string]string from declaration; it will be inferred from the right-hand side (stylecheck)
		var triggerMeta []map[string]string = []map[string]string{
		                ^
pkg/scalers/influxdb_scaler.go:116:41: SA1030: 'bitSize' argument is invalid, must be either 32 or 64 (staticcheck)
		value, err := strconv.ParseFloat(val, 10)
		                                      ^
pkg/scalers/azure_pipelines_scaler.go:148:12: ST1023: should omit type int from declaration; it will be inferred from the right-hand side (stylecheck)
	var count int = 0
	          ^
pkg/scalers/openstack_metrics_scaler.go:250:16: ST1023: should omit type string from declaration; it will be inferred from the right-hand side (stylecheck)
	var metricURL string = a.metadata.metricsURL
	              ^
pkg/scalers/openstack_swift_scaler.go:127:14: ST1023: should omit type int from declaration; it will be inferred from the right-hand side (stylecheck)
			var count int = 0
			          ^

Fixes: #1868

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
@zroubalik zroubalik enabled auto-merge (squash) June 24, 2021 09:53
@zroubalik zroubalik merged commit 6530be7 into kedacore:main Jun 24, 2021
nilayasiktoprak pushed a commit to nilayasiktoprak/keda that referenced this pull request Oct 23, 2021
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
Signed-off-by: nilayasiktoprak <nilayasiktoprak@gmail.com>
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.

Replace golint linter with revive
2 participants