[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

llvm-svn: 248997
This commit is contained in:
Alexander Kornienko 2015-10-01 09:23:20 +00:00
parent 30c423b1e3
commit eef2c237a5
1 changed files with 1 additions and 1 deletions

View File

@ -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)