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

enable gofmt,golint and fix lint errors #1159

Merged
merged 2 commits into from
Sep 16, 2020
Merged

Conversation

silenceper
Copy link
Contributor

Signed-off-by: silenceper silenceper@gmail.com

enable gofmt,golint for golangci, and fix lint errors.

gofmt file pkg/scalers/azure/azure_monitor_test.go

gofmt -w -s pkg/scalers/azure/azure_monitor_test.go 

Checklist

Fixes #

Signed-off-by: silenceper <silenceper@gmail.com>
@zroubalik
Copy link
Member

@silenceper
Copy link
Contributor Author

@zroubalik

  • make revive can change to make golangci
  • To be consistent, use gofmt instead of go fmt , because gofmt tool is used in golangci.

@zroubalik
Copy link
Member

@silenceper ok, would you mind changing the Makefile accordingly, please?

Signed-off-by: silenceper <silenceper@gmail.com>
@silenceper
Copy link
Contributor Author

@zroubalik

PTAL

Copy link
Contributor

@ahmelsayed ahmelsayed left a comment

Choose a reason for hiding this comment

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

I'm not I understand why the previous one was missing those files. from the help, it seems that go fmt runs gofmt -l -w. Maybe it's the -s for simplify code? Anyway, this looks good to me. Thanks @silenceper again.

@silenceper
Copy link
Contributor Author

silenceper commented Sep 16, 2020

Yes, I add -s to gofmt,otherwise golangci will fail to detect

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

LGTM

@zroubalik zroubalik merged commit f5489b8 into kedacore:v2 Sep 16, 2020
@silenceper silenceper deleted the add-linter branch September 16, 2020 10:23
silenceper added a commit to silenceper/keda that referenced this pull request Oct 1, 2020
* enable gofmt,golint and fix lint errors

Signed-off-by: silenceper <silenceper@gmail.com>

* fix Makefile: change to golangci

Signed-off-by: silenceper <silenceper@gmail.com>
SpiritZhou pushed a commit to SpiritZhou/keda that referenced this pull request Jul 18, 2023
Signed-off-by: Andy Ward <mortx@toothless.eldarrin.io>
Signed-off-by: Eldarrin <mortxbox@live.com>
Signed-off-by: Eldarrin <32762846+Eldarrin@users.noreply.github.com>
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Co-authored-by: Zbynek Roubalik <zroubalik@gmail.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@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.

3 participants