[PATCH] D158929: [clang-tidy] Add exit code support to clang-tidy-diff.py
Flash Sheridan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 28 09:12:18 PDT 2023
FlashSheridan added a comment.
A couple of low-priority suggestions from Pylint 3 at 326 and 95:
================
Comment at: clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py:95
-def start_workers(max_tasks, tidy_caller, task_queue, lock, timeout):
+def start_workers(max_tasks, tidy_caller, task_queue, lock, timeout, failed_files):
for _ in range(max_tasks):
----------------
Pylint 3 says > “[R0913(too-many-arguments), start_workers] Too many arguments (6/5),”
I think you just pushed start_workers() over the edge; personally, I don’t think a rewrite to reduce the number of arguments would improve clarity.
================
Comment at: clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py:326
+ return_code = 0
+ if len(failed_files):
+ return_code = 1
----------------
Pylint 3 says: > [C1802(use-implicit-booleaness-not-len), main] Do not use len(SEQUENCE) without comparison to determine if a sequence is empty
(I have no strong feelings.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158929/new/
https://reviews.llvm.org/D158929
More information about the cfe-commits
mailing list