Patchwork D1874: formatting: enforce clang-format on all .cc files as well as .c files

login
register
mail settings
Submitter phabricator
Date Jan. 17, 2018, 9:40 p.m.
Message ID <0e590ad839ef748a78719b48834c6d29@localhost.localdomain>
Download mbox | patch
Permalink /patch/26830/
State Not Applicable
Headers show

Comments

phabricator - Jan. 17, 2018, 9:40 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGcb55f93bb29c: formatting: enforce clang-format on all .cc files as well as .c files (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1874?vs=4855&id=4860

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

AFFECTED FILES
  Makefile
  tests/test-check-clang-format.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-check-clang-format.t b/tests/test-check-clang-format.t
--- a/tests/test-check-clang-format.t
+++ b/tests/test-check-clang-format.t
@@ -3,7 +3,7 @@ 
   $ . "$TESTDIR/helpers-testrepo.sh"
 
   $ cd "$TESTDIR"/..
-  $ for f in `testrepohg files 'set:(**.c or **.h) and not "listfile:contrib/clang-format-blacklist"'` ; do
+  $ for f in `testrepohg files 'set:(**.c or **.cc or **.h) and not "listfile:contrib/clang-format-blacklist"'` ; do
   >   clang-format --style file $f > $f.formatted
   >   cmp $f $f.formatted || diff -u $f $f.formatted
   >   rm $f.formatted
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -124,7 +124,7 @@ 
 
 format-c:
 	clang-format --style file -i \
-	  `hg files 'set:(**.c or **.h) and not "listfile:contrib/clang-format-blacklist"'`
+	  `hg files 'set:(**.c or **.cc or **.h) and not "listfile:contrib/clang-format-blacklist"'`
 
 update-pot: i18n/hg.pot