Only log issue-845-fix if outpkg and inpackage are set
PLEASE READ
DO NOT submit tickets without first using the latest version of Go, clearing your local golang package cache, and re-building mockery using the latest Go version and the latest version of mockery. Please provide evidence this has been done in your issue. Failure to provide this evidence will likely result in your issue being closed.
Description
Mockery outputs a WRN about #845 even when not using inpackage: True. As far as I can tell, without that, the issue is not related so it is confusing to see a warning. While we could add issue-845-fix: true to the config, it makes it confusing since others that read the file won't understand what it means. I think it makes sense to only warn when both outpkg and inpackage are set.
https://github.com/vektra/mockery/blob/13d696b867dc191d645ca4c127527e1265dd3d68/pkg/generator.go#L426
Mockery Version
2.5.0
Go Version
1.23.4
NOTE: Please upgrade to the latest golang version before submitting tickets!
Installation Method
- [ ] Binary Distribution
- [ ] Docker
- [ ] brew
- [X] go install
- [ ] Other: [specify]
Steps to Reproduce
- [First Step]
- [Second Step]
- [etc]
Expected Behavior
[what you expect to happen]
Actual Behavior
[what actually happened]
I think you are right, we shouldn't warn if inpackage isn't set. I will get to this at some point in the next few weeks, unless someone else would like to take a stab at it. Should be very easy.
Hi @LandonTClipp! Can i take this issue?)
Please do! Thanks @Alhanaqtah.