# HG changeset patch # User Augie Fackler # Date 2021-11-01 18:59:07 # Node ID e2836d08c88ca0d0f0c0f5af066e526769120306 # Parent 7a4d187479b637357c8097069119094f5e761491 # Parent 1ff06ceb070fd17ee7423bc6c68edb90c451587d merge: with stable diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -611,7 +611,14 @@ def has_pylint(): 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 + # 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. + return matchoutput( + 'clang-format --version', br'clang-format .*google3-trunk \([0-9a-f]+\)' + ) @check("jshint", "JSHint static code analysis tool")