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
cmd/go: add 'go generate -skip' #38687
Comments
I'm not sure we should do anything here, but if we did, it should apply to the other -run flags too. |
go generate
#41583 is an accepted proposal for a |
go generate
This proposal has been added to the active column of the proposals project |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. 🎉 |
Change https://go.dev/cl/421440 mentions this issue: |
We currently have the
-run
flag, but I believe it is currently impossible to supply a regular expression that would allow for excluding a certain expression (due to no lookaheads in Go's regex syntax). Being able to exclude expressions would be useful if we want to exclude certain directives that are time-consuming and are not needed in the moment, and we want to run a large amount of other directives, so that it would be impractical to simply rungo generate
multiple times with different-run
flags.I think one way to implement this could be an additional flag. Similar to
grep
's--invert-match
flag, we could do something like:Alternatively, we could also have a different flag that is used instead of
-run
, like:Here, supplying both
-runexcept
and-run
would be invalid.The text was updated successfully, but these errors were encountered: