Skip to content
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

Fix(generator): run functions with empty return #842

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

sonalys
Copy link
Contributor

@sonalys sonalys commented Nov 14, 2024

Description

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Version of Go used when building/testing:

  • 1.22
  • 1.23

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@sonalys sonalys marked this pull request as ready for review November 14, 2024 08:46
Copy link
Collaborator

@LandonTClipp LandonTClipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, just a request on layout of tests. I am moving towards having separate subdirectories in pkg/ for each type of issue being solve where the interface, the generated mocks, and the tests all live together. You can see an example of this here: https://github.com/vektra/mockery/tree/master/pkg/fixtures/type_alias

You can see the related .mockery.yaml config here: https://github.com/vektra/mockery/blob/v2.49.0/.mockery.yaml#L97-L110

The reason I'm doing this is to make it easier to grok what tests are using what fixtures and mocks. Keeping all of them in the same place makes this easier. If you can modify this PR to be aligned with this format, I'll merge it. Thanks for the help, it's much appreciated!

@sonalys sonalys force-pushed the fix/empty_return branch 2 times, most recently from b81b377 to 97ae367 Compare November 23, 2024 07:37
@sonalys sonalys force-pushed the fix/empty_return branch 3 times, most recently from c70d867 to efab374 Compare November 23, 2024 07:47
Copy link
Collaborator

@LandonTClipp LandonTClipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@LandonTClipp LandonTClipp merged commit dc47fdb into vektra:master Dec 3, 2024
4 checks passed
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.

RunAndReturn on functions without return value should not be silently skipped
2 participants