Skip to content

Commit

Permalink
Fix: warning everytime when issue-845-fix: True. Fixes mockery/mock…
Browse files Browse the repository at this point in the history
  • Loading branch information
Banana Duck committed Dec 27, 2024
1 parent f6c261b commit 1852745
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,18 @@ func (g *Generator) generateImports(ctx context.Context) {
func (g *Generator) GeneratePrologue(ctx context.Context, pkg string) {
g.populateImports(ctx)

if !g.config.Issue845Fix {
// If both `inpackage` and `outpkg` are set warn
if g.config.InPackage && g.config.Outpkg != "" {
logging.WarnDeprecated(
ctx,
"issue-845-fix must be set to True to remove this warning. Visit the link for more details.",
map[string]any{
"url": logging.DocsURL("/deprecations/#issue-845-fix"),
},
)
}

if !g.config.Issue845Fix {
if g.config.InPackage {
g.printf("package %s\n\n", g.iface.Pkg.Name())
} else {
Expand Down

0 comments on commit 1852745

Please sign in to comment.