[PATCH] D31326: Add option to export fixes to run-clang-tidy.py

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 5 07:48:51 PDT 2017


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


================
Comment at: run-clang-tidy.py:49
+import yaml
+import glob
 
----------------
Please sort the imports


================
Comment at: run-clang-tidy.py:99
+      content = yaml.safe_load(f)
+      if not content: continue # Skip empty files
+
----------------
Please put `continue` on the next line.


================
Comment at: run-clang-tidy.py:105
+      elif merged['MainSourceFile'] != content['MainSourceFile']:
+        # The values given for MainSourceFile are inconsistent.
+        # Just empty MainSourceFile blank:
----------------
This is going to be the case for each non-trivial invocation of this script. Do we need to keep `MainSourceFile` at all?


================
Comment at: run-clang-tidy.py:242
+    print 'Writing fixes to ' + args.export_fixes
+    merge_replacement_files(tmpdir,args.export_fixes)
+
----------------
nit: Add a space after the comma.


https://reviews.llvm.org/D31326





More information about the cfe-commits mailing list