-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
chore(x/gov): clean validation code #18449
Conversation
WalkthroughWalkthroughThe changes in the codebase primarily focus on refactoring the error checks for metadata, summary, and title lengths in the Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- x/gov/keeper/keeper.go (3 hunks)
Files skipped from review due to trivial changes (1)
- x/gov/keeper/keeper.go
@@ -193,22 +193,22 @@ func (k Keeper) ModuleAccountAddress() sdk.AccAddress { | |||
// validateProposalLengths checks message metadata, summary and title | |||
// to have the expected length otherwise returns an error. | |||
func (k Keeper) validateProposalLengths(metadata, title, summary string) error { | |||
if err := k.assertMetadataLength(metadata); err != nil { |
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.
How come the spacing was wrong?
I believe we have gofmt as linter.
I'll need to check when reviewing the linters config. Nothing for you to do here, just noting.
Description
Based on the following comment from odeke-em in another PR #18448 (comment). I decided to clean also this code.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
make lint
andmake test
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking changeSummary by CodeRabbit