diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/add_new_check.py')
-rwxr-xr-x | clang-tools-extra/clang-tidy/add_new_check.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py index ebee5049aa2..6de707da3e0 100755 --- a/clang-tools-extra/clang-tidy/add_new_check.py +++ b/clang-tools-extra/clang-tidy/add_new_check.py @@ -147,7 +147,8 @@ void %(check_name)s::check(const MatchFinder::MatchResult &Result) { # Modifies the module to include the new check. def adapt_module(module_path, module, check_name, check_name_camel): - filename = os.path.join(module_path, module.capitalize() + 'TidyModule.cpp') + modulecpp = filter(lambda p: p.lower() == module.lower() + "tidymodule.cpp", os.listdir(module_path))[0] + filename = os.path.join(module_path, modulecpp) with open(filename, 'r') as f: lines = f.readlines() |