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

Add golangci-lint #28

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

kim0
Copy link
Contributor

@kim0 kim0 commented Sep 25, 2023

No description provided.

Signed-off-by: Ahmed Kamal <email.ahmedkamal@googlemail.com>
Signed-off-by: Ahmed Kamal <email.ahmedkamal@googlemail.com>
Signed-off-by: Ahmed Kamal <email.ahmedkamal@googlemail.com>
Signed-off-by: Ahmed Kamal <email.ahmedkamal@googlemail.com>
Signed-off-by: Ahmed Kamal <email.ahmedkamal@googlemail.com>
@kim0
Copy link
Contributor Author

kim0 commented Sep 27, 2023

Hello @geoffreywiseman .. Just making sure you got a chance to see this PR. Feel free to push commits directly to this branch. This just adds golangci-lint and ensures it runs in CI, along with some cleanups to make the linter happy

@geoffreywiseman
Copy link
Contributor

Would it make more sense just to include it in the existing CI matrix build?

  • Already running staticcheck, go vet, go lint there
  • Could maybe just replace go lint since that tends to be the preferred approach anyway

Why do I get failures running locally that I don't see on the lint workflow? What am I doing differently?

❯ golangci-lint run --out-format=github-actions
::error file=client/client.go,line=13,col=15::undefined: gh (typecheck)
::error file=client/client.go,line=144,col=15::undefined: gh (typecheck)
::error file=mock/mock_rest.go,line=18,col=12::m.Called undefined (type *RestMock has no field or method Called) (typecheck)
::error file=mock/mock_rest.go,line=24,col=12::m.Called undefined (type *RestMock has no field or method Called) (typecheck)
::error file=mock/mock_rest.go,line=30,col=12::m.Called undefined (type *RestMock has no field or method Called) (typecheck)

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