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.
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 refactoringloadFileDescriptorsGRPCReflectionif 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 refactoringprocessFileDescriptorsResponseif 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 refactoringmissingFileDescriptorsif 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 refactoringaddMissingFileDescriptorsif 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 refactoringguessAutocliif 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 refactoringimplMsgNameCleanupif 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 removingdefaultAutocliMappingsif 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
loadFileDescriptorsGRPCReflectionis unused
271-271: func
implMsgNameCleanupis unused
140-140: func
processFileDescriptorsResponseis unused
154-154: func
missingFileDescriptorsis unused
166-166: func
addMissingFileDescriptorsis unused
211-211: func
guessAutocliis unused
283-283: var
defaultAutocliMappingsis unused
* 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