carlosgalvezp added inline comments.

================
Comment at: clang-tools-extra/clang-tidy/add_new_check.py:278
   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
 
----------------
There is only 6 check tests in the clang-tidy folder that use `--fix-notes`, so 
I believe this is not quite standard. Thus I'm not convinced this should be 
part of the example test, which is supposed to be fairly basic. Would it be 
better to change the example check instead, so that the fix is not attached to 
the note? Example:


  diag(MatchedDecl->getLocation(), "function %%0 is insufficiently awesome, 
prepend it with 'awesome_'")
      << MatchedDecl
      << FixItHint::CreateInsertion(MatchedDecl->getLocation(), "awesome_");


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146875/new/

https://reviews.llvm.org/D146875

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to