[PATCH] D37479: run-clang-tidy: Report progress

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 6 06:14:14 PDT 2017


alexfh requested changes to this revision.
alexfh added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang-tidy/tool/run-clang-tidy.py:155
                                      args.quiet)
-    sys.stdout.write(' '.join(invocation) + '\n')
+    sys.stdout.write('[%s/%s] Running: %s' % (index+1, total_file_count, ' '.join(invocation) + '\n'))
     subprocess.call(invocation)
----------------
1. Can we have these messages printed on the same line when run in a terminal? Progress display is better when it doesn't fill the whole terminal scrollback. Changing '\n' to '\r' should be a good start, but we also need to insure reasonable interaction with other messages.

2. The whole invocation may be quite a large line. Maybe just print the filename? (the rest would be repeated anyway)


https://reviews.llvm.org/D37479





More information about the cfe-commits mailing list