Skip to content

fix: update gomock import#143

Open
kpitapeersyst wants to merge 1 commit into
mainfrom
ci/fix-actions
Open

fix: update gomock import#143
kpitapeersyst wants to merge 1 commit into
mainfrom
ci/fix-actions

Conversation

@kpitapeersyst
Copy link
Copy Markdown
Contributor

@kpitapeersyst kpitapeersyst commented May 19, 2026

fix: update gomock import

Motivation 💡

  • Align POA keeper tests with the go.uber.org/mock dependency already used by the module.
  • Avoid relying on the old github.com/golang/mock/gomock import path.

Changes 🛠

  • Updated x/poa/keeper/msg_server_remove_validator_test.go to import go.uber.org/mock/gomock.

Summary by CodeRabbit

  • Chores
    • Optimized build configuration by refining dependency declarations to better reflect and effectively manage direct and indirect project dependencies, improving overall clarity in the dependency structure.
    • Upgraded testing infrastructure by replacing the mock generation library with current industry-standard tooling, ensuring improved compatibility and better long-term support for continued development efforts.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6eb07127-9662-43ad-b728-9302e74401b2

📥 Commits

Reviewing files that changed from the base of the PR and between 2d77d09 and 2d500a6.

📒 Files selected for processing (2)
  • go.mod
  • x/poa/keeper/msg_server_remove_validator_test.go

📝 Walkthrough

Walkthrough

The PR reclassifies spf13/pflag from a direct to indirect dependency in go.mod and updates a test file to import the mock library from the newer go.uber.org/mock package instead of github.com/golang/mock, with no changes to test logic.

Changes

Dependency and Import Reorganization

Layer / File(s) Summary
pflag direct → indirect dependency
go.mod
The spf13/pflag package is removed from the direct require list and re-added as an indirect dependency, indicating it is now pulled in transitively by another package.
Mock testing library migration
x/poa/keeper/msg_server_remove_validator_test.go
The test's gomock import is updated to use go.uber.org/mock/gomock instead of github.com/golang/mock/gomock; test behavior and assertions remain unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • xrplevm/node#130: Broader migration of golang/mock to go.uber.org/mock that includes the gomock import update in this PR.

Suggested reviewers

  • AdriaCarrera

Poem

🐰 A rabbit hops through deps with glee,
Pflag goes indirect, wild and free,
Mock's new home in Uber's embrace,
Test imports find their rightful place!
Small changes, clean, without a trace ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: updating the gomock import in the codebase.
Description check ✅ Passed The description includes Motivation and Changes sections with relevant details, though the Considerations and Dependencies sections are omitted.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/fix-actions

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant