Page MenuHomePhabricator

clang-tidy: discover binaries in build dir
Needs ReviewPublic

Authored by keith on Apr 16 2021, 6:54 PM.

Details

Reviewers
kastiglione
Summary

This changes the clang-tidy script to discover binaries you've built
locally without having to pass them. This behavior currently depends on
python3, which based on a recent mailing list conversation, sounds like
an ok change.

Diff Detail

Event Timeline

keith requested review of this revision.Apr 16 2021, 6:54 PM
keith created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 16 2021, 6:54 PM
keith updated this revision to Diff 338267.Apr 16 2021, 7:02 PM

Remove py2 condition

I like it, though I'm not sure about the python3 requirement.

clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
140

s/is not valid/could not be found/ ?

also I wonder the message needs both arg and name, wouldn't it be likely that arg contains name?

keith updated this revision to Diff 338573.Apr 19 2021, 11:21 AM
keith marked an inline comment as done.

Update failure message

As far as the python3 conversation it appears based on this email thread https://lists.llvm.org/pipermail/llvm-dev/2021-January/148229.html and this documentation https://llvm.org/docs/GettingStarted.html#software that python3.6 is now required, so I think this is ok. There might be things relying on this, in which case I assume asking them to upgrade is an acceptable answer at this point.

clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
140

Updated the error message, the original reason I went with something this vague is if the binary exists but isn't executable it will also hit this error, now I've added that to the message as well. I agree the name inclusion was an overoptimization

I guess wait until the dust on https://reviews.llvm.org/D101037 settles?