[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Thu May 23 13:28:01 PDT 2024


PiotrZSL wrote:

@nicovank  Overall looks fine from functionality point of view.

Problem A)
Getting bunch of
```
task: <Task pending name='Task-4805' coro=<run_with_semaphore() done, defined at run-clang-tidy.py:211> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[as_completed.<locals>._on_completion() at /usr/lib/python3.12/asyncio/tasks.py:618]>
Task was destroyed but it is pending!
```
When CTR+C a script. More graceful shutdown would be welcome.

Problem B)
Previously script printed clang-tidy command line, now just progress + filename, for me it's fine but some users could find this as an degradation, as previously you could simply copy command line output and just run it manually.

My advice:
- By default print like in original script (command line), but add --progress switch that will change it to current behavior.
- Add release notes entry about updates in script that impact end user.


https://github.com/llvm/llvm-project/pull/89490


More information about the cfe-commits mailing list