clangformat
ClangFormat is an automated code formatter that is part of the LLVM Clang project. It reformats source code to a consistent style across a codebase and is language aware, with primary support for C, C++, and Objective-C, as well as several other languages supported by clang-format such as Java and JavaScript. Formatting rules are defined in a configuration file named .clang-format (or _clang-format on Windows), using a YAML-based syntax.
Configuration and style options are centralized in the .clang-format file. Users can choose a base style with
Usage and workflow are straightforward: clang-format can format files in place or emit formatted text to standard
Integration and ecosystem: clang-format is widely integrated into editors and IDEs (for example VS Code, Vim/Neovim,
History and licensing: clang-format was developed as part of the LLVM project and is distributed under the