clang-format-diff-10 (1) Linux Manual Page
NAME
clang-format-diff.py – manual page for clang-format-diff.py 10
DESCRIPTION
usage: clang-format-diff.py [-h] [-i] [-p NUM] [-regex PATTERN]
- [-iregex PATTERN] [-sort-includes] [-v]
- [-style STYLE] [-binary BINARY]
This script reads input from a unified diff and reformats all the changed lines. This is useful to reformat all the lines touched by a specific patch. Example usage for git/svn users:
- git diff
-U0–no-colorHEAD^ | clang-format-diff.py-p1-isvn diff–diff-cmd=,diff/-x-U0| clang-format-diff.py-i
optional arguments:
-h,–help- show this help message and exit
-i- apply edits to files instead of displaying a diff
-pNUM- strip the smallest prefix containing P slashes
-regexPATTERN- custom pattern selecting file paths to reformat (case sensitive, overrides
-iregex) -iregexPATTERN- custom pattern selecting file paths to reformat (case insensitive, overridden by
-regex) -sort-includes- let clang-format sort include blocks
-v,–verbose- be more verbose, ineffective without
-i -styleSTYLE- formatting style to apply (LLVM, Google, Chromium, Mozilla, WebKit)
-binaryBINARY- location of binary to use for clang-format
