Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proto file formatter #4113

Closed
ashi009 opened this issue Dec 29, 2017 · 3 comments
Closed

proto file formatter #4113

ashi009 opened this issue Dec 29, 2017 · 3 comments
Labels

Comments

@ashi009
Copy link

ashi009 commented Dec 29, 2017

Hi all,

Is there a proto file formatter somewhere?

If not, why there isn't one? It seems possible to create a working prototype from FileDescriptor.

@mikedanese
Copy link

clang-format supports formatting proto files. Google uses clang-format for this internally:

https://clang.llvm.org/docs/ClangFormat.html

@xuwei-k
Copy link
Contributor

xuwei-k commented Aug 2, 2022

@wirekang
Copy link

Since this issue is appearing as the second result in Google's search results, I leave the workaround here.

Old versions of clang-format does not format proto files propery in some cases. In many system, default version of clang-format is quite old one. In my case, ubuntu 22.04, I installed newer version of clang-format via apt install clang-foramt-15 and replace every clang-format command to clang-format-15 to solve the problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants