Consider go.sum to be generated#4660
Consider go.sum to be generated#4660nathany wants to merge 1 commit intogithub-linguist:masterfrom nathany:gosum
Conversation
Go 1.11 and newer include built in support for Go modules, with a user-editable go.mod file and a generated go.sum file. This flags go.sum as a generated file so that it will be suppressed in diffs.
|
See #4340. This was discussed in the past, and the eventual consensus was You can still exclude them in your projects by marking them as generated with an override. Just add this to your go.sum linguist-generated |
|
Apologies, I only searched against open issues and pull requests. I respectfully disagree with the previous conclusion. When I have a pull request that updates dependencies, the actual code changes get lost after the giant go.sum diff. While the go.mod file should be reviewed, the go.sum is generated and need not be reviewed. Also, a generated file can still be expanded as needed. It doesn't make sense to consider Gopkg.lock and glide.lock as generated but not do the same for go.sum. |
|
Sigh... yes, this was precisely the catalyst of a long, long debate. In any case, you still have the option of hiding these files yourself. |
|
Thanks for the tip. Works just as desired, so now I just need to go add it to every one of my Go repos. 🤦♂️ I guess I can see how some people might want to review the transitive dependency changes in the diff, but I really don't see reading through |
Mark go.sum files as generated to hide them in pull requests by default. They can still be uncollapsed if needed. This particular .gitattributes syntax is documented at [1]. GitHub doesn't hide them by default because some users may want to inspect these files (see [2] upstream for details). 1 - https://github.com/github/linguist/#using-gitattributes 2 - github-linguist/linguist#4660 Signed-off-by: Paul Chaignon <paul@cilium.io>
Mark go.sum files as generated to hide them in pull requests by default. They can still be uncollapsed if needed. This particular .gitattributes syntax is documented at [1]. GitHub doesn't hide them by default because some users may want to inspect these files (see [2] upstream for details). 1 - https://github.com/github/linguist/#using-gitattributes 2 - github-linguist/linguist#4660 Signed-off-by: Paul Chaignon <paul@cilium.io>
Mark go.sum files as generated to hide them in pull requests by default. They can still be uncollapsed if needed. This particular .gitattributes syntax is documented at [1]. GitHub doesn't hide them by default because some users may want to inspect these files (see [2] upstream for details). 1 - https://github.com/github/linguist/#using-gitattributes 2 - github-linguist/linguist#4660 Signed-off-by: Paul Chaignon <paul@cilium.io>
Mark go.sum files as generated to hide them in pull requests by default. They can still be uncollapsed if needed. This particular .gitattributes syntax is documented at [1]. GitHub doesn't hide them by default because some users may want to inspect these files (see [2] upstream for details). 1 - https://github.com/github/linguist/#using-gitattributes 2 - github-linguist/linguist#4660 Signed-off-by: Paul Chaignon <paul@cilium.io>
Mark go.sum files as generated to hide them in pull requests by default. They can still be uncollapsed if needed. This particular .gitattributes syntax is documented at [1]. GitHub doesn't hide them by default because some users may want to inspect these files (see [2] upstream for details). 1 - https://github.com/github/linguist/#using-gitattributes 2 - github-linguist/linguist#4660 Signed-off-by: Paul Chaignon <paul@cilium.io>
Mark go.sum files as generated to hide them in pull requests by default. They can still be uncollapsed if needed. This particular .gitattributes syntax is documented at [1]. GitHub doesn't hide them by default because some users may want to inspect these files (see [2] upstream for details). 1 - https://github.com/github/linguist/#using-gitattributes 2 - github-linguist/linguist#4660 Signed-off-by: Paul Chaignon <paul@cilium.io>
Mark go.sum files as generated to hide them in pull requests by default. They can still be uncollapsed if needed. This particular .gitattributes syntax is documented at [1]. GitHub doesn't hide them by default because some users may want to inspect these files (see [2] upstream for details). 1 - https://github.com/github/linguist/#using-gitattributes 2 - github-linguist/linguist#4660 Signed-off-by: Paul Chaignon <paul@cilium.io>
Mark go.sum files as generated to hide them in pull requests by default. They can still be uncollapsed if needed. This particular .gitattributes syntax is documented at [1]. GitHub doesn't hide them by default because some users may want to inspect these files (see [2] upstream for details). 1 - https://github.com/github/linguist/#using-gitattributes 2 - github-linguist/linguist#4660 Signed-off-by: Paul Chaignon <paul@cilium.io>
Go 1.11 and newer include built in support for Go modules, with a user-editable go.mod file and a generated go.sum file.
This flags go.sum as a generated file so that it will be suppressed in diffs.
Checklist: