I was annoyed that clang-format wasn’t shipped by default, I also have a lot of issues with all the many options for package managers on macOS, they’re all just gloriously bad.
Luckily, it’s pretty simple to just grab a recent Clang build (this
one is statically linked so you can extract only
clang-format and it
will still work).
curl -O https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-apple-darwin.tar.xz tar xf clang+llvm-8.0.0-x86_64-apple-darwin.tar.xz clang+llvm-8.0.0-x86_64-apple-darwin/bin/clang-format mv ./clang+llvm-8.0.0-x86_64-apple-darwin/bin/clang-format /usr/local/bin/