Bug 1317305 - Update clang format rules r=mystor draft
authorSylvestre Ledru <sledru@mozilla.com>
Mon, 14 Nov 2016 18:01:36 +0100
changeset 438522 7aab2d8bb62f2fb24e705743718faa517737beac
parent 438469 feddafb5cb546b15b160260da8632beb6b89bd71
child 536933 2c159ea6f68d6830e501fe1b1c573d7b052fca72
push id35741
push usersledru@mozilla.com
push dateMon, 14 Nov 2016 17:04:12 +0000
reviewersmystor
bugs1317305
milestone53.0a1
Bug 1317305 - Update clang format rules r=mystor MozReview-Commit-ID: IrFlfS6QrM4
.clang-format
--- a/.clang-format
+++ b/.clang-format
@@ -1,4 +1,30 @@
 BasedOnStyle: Mozilla
 
 # Ignore all comments because they aren't reflowed properly.
 CommentPragmas: "^"
+
+# Force pointers to the type for C++.
+DerivePointerAlignment: false
+PointerAlignment: Left
+
+# Prevent the loss of indentation with these macros
+MacroBlockBegin: "^\
+NS_INTERFACE_MAP_BEGIN|\
+NS_INTERFACE_TABLE_HEAD|\
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION|\
+NS_IMPL_CYCLE_COLLECTION_.*_BEGIN|\
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED|\
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED|\
+NS_INTERFACE_TABLE_BEGIN|\
+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED|\
+NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED$"
+MacroBlockEnd: "^\
+NS_INTERFACE_MAP_END|\
+NS_IMPL_CYCLE_COLLECTION_.*_END|\
+NS_INTERFACE_TABLE_END|\
+NS_INTERFACE_MAP_END_INHERITING|\
+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END_INHERITED|\
+NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED$"
+
+SortIncludes: false
+