jyasskin@chromium.org | 452ed0ea | 2013-11-01 01:53:40 | [diff] [blame] | 1 | # Defines the Chromium style for automatic reformatting. |
| 2 | # http://clang.llvm.org/docs/ClangFormatStyleOptions.html |
| 3 | BasedOnStyle: Chromium |
thakis | 1c79f864 | 2014-10-31 23:00:18 | [diff] [blame] | 4 | # This defaults to 'Auto'. Explicitly set it for a while, so that |
| 5 | # 'vector<vector<int> >' in existing files gets formatted to |
| 6 | # 'vector<vector<int>>'. ('Auto' means that clang-format will only use |
| 7 | # 'int>>' if the file already contains at least one such instance.) |
scottmg | 57e3f0a | 2014-09-25 06:32:45 | [diff] [blame] | 8 | Standard: Cpp11 |
thakis | 6b08b5d | 2017-02-02 23:31:44 | [diff] [blame] | 9 | |
Peter Boström | 9f9b576d | 2022-12-13 19:02:33 | [diff] [blame^] | 10 | # TODO(crbug.com/1392808): Remove when InsertBraces has been upstreamed into |
| 11 | # the Chromium style (is implied by BasedOnStyle: Chromium). |
| 12 | InsertBraces: true |
| 13 | |
Daniel Cheng | 9ce8be4 | 2015-07-16 21:44:58 | [diff] [blame] | 14 | # Make sure code like: |
| 15 | # IPC_BEGIN_MESSAGE_MAP() |
| 16 | # IPC_MESSAGE_HANDLER(WidgetHostViewHost_Update, OnUpdate) |
| 17 | # IPC_END_MESSAGE_MAP() |
| 18 | # gets correctly indented. |
| 19 | MacroBlockBegin: "^\ |
| 20 | BEGIN_MSG_MAP|\ |
| 21 | BEGIN_MSG_MAP_EX|\ |
| 22 | BEGIN_SAFE_MSG_MAP_EX|\ |
| 23 | CR_BEGIN_MSG_MAP_EX|\ |
| 24 | IPC_BEGIN_MESSAGE_MAP|\ |
| 25 | IPC_BEGIN_MESSAGE_MAP_WITH_PARAM|\ |
dcheng | 0941e7d8 | 2015-07-17 03:51:45 | [diff] [blame] | 26 | IPC_PROTOBUF_MESSAGE_TRAITS_BEGIN|\ |
Daniel Cheng | 9ce8be4 | 2015-07-16 21:44:58 | [diff] [blame] | 27 | IPC_STRUCT_BEGIN|\ |
| 28 | IPC_STRUCT_BEGIN_WITH_PARENT|\ |
dcheng | 0941e7d8 | 2015-07-17 03:51:45 | [diff] [blame] | 29 | IPC_STRUCT_TRAITS_BEGIN|\ |
| 30 | POLPARAMS_BEGIN|\ |
| 31 | PPAPI_BEGIN_MESSAGE_MAP$" |
Daniel Cheng | 9ce8be4 | 2015-07-16 21:44:58 | [diff] [blame] | 32 | MacroBlockEnd: "^\ |
| 33 | CR_END_MSG_MAP|\ |
| 34 | END_MSG_MAP|\ |
| 35 | IPC_END_MESSAGE_MAP|\ |
dcheng | 0941e7d8 | 2015-07-17 03:51:45 | [diff] [blame] | 36 | IPC_PROTOBUF_MESSAGE_TRAITS_END|\ |
Daniel Cheng | 9ce8be4 | 2015-07-16 21:44:58 | [diff] [blame] | 37 | IPC_STRUCT_END|\ |
dcheng | 0941e7d8 | 2015-07-17 03:51:45 | [diff] [blame] | 38 | IPC_STRUCT_TRAITS_END|\ |
| 39 | POLPARAMS_END|\ |
| 40 | PPAPI_END_MESSAGE_MAP$" |
Yun Liu | f40227d9 | 2019-04-04 17:37:46 | [diff] [blame] | 41 | |
| 42 | # TODO: Remove this once clang-format r357700 is rolled in. |
| 43 | JavaImportGroups: ['android', 'androidx', 'com', 'dalvik', 'junit', 'org', 'com.google.android.apps.chrome', 'org.chromium', 'java', 'javax'] |