Skip to content

Handle interface method name conflicts in cmg#527

Merged
raphael merged 1 commit intomainfrom
cmg-handle-method-name-conflicts
Feb 26, 2025
Merged

Handle interface method name conflicts in cmg#527
raphael merged 1 commit intomainfrom
cmg-handle-method-name-conflicts

Conversation

@douglaswth
Copy link
Copy Markdown
Member

- Fix #260 by checking if the `Set<method>`, `Set<method>`, and
  `HasMore` methods are already part of an interface and if they are,
  adding a `Mock` suffix, and if that is still not unique adding a
  unique numeric suffix after that. Examples: `Set<method>Mock`,
  `Add<method>Mock`, `HasMoreMock1`.
- Use `runtime/debug.BuildInfo` to find the version in `cmg` since
  golang/go#50603 is implemented with Go 1.24 which Clue now requires.
@douglaswth douglaswth requested a review from raphael February 25, 2025 22:01
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 94.80519% with 4 lines in your changes missing coverage. Please review.

Project coverage is 85.34%. Comparing base (6fbc395) to head (d6133cd).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
mock/cmd/cmg/pkg/version.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #527      +/-   ##
==========================================
+ Coverage   85.17%   85.34%   +0.16%     
==========================================
  Files          39       39              
  Lines        2179     2211      +32     
==========================================
+ Hits         1856     1887      +31     
- Misses        297      298       +1     
  Partials       26       26              
Flag Coverage Δ
micro 85.34% <94.80%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@douglaswth douglaswth changed the title Handle interface method name conflicts in cmg Handle interface method name conflicts in cmg Feb 25, 2025
@raphael
Copy link
Copy Markdown
Member

raphael commented Feb 26, 2025

Nice! good catch

@raphael raphael merged commit 456b083 into main Feb 26, 2025
6 checks passed
@raphael raphael deleted the cmg-handle-method-name-conflicts branch February 26, 2025 08:22
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.

Handle name conflicts in cmg

2 participants