-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
ginkgo unfocus should not remove the actual ginkgo functions #424
Labels
Comments
I have seen the issue has been raised before #113 . The go fmt issue is open for quite some time now. Do you still think that we should wait? |
Option 2 makes sense to me @nodo - how much effort would it be? |
Sounds good to me. I'll give it a try, thanks @onsi! |
nodo
pushed a commit
that referenced
this issue
Feb 25, 2018
nodo
pushed a commit
that referenced
this issue
Feb 25, 2018
nodo
pushed a commit
that referenced
this issue
Apr 17, 2018
nodo
pushed a commit
that referenced
this issue
Apr 19, 2018
blgm
pushed a commit
that referenced
this issue
Jul 10, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem
ginkgo unfocus
replace every occurrence of a ginkgo component name with the component name without theF
. For instance, everyFDescribe
in a project will be replaced withDescribe
. This is not usually a problem, however, when ginkgo appears invendor/
,unfocus
changes the actual ginkgo functions, which is not desirable.ginkgo unfocus
usesgofmt -r
to replace the occurrences of the focused components.(https://github.com/onsi/ginkgo/blob/master/ginkgo/unfocus_command.go#L33). The problem appears because
gofmt
does not excludevendor/
and recursively replace every occurrence of the component name.Step to reproduce:
example
packageginkgo bootstrap
andginkgo generate
ginkgo example
run successfullydep init
ginkgo
andgomega
in theGopkg.toml
ginkgo unfocus
In a
git
project, this is the output:Possible solutions
unfocus
to specifically ignorevendor/
(still callinggofmt
)unfocus
to specifically replace the ginkgo components in test files.What do you think?
The text was updated successfully, but these errors were encountered: