codiform / gh-actions-usage

GitHub CLI Extension to display Github Actions Usage. Go version of gh-actuse.
17 stars 2 forks source link

Add golangci-lint #28

Open kim0 opened 1 year ago

kim0 commented 1 year ago

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 commented 1 year ago

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

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)