Yes, there are several tools available for C and C++ that check code formatting:
- Clang-Format: Part of the LLVM project,
clang-format
automatically formats C and C++ code according to predefined or custom style guidelines. It’s widely used and supports various style options. - Artistic Style (AStyle): AStyle is a source code indenter, formatter, and beautifier for C and C++. It allows customization of coding styles and can be integrated into various development environments.
- Cpplint: Developed by Google,
cpplint
is a lint-like tool that checks C++ code for adherence to Google’s style guide. It’s implemented as a Python script and can be integrated into development workflows.
These tools help maintain consistent code formatting and adhere to coding standards in C and C++ projects.