chore: update, tighten and modernize linters#8496
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8496 +/- ##
==========================================
+ Coverage 57.57% 57.58% +0.01%
==========================================
Files 317 317
Lines 22673 22666 -7
==========================================
- Hits 13053 13052 -1
+ Misses 9012 9006 -6
Partials 608 608
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
simapp/app.go
Outdated
| @@ -392,7 +392,7 @@ func NewSimApp( | |||
| ) | |||
|
|
|||
| // Packet Forward Middleware keeper | |||
| app.PFMKeeper = packetforwardkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[packetforwardtypes.StoreKey]), app.TransferKeeper, app.IBCKeeper.ChannelKeeper, app.BankKeeper, app.ICAControllerKeeper.GetICS4Wrapper(), authtypes.NewModuleAddress(govtypes.ModuleName).String()) | |||
| app.PFMKeeper = packetforwardkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[packetforwardtypes.StoreKey]), &app.TransferKeeper, app.IBCKeeper.ChannelKeeper, app.BankKeeper, app.ICAControllerKeeper.GetICS4Wrapper(), authtypes.NewModuleAddress(govtypes.ModuleName).String()) | |||
There was a problem hiding this comment.
This is one of the side-effects of using consistent pointer receiver type, the value type does not implement the interface anymore. For more information, see https://go.dev/wiki/MethodSets
johnnylarner
left a comment
There was a problem hiding this comment.
Nice work on this big ol' chore. I have one question in the comments, otherwise lgtm!
|
|
||
| ```go | ||
| s.NoError(err) | ||
| ``` |
|
This is a really great pull request, but you need to understand that the general public is not able to actually see what issues you are referencing. That's not great. But seriously thank you for tightening up the linters. |
See #8526 (comment) |
There was a problem hiding this comment.
Pull Request Overview
The PR refactors the test code and related migration files to modernize the code style by shortening receiver variable names (e.g. replacing “suite” with “s”), removing extraneous whitespace, and updating some function signatures for clarity and consistency.
- Renames test suite receiver variables and related calls for improved style.
- Cleans up diff hunks by removing unnecessary blank lines and redundant code.
- Updates migration test files and associated client encoding/decoding functions to align with modern linting rules.
Reviewed Changes
Copilot reviewed 164 out of 300 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| modules/core/03-connection/types/params_test.go | Removed unnecessary blank lines and improved loop formatting. |
| modules/core/03-connection/types/msgs_test.go | Changed test receiver from “suite” to “s” for brevity and consistency. |
| modules/core/03-connection/types/connection_test.go | Cleaned up test iteration style with minor whitespace removals. |
| modules/core/03-connection/keeper/verify_test.go | Updated receiver alias and function call style for consistency. |
| modules/core/03-connection/keeper/keeper_test.go | Replaced “suite” alias with “s” and updated corresponding test calls. |
| modules/core/03-connection/keeper/keeper.go | Changed receiver type from value to pointer for the Logger method. |
| modules/core/03-connection/keeper/handshake_test.go | Updated test receiver alias and formatting consistency. |
| modules/core/03-connection/keeper/grpc_query_test.go | Updated receiver alias and formatting in query tests. |
| modules/core/03-connection/keeper/events_test.go | Modified receiver alias and cleaned up assertions in event tests. |
| modules/core/02-client/v2/types/* | Consistently updated receiver alias and formatting in test files. |
| modules/core/02-client/migrations/v7/* | Updated migration tests and helper functions to use the new naming style. |
| modules/core/02-client/keeper/migrations_test.go | Refactored migration test receiver alias from “suite” to “s”. |
Description
closes: IBCGO-2354, IBCGO-33
This PR cleans up linting by removing unnecessary exclusions that most likely were put in place to avoid having to do a larger cleanup. There are still some that we should consider tackling eventually, as they seem to be code smells.
The linting rules that have caused the most change in code are:
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/) if anything is changed.godoccomments if relevant.Files changedin the GitHub PR explorer.