commit | ebd45c707ce7e392204ede07e14ebe3d12f1a8ea | [log] [tgz] |
---|---|---|
author | txtpbfmt team <no-reply@google.com> | Tue Jul 28 16:11:00 2020 |
committer | txtpbfmt team <txtpbfmt-copybara-robot@google.com> | Tue Jul 28 16:11:36 2020 |
tree | e5029870b79fdd70b16d2eeb16e3bc61e571db76 | |
parent | 52180c9bd5243d572cac252b05eec88347f37539 [diff] |
Keep list inline if it was originally inline. PiperOrigin-RevId: 323584341
txtpbfmt
parses, edits and formats text proto files in a way that preserves comments.
This saves development (read/edit/review) time and enables automated edits.
Install:
$ go get -u github.com/protocolbuffers/txtpbfmt/cmd/txtpbfmt
Format files in-place:
$ ${GOPATH}/bin/txtpbfmt [FILES]
Write formatted input to stdout:
$ ${GOPATH}/bin/txtpbfmt < [FILE]
Main features:
Yes, see ast.go.
You can disable formatting for a whole file by adding a comment with “# txtpbfmt: disable” to the top of the file (before the first non-empty non-comment line), eg:
# File overview ... # txtpbfmt: disable content: { ... }
The .textproto
extension is the most used extension inside Google (the second most popular choice is .textpb
).
Currently there is no open source integration with any editor.