# HG changeset patch # User Augie Fackler # Date 2015-09-14 18:16:31 # Node ID 15b561fffde541a4ef3f6dcb0570efe45615cd35 # Parent e178fcaa3933be679293dbca926c56f486c79d85 hghave: add a check for clang-format Differential Revision: https://phab.mercurial-scm.org/D1068 diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -439,6 +439,11 @@ def has_pylint(): br"Usage: pylint", True) +@check("clang-format", "clang-format C code formatter") +def has_clang_format(): + return matchoutput("clang-format --help", + r"^OVERVIEW: A tool to format C/C\+\+[^ ]+ code.") + @check("pygments", "Pygments source highlighting library") def has_pygments(): try: