commit | e467fa1560c57d7402590e04ae23ea793bd884fe | [log] [tgz] |
---|---|---|
author | txtpbfmt team <no-reply@google.com> | Sun Jun 06 04:16:15 2021 |
committer | txtpbfmt team <txtpbfmt-copybara-robot@google.com> | Sun Jun 27 02:21:06 2021 |
tree | adac5220e5c715c39730bb16edbf23da91b5f722 | |
parent | 408574485efafaec71ca8ff5fb6362b5bbf82c44 [diff] |
Internal change PiperOrigin-RevId: 377737387
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.