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

Revert "Fixing #291 where a different import with the same name as the package would not get included in the mock" #303

Merged
merged 1 commit into from
Jun 28, 2020

Conversation

LandonTClipp
Copy link
Collaborator

@LandonTClipp LandonTClipp commented Jun 28, 2020

Reverts #297

This is causing an issue when generating mocks:

# github.com/vektra/mockery/v2/mocks/pkg/fixtures/buildtag/comment

mocks/pkg/fixtures/buildtag/comment/IfaceWithBuildTagInComment.go:7:2: imported and not used: "github.com/vektra/mockery/v2/pkg/fixtures/buildtag/comment"
package mocks

import (
	mock "github.com/stretchr/testify/mock"
	comment "github.com/vektra/mockery/v2/pkg/fixtures/buildtag/comment"
)

The fact that this passed CI means that we need to revisit it. I'm thinking that CI should, as part of perhaps a larger integration test, have mockery actually build the mocks and then run the test suite. This will catch errors like this. Although, I could have sworn that checks for validity were already done in the unit tests? I'm not sure.

…e package would not get included in the mock"
@LandonTClipp LandonTClipp merged commit f5c2484 into master Jun 28, 2020
@LandonTClipp LandonTClipp deleted the revert-297-master branch June 28, 2020 04:10
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