-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Linting] Enforce 120 max lines, and import order with custom linting #319
Conversation
go_lint use golangci-lint natively
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Halfway through
552e943
to
0ddd1c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for going through all the codebase 🙏
@@ -2,7 +2,6 @@ package keeper | |||
|
|||
import ( | |||
"context" | |||
"fmt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be required
@h5law Should we move this one to a draft state if it's not under active review/development? |
This is probably a good community task as picking up from what I started shouldn't be too hard with the tooling added. Moved into draft and put into iteration 14 «Developer Experience» |
@h5law I'd rather have someone on the team do this. When you introduce a (trivial) change that touches a large surface area of the codebase, it's better to be done by the core team. Pick it up in iteration 14 and we should be 🏅 |
Outdated. |
Summary
Human Summary
make go_gci
will order all eligible.go
files imports to be std,external,internal- here non eligible files are ones with ignite scaffold comments you need to do them yourself as
gci
will remove the commentmake go_gofumpt
will format (scricter than gofmt) all eligible '.go' files- non-eligible files mostly include generated files like mocks and protobuf generated code
make go_lint
will show any linter errorsThese three makefile targets rely on you first running
make install_ci_deps
which will installgolangci-lint
,gci
andgofumpt
if you don't already have them. These are configured in the.golangci.yml
file and the workflow file for running tests.From now on PRs will (🤞🏼) show
checks
not comments where you have linter errors.Issue
Type of change
Select one or more:
Testing
make go_develop_and_test
make test_e2e
devnet-test-e2e
label to the PR. This is VERY expensive, only do it after all the reviews are complete.Sanity Checklist