]> git.lttng.org Git - lttng-tools.git/commit
misc: Allow users to override the location of clang-format
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 12 Dec 2024 19:16:22 +0000 (19:16 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 18 Dec 2024 15:50:26 +0000 (15:50 +0000)
commit7126b4cfd2ed781f7f2c737552f9f0d9266a09d2
tree712b2b00702de1edb43df7560378dad7ba146f9f
parentd60fe7c6eb8ae7d6026bac9d763238e3a50dd0aa
misc: Allow users to override the location of clang-format

Since the coding imposes a specific version of clang-format (16),
the pre-commit hook can fail for reasons out of the contributor's
control.

Local git config settings are used to allow the user to specify
the location of these tools.

  git config --local hooks.clangFormatPath /path/to/clang-format-16

The settings are retrieved by the script and used if they were
specified.

Note that we should probably do the same for `black` as they
change the formatting from version to version. Right now I
feel we imply "use the latest version", but we should probably
impose one and update it on a release-to-release basis.

Change-Id: Iabb3e3964dc137075474ae4a240f30e0ecf4ec0d
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
extras/pre-commit.py
This page took 0.029273 seconds and 4 git commands to generate.