clang-format
Verified for current stable LTS
Clang Format Commands
Clang Format command syntax with verified terminal examples.
Commands
8 commands for Clang Format
clang-format Operations
Clang Format Command: Format File And Print
clang-format <path/to/file> clang-format Operations
Clang Format Command: Format File In Place
clang-format -i <path/to/file> clang-format Operations
Clang Format Command: Format File With Predefined Style
clang-format --style <LLVM|GNU|Google|Chromium|Microsoft|Mozilla|WebKit> <path/to/file> clang-format Operations
Clang Format Command: Format File With Local Style
clang-format --style=file <path/to/file> clang-format Operations
Clang Format Command: Generate Custom Clang Format File
clang-format --style <LLVM|GNU|Google|Chromium|Microsoft|Mozilla|WebKit> --dump-config > <.clang-format> clang-format Operations
Clang Format Command: Format File Print To Stdout
clang-format <path/to/file> clang-format Operations
Clang Format Command: Format File Predefined Style
clang-format --style <LLVM|GNU|Google|Chromium|Microsoft|Mozilla|WebKit> <path/to/file> clang-format Operations
Clang Format Command: Format File Using Config File
clang-format --style=file <path/to/file> Suggest a Clang Format Command
Submit missing workflows, corrections, or verified alternatives for this tool.
FAQ
Coverage: Focused examples for common Clang Format workflows.
Verified version: current stable LTS.
Verification: Test commands in a disposable workspace and submit notes for edge cases.