Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/protoc-gen-go: improve generation of comments
The following improvements were made: * All standalone comments above the "syntax" marker are preserved similar to Java and some other generators. * All standalone comments above the "package" marker are preserved to be consistent with our former behavior. * Leading comments are now generated for enums and extension fields. * Single-line trailing comments are now generated for enum values, message fields, and extension fields. * The leading comments for each field that is part of a oneof are now generated with the wrapper types rather than being shoved into the comment for the oneof itself in an unreadable way. * The deprecation marker is always generated as being above the declaration rather than sometimes being an inlined comment. * The deprecation marker is now properly generated for weak field setters. Updates golang/protobuf#666 Change-Id: I7fd832dd4f86d15bfff70d7c22c6ba4934c05fcf Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/189238 Reviewed-by: Damien Neil <dneil@google.com>
- Loading branch information
Showing
83 changed files
with
5,309 additions
and
3,853 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
annotation:{path:5 path:0 source_file:"annotations/annotations.proto" begin:590 end:609} annotation:{path:5 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:626 end:673} annotation:{path:4 path:0 source_file:"annotations/annotations.proto" begin:1953 end:1975} annotation:{path:4 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:2119 end:2139} annotation:{path:4 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:3033 end:3056} | ||
annotation:{path:5 path:0 source_file:"annotations/annotations.proto" begin:750 end:769} annotation:{path:5 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:786 end:833} annotation:{path:4 path:0 source_file:"annotations/annotations.proto" begin:2113 end:2135} annotation:{path:4 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:2259 end:2279} annotation:{path:4 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:3173 end:3196} |
Oops, something went wrong.