Skip to content

Commit

Permalink
Support "--style" option
Browse files Browse the repository at this point in the history
  • Loading branch information
fwany21 authored and Sarcasm committed Sep 21, 2020
1 parent fcecb6f commit 39081c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions run-clang-format.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def run_clang_format_diff(args, file):
else:
invocation = [args.clang_format_executable, file]

if args.style:
invocation.extend(['--style', args.style])

if args.dry_run:
print(" ".join(invocation))
return [], []
Expand Down Expand Up @@ -298,6 +301,9 @@ def main():
default=[],
help='exclude paths matching the given glob-like pattern(s)'
' from recursive search')
parser.add_argument(
'--style',
help='formatting style to apply (LLVM, Google, Chromium, Mozilla, WebKit)')

args = parser.parse_args()

Expand Down

0 comments on commit 39081c9

Please sign in to comment.