All Projects → eklitzke → clang-format-all

eklitzke / clang-format-all

Licence: GPL-3.0 license
Run clang-format -i on all of the files in your C or C++ project

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to clang-format-all

bde verify
Tool used to format, improve and verify code to BDE guidelines
Stars: ✭ 42 (-60%)
Mutual labels:  clang-format
objc-format-check
🛠A code-format tool for C or OC
Stars: ✭ 75 (-28.57%)
Mutual labels:  clang-format
cxx
🔌 Configuration-free utility for building, testing and packaging executables written in C++. Can auto-detect compilation flags based on includes, via the package system and pkg-config.
Stars: ✭ 87 (-17.14%)
Mutual labels:  clang-format
cxxd
C/C++ language server implemented on top of Clang frontend.
Stars: ✭ 145 (+38.1%)
Mutual labels:  clang-format
cmake-init
The missing CMake project initializer
Stars: ✭ 1,071 (+920%)
Mutual labels:  clang-format
clang-format-action
GitHub Action for clang-format checking
Stars: ✭ 48 (-54.29%)
Mutual labels:  clang-format
editorPreferences
My editor preferences for Emacs / Sublime / VS Code / Clang Format etc.
Stars: ✭ 18 (-82.86%)
Mutual labels:  clang-format
Moderncppstarter
🚀 Kick-start your C++! A template for modern C++ projects using CMake, CI, code coverage, clang-format, reproducible dependency management and much more.
Stars: ✭ 2,381 (+2167.62%)
Mutual labels:  clang-format
Cmake Examples
Useful CMake Examples
Stars: ✭ 7,220 (+6776.19%)
Mutual labels:  clang-format
Clangformat Xcode
Xcode plug-in to to use clang-format from in Xcode and consistently format your code with Clang
Stars: ✭ 2,852 (+2616.19%)
Mutual labels:  clang-format
clang-format-editor
Clang-Format Editor is a tool that helps you find the best Clang-Format Style for your C++, C#, Java, JavaScript, and Objective-C code.
Stars: ✭ 15 (-85.71%)
Mutual labels:  clang-format
Format.cmake
💅 Stylize your code! Automatic clang-format and cmake-format targets for CMake.
Stars: ✭ 94 (-10.48%)
Mutual labels:  clang-format

Format All The Things!

This is a bash script that will run clang-format -i on your code.

Features:

  • Finds the right path to clang-format on Ubuntu/Debian, which encode the LLVM version in the clang-format filename
  • Fixes files recursively
  • Detects the most common file extensions used by C/C++ projects

Basic usage:

clang-format-all src/

Advanced usage:

clang-format-all project1/ project2/ project3/

Note: While clang-format is a powerful tool for enforcing a consistent coding standard, you should be aware that different versions of clang-format may format the same code differently. As one example that I know of, in C++ long vector or set literals (say, a dozen elements or more) in clang-format 3.7 are generally formatted with one entry per line, but under clang-format 3.5 the same literals may be formatted with multiple entries per line if the entries are short enough. Therefore if multiple people are contributing to the same project, you should strive to ensure that they're all using the same version of clang-format.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].