更新时间:2022-12-27 17:45:57
似乎苹果不提供 clang-format 。现在您至少有三个选项:
Seems like Apple doesn't ship clang-format with the Command Line Tools. Right now you have at least three options:
当用户 johnhaley81 指出, clang-format
现在位于自制软件中:
As user johnhaley81 pointed out, clang-format
is now in homebrew:
clang-format现在正在制作。
brew install clang-format
请考虑升级他的 post 如果您认为此答案有用。
Please consider upvoting his post if you find this answer useful.
预构建软件包位于 llvm.org 。对于Mac OSX,您需要下载 darwin 包。
Pre-build bundles are available at llvm.org. For Mac OSX, you need to download the darwin package.
以下是有关如何执行此操作的说明:
http://nacho4d-nacho4d.blogspot.de/2013/11/clang-format.html
Here's an instruction on how to do this: http://nacho4d-nacho4d.blogspot.de/2013/11/clang-format.html
这里是另一个:
http://blog.hardcodes.de/articles/63/building-clang-format-and-friends-on-osx-mountain-lion