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

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Wed Jan 17 16:40:11 EST 2018


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

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
 



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


More information about the Mercurial-devel mailing list