clang-format

Install command:
brew install clang-format

Also known as: clang-format@18

Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript

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

License: Apache-2.0

Formula JSON API: /api/formula/clang-format.json

Formula code: clang-format.rb on GitHub

Bottle (binary package) installation support provided for:

Apple Silicon sonoma
ventura
monterey
Intel sonoma
ventura
monterey
64-bit linux

Current versions:

stable 18.1.4
head ⚡️ HEAD

Other versions:

clang-format@11 11.1.0 Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript
clang-format@8 8.0.1 Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript

Depends on when building from source:

cmake 3.29.2 Cross-platform make

Analytics:

Installs (30 days)
clang-format 10,909
clang-format --HEAD 25
Installs on Request (30 days)
clang-format 9,449
clang-format --HEAD 25
Build Errors (30 days)
clang-format 6
Installs (90 days)
clang-format 22,937
clang-format --HEAD 47
Installs on Request (90 days)
clang-format 20,087
clang-format --HEAD 47
Installs (365 days)
clang-format 94,452
clang-format --HEAD 140
Installs on Request (365 days)
clang-format 82,707
clang-format --HEAD 140
Fork me on GitHub