-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
refactor(tools/hubl): don't use nil panic #20515
Conversation
WalkthroughThe change in Changes
Sequence Diagram(s) (Beta)The changes do not introduce new features or significantly alter the control flow, so no sequence diagrams are necessary. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 1
Outside diff range and nitpick comments (7)
tools/hubl/internal/compat.go (7)
Line range hint
23-23
: Consider removing or refactoringloadFileDescriptorsGRPCReflection
if it's unused.This function is flagged as unused by static analysis. If it's indeed not used, consider removing it to clean up the codebase. If it's mistakenly flagged, ensure it's properly integrated and tested.
Line range hint
140-140
: Consider removing or refactoringprocessFileDescriptorsResponse
if it's unused.This function is flagged as unused by static analysis. If it's indeed not used, consider removing it to clean up the codebase. If it's mistakenly flagged, ensure it's properly integrated and tested.
Line range hint
154-154
: Consider removing or refactoringmissingFileDescriptors
if it's unused.This function is flagged as unused by static analysis. If it's indeed not used, consider removing it to clean up the codebase. If it's mistakenly flagged, ensure it's properly integrated and tested.
Line range hint
166-166
: Consider removing or refactoringaddMissingFileDescriptors
if it's unused.This function is flagged as unused by static analysis. If it's indeed not used, consider removing it to clean up the codebase. If it's mistakenly flagged, ensure it's properly integrated and tested.
Line range hint
211-211
: Consider removing or refactoringguessAutocli
if it's unused.This function is flagged as unused by static analysis. If it's indeed not used, consider removing it to clean up the codebase. If it's mistakenly flagged, ensure it's properly integrated and tested.
Line range hint
271-271
: Consider removing or refactoringimplMsgNameCleanup
if it's unused.This function is flagged as unused by static analysis. If it's indeed not used, consider removing it to clean up the codebase. If it's mistakenly flagged, ensure it's properly integrated and tested.
Line range hint
283-283
: Consider removingdefaultAutocliMappings
if it's unused.This variable is flagged as unused by static analysis. If it's indeed not used, consider removing it to clean up the codebase. If it's mistakenly flagged, ensure it's properly integrated and tested.
Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (1)
- tools/hubl/internal/compat.go (1 hunks)
Additional context used
Path-based instructions (1)
tools/hubl/internal/compat.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
golangci-lint
tools/hubl/internal/compat.go
23-23: func
loadFileDescriptorsGRPCReflection
is unused
271-271: func
implMsgNameCleanup
is unused
140-140: func
processFileDescriptorsResponse
is unused
154-154: func
missingFileDescriptors
is unused
166-166: func
addMissingFileDescriptors
is unused
211-211: func
guessAutocli
is unused
283-283: var
defaultAutocliMappings
is unused
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!
* main: docs: add docs on permissions (#20526) refactor(x/gov): set environment in context for legacy proposals (#20521) docs: migrate diagrams to mermaidjs (#20503) refactor(tools/hubl): don't use nil panic (#20515) refactor(x/authz): set environment in context (#20502) build(deps): Bump github.com/spf13/viper from 1.18.2 to 1.19.0 (#20519) feat(x/bank): Placing SendRestriction before Deduction of Coins in SendCoins (#20517) chore: sonar ignore directories with their own go.mods (#20509) ci: run action in merge queue (#20508)
* main: refactor(x/feegrant): set environment in context (#20529) refactor(x/accounts)!: accounts and auth module use the same account number tracking (#20405) chore: remove sonar from simapp (#20528) docs: add docs on permissions (#20526) refactor(x/gov): set environment in context for legacy proposals (#20521) docs: migrate diagrams to mermaidjs (#20503) refactor(tools/hubl): don't use nil panic (#20515) refactor(x/authz): set environment in context (#20502) build(deps): Bump github.com/spf13/viper from 1.18.2 to 1.19.0 (#20519) feat(x/bank): Placing SendRestriction before Deduction of Coins in SendCoins (#20517) chore: sonar ignore directories with their own go.mods (#20509) ci: run action in merge queue (#20508) refactor(server/v2/cometbft): update function comments (#20506)
Since err has been checked above, it's better to panic with a detailed error message instead of a nil