clang-format produced code that (choose all that apply):
- Riles my finely honed stylistic dander
- No sane human would ever choose
Here's the code before formatting:
n/a
Here's the code after formatting:
base::scoped_nsobject<NSMenuItem> item =
Item(IDS_APP_MENU_PRODUCT_NAME)
.tag(IDC_CHROME_MENU)
.submenu({
Item(IDS_ABOUT_MAC)
.string_format_1(IDS_PRODUCT_NAME)
.tag(IDC_ABOUT)
.target(app_controller)
.action(@selector(orderFrontStandardAboutPanel:)),
Item().is_separator(),
Item(IDS_PREFERENCES)
.tag(IDC_OPTIONS)
.target(app_controller)
.action(@selector(showPreferences:)),
Item().is_separator(),
Here's how it ought to look:
base::scoped_nsobject<NSMenuItem> item =
Item(IDS_APP_MENU_PRODUCT_NAME)
.tag(IDC_CHROME_MENU)
.submenu({
Item(IDS_ABOUT_MAC)
.string_format_1(IDS_PRODUCT_NAME)
.tag(IDC_ABOUT)
.target(app_controller)
.action(@selector(orderFrontStandardAboutPanel:)),
Item().is_separator(),
Item(IDS_PREFERENCES)
.tag(IDC_OPTIONS)
.target(app_controller)
.action(@selector(showPreferences:)),
Item().is_separator(),
Code review link for full files/context:
https://chromium-review.googlesource.com/c/chromium/src/+/1147157/6/chrome/browser/ui/cocoa/main_menu_builder.mm#33
It looks clang-format is mixing the continuation-line 4-space indent rule with keep-list-of-things-aligned-at-same-indent.
Comment 1 by benhenry@chromium.org
, Aug 3