This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG32ab79ebc496: [clang-tidy] Fix add_new_check.py to generate correct list.rst autofix column… (authored by mattbeardsley, committed by kbobyrev).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110600/new/ https://reviews.llvm.org/D110600 Files: clang-tools-extra/clang-tidy/add_new_check.py Index: clang-tools-extra/clang-tidy/add_new_check.py =================================================================== --- clang-tools-extra/clang-tidy/add_new_check.py +++ clang-tools-extra/clang-tidy/add_new_check.py @@ -323,13 +323,13 @@ def has_auto_fix(check_name): dirname, _, check_name = check_name.partition("-") - checkerCode = get_actual_filename(dirname, - get_camel_name(check_name) + '.cpp') + checker_code = get_actual_filename(os.path.join(clang_tidy_path, dirname), + get_camel_name(check_name) + '.cpp') - if not os.path.isfile(checkerCode): + if not os.path.isfile(checker_code): return "" - with io.open(checkerCode, encoding='utf8') as f: + with io.open(checker_code, encoding='utf8') as f: code = f.read() if 'FixItHint' in code or "ReplacementText" in code or "fixit" in code: # Some simple heuristics to figure out if a checker has an autofix or not.
Index: clang-tools-extra/clang-tidy/add_new_check.py =================================================================== --- clang-tools-extra/clang-tidy/add_new_check.py +++ clang-tools-extra/clang-tidy/add_new_check.py @@ -323,13 +323,13 @@ def has_auto_fix(check_name): dirname, _, check_name = check_name.partition("-") - checkerCode = get_actual_filename(dirname, - get_camel_name(check_name) + '.cpp') + checker_code = get_actual_filename(os.path.join(clang_tidy_path, dirname), + get_camel_name(check_name) + '.cpp') - if not os.path.isfile(checkerCode): + if not os.path.isfile(checker_code): return "" - with io.open(checkerCode, encoding='utf8') as f: + with io.open(checker_code, encoding='utf8') as f: code = f.read() if 'FixItHint' in code or "ReplacementText" in code or "fixit" in code: # Some simple heuristics to figure out if a checker has an autofix or not.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits