Created
November 29, 2017 14:43
-
-
Save dongyuwei/8b7b89b48bae52fbcb8b3927e911187c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`brew install clang-format` | |
`clang-format -h` | |
`clang-format -i -style=Mozilla InputController.mm` | |
`clang-format -style=Mozilla -dump-config` | |
ref: http://tonyarnold.com/2014/05/31/autoformatting-your-code.html |
http://clang.llvm.org/docs/ClangFormatStyleOptions.html
When clang-format formats a file, it auto-detects the language using the file name. When formatting standard input or a file that doesn’t have the extension corresponding to its language, -assume-filename= option can be used to override the file name clang-format uses to detect the language.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clang Format can be configured using a .clang-format file containing a series of configuration options