changeset 35669:39499bc31fcd

formatting: enforce clang-format on all .cc files as well as .c files As part of my upcoming fuzzer patch we're going to grow some .cc files. They're not part of the release build (they're only used for fuzzing, which requires clang 6 which in turn implies a working C++ compiler), so I'm not terribly worried about growing some C++ files. Differential Revision: https://phab.mercurial-scm.org/D1874
author Augie Fackler <augie@google.com>
date Wed, 17 Jan 2018 15:56:12 -0500
parents 67cead0eb671
children 2b9e2415f5b5
files Makefile tests/test-check-clang-format.t
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Jan 17 15:28:38 2018 -0500
+++ b/Makefile	Wed Jan 17 15:56:12 2018 -0500
@@ -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
 
--- a/tests/test-check-clang-format.t	Wed Jan 17 15:28:38 2018 -0500
+++ b/tests/test-check-clang-format.t	Wed Jan 17 15:56:12 2018 -0500
@@ -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