[all-commits] [llvm/llvm-project] 6c7871: [clang-tidy] Install run-clang-tidy.py in bin/ as ...

Florian Schmaus via All-commits all-commits at lists.llvm.org
Tue Feb 23 04:38:48 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c78711f106fe01cd8c8c85a5c42953035453135
      https://github.com/llvm/llvm-project/commit/6c78711f106fe01cd8c8c85a5c42953035453135
  Author: Florian Schmaus <flo at geekplace.eu>
  Date:   2021-02-23 (Tue, 23 Feb 2021)

  Changed paths:
    M clang-tools-extra/clang-tidy/tool/CMakeLists.txt
    M clang-tools-extra/docs/ReleaseNotes.rst

  Log Message:
  -----------
  [clang-tidy] Install run-clang-tidy.py in bin/ as run-clang-tidy

The run-clang-tidy.py helper script is supposed to be used by the
user, hence it should be placed in the user's PATH. Some
distributions, like Gentoo [1], won't have it in PATH unless it is
installed in bin/.

Furthermore, installed scripts in PATH usually do not carry a filename
extension, since there is no need to know that this is a Python
script. For example Debian and Ubuntu already install this script as
'run-clang-tidy' [2] and hence build systems like Meson also look for
this name first [3]. Hence we install run-clang-tidy.py as
run-clang-tidy, as suggested by Sylvestre Ledru [4].

1: https://bugs.gentoo.org/753380
2: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/blob/60aefb14171ab5c3867a0081844b507fc9f6e015/debian/clang-tidy-X.Y.links.in#L2
3: https://github.com/mesonbuild/meson/blob/b6dc4d5e5c6e838de0b52e62d982ba2547eb366d/mesonbuild/scripts/clangtidy.py#L44
4: https://reviews.llvm.org/D90972#2380640

Reviewed By: sylvestre.ledru, JonasToth

Differential Revision: https://reviews.llvm.org/D90972




More information about the All-commits mailing list