diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -613,7 +613,13 @@ def has_clang_format(): m = matchoutput('clang-format --version', br'clang-format version (\d+)') # style changed somewhere between 10.x and 11.x - return m and int(m.group(1)) >= 11 + if m: + return int(m.group(1)) >= 11 + # Allow users to have a trunk version installed; this assumes that they keep + # it up to date, unfortunately checking for that is difficult/impossible? + return matchoutput( + 'clang-format --version', br'clang-format .*trunk \([0-9a-f]+\)' + ) @check("jshint", "JSHint static code analysis tool")