clang-format
« Back to VersTracker
Description:
Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript
Type: Formula  |  Latest Version: 21.1.8@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: code-formatting c++ developer-tools linter llvm
Install: brew install clang-format
About:
Clang-format is a standalone tool and library that parses C, C++, Java, JavaScript, Objective-C, and TypeScript code to automatically format it according to a specified style. It enforces consistent code style, making large codebases easier to read and maintain. The tool is highly configurable, supporting LLVM, Google, Chromium, and Mozilla style conventions, or custom rules defined in a .clang-format file.
Key Features:
  • Supports multiple programming languages including C++, Java, and JavaScript
  • Enforces consistent coding style based on configurable rules
  • Can automatically fix formatting issues or just check for compliance
  • Integrates easily with editors like Vim, Emacs, and VS Code
Use Cases:
  • Standardizing code style across a team or open-source project
  • Automating code formatting in CI/CD pipelines to prevent style drift
  • Refactoring legacy codebases to meet modern style guidelines
Alternatives:
  • rustfmt – Rustfmt is the equivalent tool specifically for the Rust programming language.
  • Prettier – Prettier is a popular opinionated code formatter for web development languages like JavaScript and CSS.
License: Apache-2.0 WITH LLVM-exception
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, sonoma, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Dec 16, 2025 2:52pm 0 VERSION_BUMP cfbb508b
Oct 21, 2025 11:56am 0 VERSION_BUMP 271bb20e
Oct 8, 2025 1:56pm 0 VERSION_BUMP 25059888
Sep 24, 2025 2:19am 0 VERSION_BUMP 8a57a3bf
Sep 12, 2025 8:13pm 0 VERSION_BUMP 59f23c7f
Jan 14, 2025 11:58am 0 VERSION_BUMP 9c626e6d
Nov 20, 2024 2:49am 0 VERSION_BUMP 59df2be6
Nov 19, 2024 9:19pm 0 VERSION_BUMP 2c3e4915
Oct 30, 2024 8:19pm 0 VERSION_BUMP 8c197339
Oct 30, 2024 12:31pm 0 VERSION_BUMP 50c72528
Oct 1, 2024 4:45pm 0 VERSION_BUMP 795488ea
Sep 17, 2024 1:15pm 0 VERSION_BUMP abc3162d