PiotrZSL created this revision.
Herald added subscribers: carlosgalvezp, xazax.hun.
Herald added a reviewer: njames93.
Herald added a project: All.
PiotrZSL requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

Currently test for newly added check in clang-tidy fails,
this is because Fix is attached to note, but test is executed
without --fix-notes. This change adding --fix-notes to test.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146875

Files:
  clang-tools-extra/clang-tidy/add_new_check.py


Index: clang-tools-extra/clang-tidy/add_new_check.py
===================================================================
--- clang-tools-extra/clang-tidy/add_new_check.py
+++ clang-tools-extra/clang-tidy/add_new_check.py
@@ -275,7 +275,7 @@
     module, check_name + '.' + test_extension))
   print('Creating %s...' % filename)
   with io.open(filename, 'w', encoding='utf8', newline='\n') as f:
-    f.write("""// RUN: %%check_clang_tidy %%s %(check_name_dashes)s %%t
+    f.write("""// RUN: %%check_clang_tidy %%s %(check_name_dashes)s %%t -- 
--fix-notes
 
 // FIXME: Add something that triggers the check here.
 void f();
@@ -293,7 +293,7 @@
 
 
 def get_actual_filename(dirname, filename):
-  if not os.path.isdir(dirname): 
+  if not os.path.isdir(dirname):
     return ''
   name = os.path.join(dirname, filename)
   if (os.path.isfile(name)):


Index: clang-tools-extra/clang-tidy/add_new_check.py
===================================================================
--- clang-tools-extra/clang-tidy/add_new_check.py
+++ clang-tools-extra/clang-tidy/add_new_check.py
@@ -275,7 +275,7 @@
     module, check_name + '.' + test_extension))
   print('Creating %s...' % filename)
   with io.open(filename, 'w', encoding='utf8', newline='\n') as f:
-    f.write("""// RUN: %%check_clang_tidy %%s %(check_name_dashes)s %%t
+    f.write("""// RUN: %%check_clang_tidy %%s %(check_name_dashes)s %%t -- --fix-notes
 
 // FIXME: Add something that triggers the check here.
 void f();
@@ -293,7 +293,7 @@
 
 
 def get_actual_filename(dirname, filename):
-  if not os.path.isdir(dirname): 
+  if not os.path.isdir(dirname):
     return ''
   name = os.path.join(dirname, filename)
   if (os.path.isfile(name)):
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to