Patchwork D1068: hghave: add a check for clang-format

login
register
mail settings
Submitter phabricator
Date Oct. 14, 2017, 7:04 a.m.
Message ID <differential-rev-PHID-DREV-q2c4uv2ynftrmfrb6faa-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/24883/
State Superseded
Headers show

Comments

phabricator - Oct. 14, 2017, 7:04 a.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1068

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -439,6 +439,11 @@ 
                        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: