Skip to content

Commit 315561c

Browse files
authored
[run-clang-tidy.py] Refactor, add progress indicator, add type hints (#89490)
[There is work](https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-python-version/67571) to make Python 3.8 the minimum Python version for LLVM. I edited this script because I wanted some indicator of progress while going through files. It now outputs `[XX/YYY]` with the number of processed and total files after each completion. The current version of this script is compatible downto Python 3.6 (this is PyYAML's minimum version). It would probably work with older Python 3 versions with an older PyYAML or when YAML is disabled. With the updates here, it is compatible downto Python 3.7. Python 3.7 was released June 2018. #89302 is also touching this file, I don't mind rebasing on top of that work if needed. ### Summary - Add type annotations. - Replace `threading` + `queue` with `asyncio`. - **Add indicator of processed files over total files**. This is what I set out to do initially. - Only print the filename after completion, not the entire Clang-Tidy invocation command. I find this neater but the behavior can easily be restored.
1 parent 511e93b commit 315561c

File tree

2 files changed

+185
-140
lines changed

2 files changed

+185
-140
lines changed

0 commit comments

Comments
 (0)