This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG89e663c4f83a: [clang-tidy] Improve add_new_check.py to
recognize more checks (authored by LegalizeAdulthood).
Repository:
rG LLVM Github Monorepo
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM, thank you!
Comment at: clang-tools-extra/clang-tidy/add_new_check.py:335-336
+module_file = get_module_filename(module_path, module_name)
+if not
LegalizeAdulthood added inline comments.
Comment at: clang-tools-extra/clang-tidy/add_new_check.py:335-336
+module_file = get_module_filename(module_path, module_name)
+if not os.path.isfile(module_file):
+ return ''
+with io.open(module_file, 'r') as f:
LegalizeAdulthood updated this revision to Diff 431383.
LegalizeAdulthood added a comment.
Update from review comments
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126134/new/
https://reviews.llvm.org/D126134
Files:
clang-tools-extra/clang-tidy/add_new_check.py
clang-tools-extra/d
LegalizeAdulthood added inline comments.
Comment at: clang-tools-extra/clang-tidy/add_new_check.py:352
+ stmt = code[stmt_start_pos+1:stmt_end_pos]
+ matches = re.search('registerCheck<([^>:]*)>\(\s*"([^"]*)"\s*\)', stmt)
+ if matches and matches[2] == full_check_n
LegalizeAdulthood marked 2 inline comments as done.
LegalizeAdulthood added a comment.
Another observation:
If some new pattern comes up and fixits aren't recognized for a check, it might
be better
to switch to a whitelist for checks with fixits rather than going crazier on
the file scraping.
LegalizeAdulthood marked 2 inline comments as done.
LegalizeAdulthood added inline comments.
Comment at: clang-tools-extra/clang-tidy/add_new_check.py:335-336
+module_file = get_module_filename(module_path, module_name)
+if not os.path.isfile(module_file):
+ return '
aaron.ballman added a comment.
Thanks for this! It generally LGTM (though my Python skills are not
particularly awesome, so take it with a grain of salt). Just a few questions at
this point.
Comment at: clang-tools-extra/clang-tidy/add_new_check.py:335-336
+module_file =
LegalizeAdulthood created this revision.
LegalizeAdulthood added reviewers: aaron.ballman, njames93, alexfh.
LegalizeAdulthood added a project: clang-tools-extra.
Herald added subscribers: carlosgalvezp, xazax.hun.
Herald added a project: All.
LegalizeAdulthood requested review of this revision.
W