What is the purpose of python wrappers for clang tools binaries?

Hi,

In both the clang and clang-tools-extra repositories, there are python wrappers
(e.g. clang-format.py, run-clang-tidy.py, etc.) for the various tools. What is the
advantage of using these scripts over running the executables directly?

Thanks,
Tom

Hi Tom,

In both the clang and clang-tools-extra repositories, there are python wrappers
(e.g. clang-format.py, run-clang-tidy.py, etc.) for the various tools. What is the
advantage of using these scripts over running the executables directly?

See the top comment in tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py:

Runs clang-tidy over all files in a compilation database.

It also integrates with clang-apply-replacements.

tools/clang/tools/clang-format/clang-format.py:

This file is a minimal clang-format vim-integration.

Regards,

Miklos