summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-11-14 13:27:28 +0000
committerDaniel Jasper <djasper@google.com>2014-11-14 13:27:28 +0000
commit8f0a1a658d9db734f55a637d6b2b64a084653fe8 (patch)
tree0808dfcbdef12e6f825ab682119505cee0c0911a /tools
parent277674854c973b60a03753ce1473986aa42c9c27 (diff)
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/clang-format/clang-format-diff.py4
1 files changed, 4 insertions, 0 deletions
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')