Author: alexfh Date: Thu Oct 1 04:23:20 2015 New Revision: 248997 URL: http://llvm.org/viewvc/llvm-project?rev=248997&view=rev Log: [clang-tidy] fix add_new_check.py
Before this check, I would get the following error: Updating ./misc/CMakeLists.txt... Creating ./misc/NoReinterpret_castCheck.h... Creating ./misc/NoReinterpret_castCheck.cpp... Updating ./misc/MiscTidyModule.cpp... Creating ../test/clang-tidy/misc-no-reinterpret_cast.cpp... Creating ../docs/clang-tidy/checks/misc-no-reinterpret_cast.rst... Traceback (most recent call last): File "./add_new_check.py", line 271, in <module> main() File "./add_new_check.py", line 267, in main update_checks_list(module_path) File "./add_new_check.py", line 220, in update_checks_list os.listdir('docs/clang-tidy/checks'))) OSError: [Errno 2] No such file or directory: 'docs/clang-tidy/checks' Patch by Matthias Gehre! Differential revision: http://reviews.llvm.org/D13272 Modified: clang-tools-extra/trunk/clang-tidy/add_new_check.py Modified: clang-tools-extra/trunk/clang-tidy/add_new_check.py URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/add_new_check.py?rev=248997&r1=248996&r2=248997&view=diff ============================================================================== --- clang-tools-extra/trunk/clang-tidy/add_new_check.py (original) +++ clang-tools-extra/trunk/clang-tidy/add_new_check.py Thu Oct 1 04:23:20 2015 @@ -217,7 +217,7 @@ def update_checks_list(module_path): checks = map(lambda s: ' ' + s.replace('.rst', '\n'), filter(lambda s: s.endswith('.rst') and s != 'list.rst', - os.listdir('docs/clang-tidy/checks'))) + os.listdir(os.path.join(module_path, '../../docs/clang-tidy/checks')))) checks.sort() print('Updating %s...' % filename) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits