changeset 52062:73cf8b56c2f5

clang-format: do not accept version above 19.x This gives me different formatting on latest version available in Debian. So disabling for now.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 22 Oct 2024 15:50:47 +0200
parents 43e15277498e
children 43602c675b4f
files tests/hghave.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave.py	Wed Oct 16 17:21:03 2024 +0200
+++ b/tests/hghave.py	Tue Oct 22 15:50:47 2024 +0200
@@ -624,12 +624,13 @@
     return matchoutput("pylint --help", br"[Uu]sage:[ ]+pylint", True)
 
 
-@check("clang-format", "clang-format C code formatter (>= 11)")
+@check("clang-format", "clang-format C code formatter (11 <= … < 19)")
 def has_clang_format():
     m = matchoutput('clang-format --version', br'clang-format version (\d+)')
-    # style changed somewhere between 10.x and 11.x
+    # style changed somewhere between 10.x and 11.x and after 19.
     if m:
-        return int(m.group(1)) >= 11
+        major_version = int(m.group(1))
+        return 11 <= major_version < 19
     # Assist Googler contributors, they have a centrally-maintained version of
     # clang-format that is generally very fresh, but unlike most builds (both
     # official and unofficial), it does *not* include a version number.