From: Daniel Jasper Date: Fri, 14 Nov 2014 13:27:28 +0000 (+0000) Subject: clang-format: Give clang-format-diff.py a -v option. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f0a1a658d9db734f55a637d6b2b64a084653fe8;p=clang clang-format: Give clang-format-diff.py a -v option. With it, it prints the file being formatted. Apparently people are formatting thousands of files and some progress indication is helpful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221990 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/clang-format/clang-format-diff.py b/tools/clang-format/clang-format-diff.py index b896ffce93..247dace9be 100755 --- a/tools/clang-format/clang-format-diff.py +++ b/tools/clang-format/clang-format-diff.py @@ -52,6 +52,8 @@ def main(): r'|protodevel)', help='custom pattern selecting file paths to reformat ' '(case insensitive, overridden by -regex)') + parser.add_argument('-v', '--verbose', action='store_true', + help='be more verbose, ineffective without -i') parser.add_argument( '-style', help= @@ -89,6 +91,8 @@ def main(): # Reformat files containing changes in place. for filename, lines in lines_by_file.iteritems(): + if args.i and args.verbose: + print 'Formatting', filename command = [binary, filename] if args.i: command.append('-i')