Patchwork D1116: Makefile: add target to apply clang-format in-place

login
register
mail settings
Submitter phabricator
Date Oct. 17, 2017, 1:46 a.m.
Message ID <36653b985cf675c6aa252bd7202aa329@localhost.localdomain>
Download mbox | patch
Permalink /patch/25046/
State Not Applicable
Headers show

Comments

phabricator - Oct. 17, 2017, 1:46 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGaf487f227278: Makefile: add target to apply clang-format in-place (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1116?vs=2825&id=2859

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

AFFECTED FILES
  Makefile

CHANGE DETAILS




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

Patch

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -122,6 +122,10 @@ 
 check-code:
 	hg manifest | xargs python contrib/check-code.py
 
+format-c:
+	clang-format --style file -i \
+	  `hg files 'set:(**.c or **.h) and not "listfile:contrib/clang-format-blacklist"'`
+
 update-pot: i18n/hg.pot
 
 i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext