[PATCH] Add clang-tidy-diff.py script to run clang-tidy and display warnings on changed lines only.

Daniel Jasper djasper at google.com
Wed Jun 25 07:01:46 PDT 2014


Looks good.

================
Comment at: clang-tidy/tool/clang-tidy-diff.py:34
@@ +33,3 @@
+import subprocess
+import StringIO
+import sys
----------------
Is StringIO used?

================
Comment at: clang-tidy/tool/clang-tidy-diff.py:52
@@ +51,3 @@
+  parser.add_argument('-iregex', metavar='PATTERN', default=
+                      r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hpp|m|mm|inc|js|proto'
+                      r'|protodevel)',
----------------
Are js, proto and protodevel useful here?

================
Comment at: clang-tidy/tool/clang-tidy-diff.py:103
@@ +102,3 @@
+
+  # TODO: Corner cases.
+  line_filter_json = json.dumps(
----------------
s/TODO/FIXME/

And maybe provide a bit of context as this doesn't really mean anything.

http://reviews.llvm.org/D4288






More information about the cfe-commits mailing list