Bug 1508128 - Update our coding style config files r=Ehsan
authorSylvestre Ledru <sledru@mozilla.com>
Mon, 19 Nov 2018 15:55:00 +0000
changeset 1764150 845fe0e51d436da422c6e64ca7627f57d9dec0ae
parent 1764149 099dc2ef0ec3df3cd5191507fc9c555d7a2dd61a
child 1764151 55384416e4fe28e7adaac150e184665d041c524b
push id316318
push userkgupta@mozilla.com
push dateMon, 19 Nov 2018 18:31:40 +0000
treeherdertry@31b16c228488 [default view] [failures only]
reviewersEhsan
bugs1508128
milestone65.0a1
Bug 1508128 - Update our coding style config files r=Ehsan Differential Revision: https://phabricator.services.mozilla.com/D12221
.clang-format
js/src/.clang-format
--- a/.clang-format
+++ b/.clang-format
@@ -1,9 +1,9 @@
-BasedOnStyle: Mozilla
+BasedOnStyle: Google
 
 # 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|\
@@ -15,17 +15,8 @@ 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
 
-
-BreakBeforeBraces: Custom
-BraceWrapping:
-  AfterEnum: true
-  AfterStruct: true
-  AfterFunction: true
-  AfterClass: true
-  SplitEmptyFunction: true
-
--- a/js/src/.clang-format
+++ b/js/src/.clang-format
@@ -1,12 +1,9 @@
-# Clang-format style for SpiderMonkey code which is different than the standard Mozilla style.
-BasedOnStyle: Mozilla
-ColumnLimit: 99
-IndentWidth: 4
+BasedOnStyle: Google
 
 # Prevent the loss of indentation with these macros
 MacroBlockBegin: "^JS_BEGIN_MACRO$"
 MacroBlockEnd: "^JS_END_MACRO$"
 
 # Ignore all comments because they aren't reflowed properly.
 # We require 80-col comments and 99-col code.
 CommentPragmas: "^"