commit | ded576c341fa5ec4e4c4d2c3cae9475805fa3329 | [log] [tgz] |
---|---|---|
author | kaue <kaue@google.com> | Tue Oct 15 09:57:36 2019 |
committer | txtpbfmt team <txtpbfmt-copybara-robot@google.com> | Tue Oct 15 10:05:45 2019 |
tree | 3a2a9500083ab4e1d860fd8d599488311f50f789 | |
parent | e54875617f8cbc241264575f8b0d3c0a9e1731cb [diff] |
Internal change PiperOrigin-RevId: 274764750
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.