tools
                                
                                 tools copied to clipboard
                                
                                    tools copied to clipboard
                            
                            
                            
                        Do not reformat generated files
I use code generation as well as goimports (actually the gosimports fork). Unfortunately, any generated files also need to be reformatted or it causes churn on commits. It would probably be good if there were commit hooks to check formatting automatically, but I also use golangci-lint --fix, which is slow, and then you have to worry about commiting the changes. It'd be better if generated files were just left alone.
What version of Go are you using (go version)? 1.20.4 What operating system and processor architecture are you using? linux, amd64 What did you do? go generate ./... && git commit -a && goimports -w . What did you expect to see? I expected nothing to be reformatted What did you see instead? Generated files are reformatted
https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
This PR (HEAD: 773d4a681196989d8e0f8901a1a4d091f372227a) has been imported to Gerrit for code review.
Please visit https://go-review.googlesource.com/c/tools/+/500555 to see it.
Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info
Message from Gopher Robot:
Patch Set 1:
Congratulations on opening your first change. Thank you for your contribution!
Next steps: A maintainer will review your change and provide feedback. See https://go.dev/doc/contribute#review for more info and tips to get your patch through code review.
Most changes in the Go project go through a few rounds of revision. This can be surprising to people new to the project. The careful, iterative review process is our way of helping mentor contributors and ensuring that their contributions have a lasting impact.
Please don’t reply on this GitHub thread. Visit golang.org/cl/500555. After addressing review feedback, remember to publish your drafts!
Message from [email protected]:
Patch Set 1:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/500555. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: 15a6f6bae7415595583e87b6ab6f2a45a34c7ef8) has been imported to Gerrit for code review.
Please visit https://go-review.googlesource.com/c/tools/+/500555 to see it.
Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info
Message from Heschi Kreinick:
Patch Set 2:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/500555. After addressing review feedback, remember to publish your drafts!