llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Zeyi Xu (zeyi2) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/202999.diff 1 Files Affected: - (modified) clang-tools-extra/docs/clang-tidy/Contributing.rst (+5-1) ``````````diff diff --git a/clang-tools-extra/docs/clang-tidy/Contributing.rst b/clang-tools-extra/docs/clang-tidy/Contributing.rst index 79551f60e9b1c..65933061b49f1 100644 --- a/clang-tools-extra/docs/clang-tidy/Contributing.rst +++ b/clang-tools-extra/docs/clang-tidy/Contributing.rst @@ -415,7 +415,11 @@ Some suggestions to ensure your check is robust: - Define macros that contain code matched by your check. - Define template classes that contain code matched by your check. - Define template specializations that contain code matched by your check. -- Test your check under both Windows and Linux environments. +- Test your check under both Windows and Linux environments. For example, when + a fix-it inserts new lines, use the source file's existing newline style + instead of hard-coding ``\n``. You can use + ``SourceManager::getBufferData(FileID).detectEOL()`` to get the newline style + for a file. - Watch out for high false-positive rates. Ideally, a check would have no false positives, but given that matching against an AST is not control- or data flow- sensitive, a number of false positives are expected. The `````````` </details> https://github.com/llvm/llvm-project/pull/202999 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
