Skip to content

Commit

Permalink
Fix incorrect Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
LandonTClipp committed Mar 4, 2023
1 parent 9dadb97 commit 733277b
Show file tree
Hide file tree
Showing 49 changed files with 93 additions and 1,995 deletions.
3 changes: 1 addition & 2 deletions .mockery.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
quiet: False
all: True
all: False
keeptree: True
disable-version-string: True
with-expecter: True
packages:
- github.com/vektra/mockery/v2/pkg
- github.com/vektra/mockery/v2/pkg/fixtures
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ test: mocks
go test ./...

mocks: $(shell find . -type f -name '*.go' -not -name '*_test.go')
go run . --dir pkg/fixtures --output mocks/pkg/fixtures
go run . --all=false --print --dir pkg/fixtures --name RequesterVariadic --structname RequesterVariadicOneArgument --unroll-variadic=False > mocks/pkg/fixtures/RequesterVariadicOneArgument.go
go run . --all=false --print --dir pkg/fixtures --name Expecter --with-expecter > mocks/pkg/fixtures/Expecter.go
go run . --all=false --print --dir pkg/fixtures --name RequesterReturnElided --with-expecter > mocks/pkg/fixtures/RequesterReturnElided.go
go run .
go run . --print --dir pkg/fixtures --name RequesterVariadic --structname RequesterVariadicOneArgument --unroll-variadic=False > mocks/pkg/fixtures/RequesterVariadicOneArgument.go
go run . --print --dir pkg/fixtures --name Expecter --with-expecter > mocks/pkg/fixtures/Expecter.go
go run . --print --dir pkg/fixtures --name RequesterReturnElided --with-expecter > mocks/pkg/fixtures/RequesterReturnElided.go
@touch mocks

.PHONY: install
Expand Down
4 changes: 2 additions & 2 deletions cmd/mockery.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (r *RootApp) Run() error {
} else if r.Config.All {
recursive = true
filter = regexp.MustCompile(".*")
} else {
} else if r.Config.Packages == nil {
log.Fatal().Msgf("Use --name to specify the name of the interface or --all for all interfaces found")
}

Expand Down Expand Up @@ -296,7 +296,7 @@ func (r *RootApp) Run() error {
StructName: r.Config.StructName,
}

if r.Config.Packages != nil {
if !r.Config.All && r.Config.Name == "" && r.Config.Packages != nil {
warnAlpha(
ctx,
"use of the 'packages' config variable is currently in an alpha state. Use at your own risk.",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/vektra/mockery/v2

go 1.19
go 1.20

require (
github.com/chigopher/pathlib v0.12.0
Expand Down
35 changes: 0 additions & 35 deletions mocks/pkg/Cleanup.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 0 additions & 37 deletions mocks/pkg/OutputStreamProvider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 0 additions & 37 deletions mocks/pkg/WalkerVisitor.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 0 additions & 35 deletions mocks/pkg/fixtures/A.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 0 additions & 89 deletions mocks/pkg/fixtures/AsyncProducer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 733277b

Please sign in to comment.