carlosgalvezp accepted this revision. carlosgalvezp added a comment. This revision is now accepted and ready to land.
LGTM, I have a suggestion for further improvement. ================ Comment at: clang-tools-extra/clang-tidy/add_new_check.py:324-328 doc_files = [] - for subdir in list(filter(lambda s: not s.endswith('.rst') and not s.endswith('.py'), - os.listdir(docs_dir))): + for subdir in list(filter(os.path.isdir, os.listdir(docs_dir))): for file in filter(lambda s: s.endswith('.rst'), os.listdir(os.path.join(docs_dir, subdir))): doc_files.append([subdir, file]) doc_files.sort() ---------------- It feels this whole code could be made much simpler, readable and safer by just doing: doc_files = glob.glob(os.path.join(docs_dir, "**", "*.rst"), recursive=True) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140772/new/ https://reviews.llvm.org/D140772 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits