Exclude golang Vendor folders in Merge Requests
Description
When committing vendor directories in Go projects, Merge Requests can be larger and harder to review as content from the vendor packages is included in the changes of the merge request.
Additional Details
From Go's FAQ on dependencies:
It's up to you:
Pros
- It's the only way to get truly reproducible builds, as it guards against upstream renames, deletes and commit history overwrites.
- You don't need an extra dep ensure step to sync vendor/ with Gopkg.lock after most operations, such as go get, cloning, getting latest, merging, etc.
Cons
- Your repo will be bigger, potentially a lot bigger, though prune can help minimize this problem.
- PR diffs will include changes for files under vendor/ when Gopkg.lock is modified, however files in vendor/ are hidden by default on GitHub.
Proposal
Files in Go's vendor folder
don't need to be reviewed as part of the code review workflow. These files should be automatically suppressed in Merge Requests.
Edited by Kai Armstrong