[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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@248997 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
da72ce1a7a
Коммит
6ca8fa5c16
|
@ -217,7 +217,7 @@ def update_checks_list(module_path):
|
||||||
|
|
||||||
checks = map(lambda s: ' ' + s.replace('.rst', '\n'),
|
checks = map(lambda s: ' ' + s.replace('.rst', '\n'),
|
||||||
filter(lambda s: s.endswith('.rst') and s != 'list.rst',
|
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()
|
checks.sort()
|
||||||
|
|
||||||
print('Updating %s...' % filename)
|
print('Updating %s...' % filename)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче