[PATCH] [clang-tidy] Add a little python script that can run clang-tidy and apply fixes over an entire codebase.

Alexander Kornienko alexfh at google.com
Thu Sep 4 06:57:24 PDT 2014


================
Comment at: clang-tidy/tool/run-clang-tidy.py:33
@@ +32,3 @@
+
+Database setup: http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html
+"""
----------------
I'd use a more specific term like "Compilation database".

================
Comment at: clang-tidy/tool/run-clang-tidy.py:108
@@ +107,3 @@
+  if max_task == 0:
+    import multiprocessing
+    max_task = multiprocessing.cpu_count()
----------------
Why not import it in the beginning?

================
Comment at: clang-tidy/tool/run-clang-tidy.py:120
@@ +119,3 @@
+  retval = 0
+  try:
+    while True:
----------------
I'm still a bit concerned about reimplementing xargs in Python. Especially if you have to handle ctrl-c manually.

http://reviews.llvm.org/D5188






More information about the cfe-commits mailing list