Skip to content

Don't treat go.mod as a "generated" file#4357

Closed
borgstrom wants to merge 1 commit intogithub-linguist:masterfrom
borgstrom:go.mod-not-generated
Closed

Don't treat go.mod as a "generated" file#4357
borgstrom wants to merge 1 commit intogithub-linguist:masterfrom
borgstrom:go.mod-not-generated

Conversation

@borgstrom
Copy link
Copy Markdown

While it's true that the go tool does modify go.mod I would like to propose that go.mod be excluded from being treated as a "generated" file since understanding changes to it are a crucial part of the review process.

For example, here's the default files view from a recent PR to a project that groomed some dependencies:

screen shot 2018-12-17 at 8 12 16 am

A reviewer must "load diff" on go.mod. And for PRs that have lots of changes across many files it is easy to gloss over the two collapsed files without actually expanding the contents of go.mod.

From a precedence standpoint dep (Gopkg.toml & Gopkg.lock) has similar properties in that dep modifies Gopkg.toml, but only Gopkg.lock is considered "generated".

Thanks!

@borgstrom borgstrom force-pushed the go.mod-not-generated branch from 1d09157 to 28d908f Compare December 17, 2018 17:26
@borgstrom
Copy link
Copy Markdown
Author

I totally missed #4340... Closing in favor of that.

@borgstrom borgstrom closed this Dec 17, 2018
@borgstrom borgstrom deleted the go.mod-not-generated branch December 17, 2018 17:37
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant