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

Include auto-generated files in recursive discovery by default #682

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

LandonTClipp
Copy link
Contributor

Description

Fixes #681

There are many legitimate use-cases where mockery needs to include auto-generated files in its recursive package discovery. We add an include-auto-generated parameter that is set to true by default, but can be set to false if users want to retain the old behavior. We are considering the old behavior to be a bug due to the large number of GitHub issues we'll likely get. The original motivation for adding this behavior was fixed through a different mechanism, which is why we're considering this to be a bugfix.

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 Golang used when building/testing:

  • 1.11
  • 1.12
  • 1.13
  • 1.14
  • 1.15
  • 1.16
  • 1.17
  • 1.18
  • 1.19
  • 1.20

How Has This Been Tested?

Unit tests

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

Fixes vektra#681

There are many legitimate use-cases where mockery needs to include auto-generated files
in its recursive package discovery. We add an `include-auto-generated` parameter that
is set to `true` by default, but can be set to `false` if users want to retain the
old behavior. We are considering the old behavior to be a bug due to the large number
of GitHub issues we'll likely get. The original motivation for adding this behavior
was fixed through a different mechanism, which is why we're considering this to be
a bugfix.
@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Patch coverage: 78.26087% and project coverage change: +0.07680% 🎉

Comparison is base (532f248) 75.29200% compared to head (b70c07a) 75.36880%.

Additional details and impacted files
@@                 Coverage Diff                 @@
##              master        #682         +/-   ##
===================================================
+ Coverage   75.29200%   75.36880%   +0.07679%     
===================================================
  Files              9           9                 
  Lines           2226        2237         +11     
===================================================
+ Hits            1676        1686         +10     
- Misses           412         414          +2     
+ Partials         138         137          -1     
Files Changed Coverage Δ
pkg/config/config.go 71.00592% <78.26087%> (+0.44140%) ⬆️

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

@LandonTClipp LandonTClipp merged commit dbad753 into vektra:master Aug 3, 2023
5 checks passed
@LandonTClipp LandonTClipp deleted the issue_681 branch August 3, 2023 17:46
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.

Unable to generate mocks for protobuf clients?
1 participant