clang-format
Auto-format C/C++/Java/JavaScript/Objective-C/Protobuf/C# code. tldr-pages
On several platforms
Several platforms
Format a file and print the result to stdout
clang-format path/to/fileIdentifyFormat a file in-place
clang-format -i path/to/fileIdentifyFormat a file using a predefined coding style
clang-format --style LLVM path/to/fileIdentifyFormat a file using the .clang-format file in one of the parent directories of the source file
clang-format --style file path/to/fileIdentifyGenerate a custom .clang-format file
clang-format --style LLVM --dump-config >.clang-formatIdentify