From ac45771ea43551e1f66685908dc42c676bef8baf Mon Sep 17 00:00:00 2001
From: Even Rouault <[EMAIL REDACTED]>
Date: Sat, 10 Dec 2022 14:02:22 +0100
Subject: [PATCH] Exclude reformatting of tiffvers.h which breaks version
detection for FindTIFF.cmake
---
.pre-commit-config.yaml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 27aba544..dbad088d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -3,7 +3,11 @@ repos:
rev: 'v15.0.4'
hooks:
- id: clang-format
+ # tif_fax3sm.c is a generated file
+ # tiffvers.h as well, and its formatting is sensitive for
+ # FindTIFF.cmake to detect the version number
exclude: >
(?x)^(
- libtiff/tif_fax3sm.c
+ libtiff/tif_fax3sm.c|
+ libtiff/tiffvers.h
)