-
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
feat: fix imports #283
feat: fix imports #283
Conversation
go lint fails bc goimports-reviser removes comments from import blocks and scaffold puts them in there so..,.. |
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.
I haven't done research on the different types of import linters so I don't have a strong opinion on this and interested in hearing @bryanchriswhite's opinion.
- @h5law Why this over goimports which is already done?
- @bryanchriswhite Wdyt?
- If we do go with this approach though (TBD), I'm seeing some outstanding items in this PR:
- Update the Makefile to use this importer
- Updating the CI to use this importer
- Removing
./tools/scripts/goimports
because we should only have one import linting script.
@@ -1,8 +1,6 @@ | |||
package types | |||
|
|||
import ( |
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.
Not sure what to do, but just calling it out: I'm a bit woried about this one. It could break future ignite scaffold calls
.
Not a hard blocker if we choose to go with this approach.
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.
Yeah we can revert these the issue with ignite stuff is that linters dont allow comments in the import block
TL;DR, I think we should be reluctant to introduce redundant tooling without clear and substantial benefits to using the new thing over the old thing. See #253 (comment) and #253 (comment). |
Could/should we close this one out? |
@Olshansk going to close this one - its outdated and better to add tooling instead of a simple fix like this. |
Summary
Human Summary
Add bash script to add goimports-reviser import grouping excluding files where scaffolding comments are in the import area. This may need to be improved upon in fututre but its a start at least.
I also include all the changes it makes
NOTE: Go Imports Reviser removes those ignite scaffold comments from the imports block and I dont have the bash foo to solve this rn and GPT didnt either. So I manually fixed.
AI Summary
Summary generated by Reviewpad on 17 Dec 23 02:19 UTC
This pull request includes the following changes:
key_gateway.go
in thex/gateway/types
package has undergone changes in the import section.client_integration_test.go
has changes related to package imports.errors.go
in thepkg/appgateserver/config
package has undergone import and variable changes.x/tokenomics/keeper/query_params_test.go
includes import additions and removals.goimports-revisor.sh
is a new script that processes Go files with specific flags and exclusions.params_test.go
has changes in the import statements.tx.go
in thex/gateway/client/cli
directory includes import additions and removals.session_steps_test.go
includes changes to import statements and code.urls.go
in thepkg/sdk
package has import statement modifications.replay_client_example_test.go
has changes in import statements.genesis.go
in thex/session/types
package has import and comment changes.unstake_application.go
has an unused import removal.tokenomics/types/genesis.go
has import block removal and constant addition.helpers_test.go
has import additions, removals, and repositioning.tx.go
in thex/tokenomics/client/cli
package includes import statement modifications.delegate_to_gateway.go
has import reordering and movement.genesis_test.go
in thex/tokenomics/types
package includes import order changes.session_steps_test.go
has code and import changes.urls.go
has a blank line addition.testutil/testerrors/require.go
has import statement changes and error handling modifications.genesis_test.go
in thex/tokenomics/types
package has import order changes and an added import.relay.go
has an import change.errors.go
in thepkg/appgateserver
package has import changes and variable definition.key_supplier.go
in thetypes
package has import updates.message_delegate_to_gateway_test.go
in thetypes
package has import statement changes.Please review the complete diff for more details on each file.
Issue
Related #270
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