Skip to content

Commit

Permalink
Add gitattributes file to hide autogen code (#131)
Browse files Browse the repository at this point in the history
Hide autogenerated code from PRs. I renamed the go-helpers files while I
was here so that they used the common '.pb.go' suffix used by other
protoc plugins
  • Loading branch information
tdeebswihart authored Nov 27, 2023
1 parent 237e45a commit 0367255
Show file tree
Hide file tree
Showing 34 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# vendor is marked as linguist-vendored by default, but this
# only excluses the code from stats.
#
# Forcing it to be linguist-generated will also exclude it from diffs.
#
# See https://github.com/github-linguist/linguist/blob/master/docs/overrides.md#summary
# for more info.
*.pb.go linguist-generated
*.mock.go linguist-generated
File renamed without changes.
2 changes: 1 addition & 1 deletion cmd/protoc-gen-go-helpers/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func main() {
return fmt.Errorf("failed to format generated source: \n%s\n%w", src.String(), err)
}

gf := plugin.NewGeneratedFile(fmt.Sprintf("%s.go-helpers.go", file.GeneratedFilenamePrefix), ".")
gf := plugin.NewGeneratedFile(fmt.Sprintf("%s.go-helpers.pb.go", file.GeneratedFilenamePrefix), ".")
gf.Write(fmtd)
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0367255

Please sign in to comment.