-
Notifications
You must be signed in to change notification settings - Fork 380
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
Add -print0 to make gazelle scripting friendly #1028
Comments
Sorry to take so long to get to this. In general, I'm hesitant to expand the user interface of Gazelle; none of the maintainers have much bandwidth to support new features. Is there another way this problem can be solved? What about using |
Already tried, but it's not working well with git. The patch gazelle generated is not acceptable by I already have a 10-line-ish patch for this. But still waiting for the CLA approval to upload it. |
After #1552, diff mode output will work with |
What version of gazelle are you using?
v0.22.2
What version of rules_go are you using?
v0.24.7
What version of Bazel are you using?
4.0
What did you expect to see?
We would love to use gazelle in pre-commit-hook to update build files automatically. When doing so, we need to know which build file is rewritten and needs to be added to the staging area for committing.
We propose to add
-print0
flag for-mode=fix
. When set, let gazelle print the names of rewritten files separated with '\0' (like other Unix tools,) then the output could be piped toxargs -r0 git add
.The text was updated successfully, but these errors were encountered: