Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Issue 2603443002: Clang format JS: Disallow single line functions, conditionals, loops, and switch statements (Closed)

Created:
4 years ago by Dan Beam
Modified:
3 years, 12 months ago
Reviewers:
dschuyler, stevenjb
CC:
chromium-reviews, dcheng, michaelpg+watch-elements_chromium.org, stevenjb+watch-md-settings_chromium.org, dbeam+watch-elements_chromium.org, oshima+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clang format JS: Disallow single line functions, conditionals, loops, and switch statements This is to more easily set breakpoints. R=dschuyler@chromium.org BUG=567770 NOPRESUBMIT=true # ugh, those __getters__ CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/55cf33bce9bcb48b733ff335b332aa5b985fc257 Cr-Commit-Position: refs/heads/master@{#440558}

Patch Set 1 #

Patch Set 2 : more options #

Total comments: 3

Patch Set 3 : . #

Patch Set 4 : update c/b/r/ as well #

Unified diffs Side-by-side diffs Delta from patch set Stats (+641 lines, -220 lines) Patch
M chrome/browser/resources/.clang-format View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/webui/resources/.clang-format View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/cr_elements/cr_lazy_render/cr_lazy_render.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.js View 2 chunks +9 lines, -2 lines 0 comments Download
M ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.js View 1 chunk +9 lines, -3 lines 0 comments Download
M ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js View 4 chunks +15 lines, -5 lines 0 comments Download
M ui/webui/resources/cr_elements/network/cr_network_list.js View 2 chunks +15 lines, -3 lines 0 comments Download
M ui/webui/resources/cr_elements/network/cr_network_list_item.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/cr_elements/network/cr_network_select.js View 2 chunks +9 lines, -2 lines 0 comments Download
M ui/webui/resources/js/action_link.js View 3 chunks +9 lines, -4 lines 0 comments Download
M ui/webui/resources/js/assert.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/js/chromeos/ui_account_tweaks.js View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/js/cr.js View 3 chunks +33 lines, -11 lines 0 comments Download
M ui/webui/resources/js/cr/event_target.js View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/js/cr/link_controller.js View 3 chunks +9 lines, -4 lines 0 comments Download
M ui/webui/resources/js/cr/ui/array_data_model.js View 4 chunks +12 lines, -4 lines 0 comments Download
M ui/webui/resources/js/cr/ui/autocomplete_list.js View 2 chunks +6 lines, -2 lines 0 comments Download
M ui/webui/resources/js/cr/ui/bubble.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/js/cr/ui/card_slider.js View 2 chunks +18 lines, -6 lines 0 comments Download
M ui/webui/resources/js/cr/ui/command.js View 2 chunks +6 lines, -2 lines 0 comments Download
M ui/webui/resources/js/cr/ui/context_menu_handler.js View 3 chunks +10 lines, -4 lines 0 comments Download
M ui/webui/resources/js/cr/ui/controlled_indicator.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/js/cr/ui/dialogs.js View 4 chunks +13 lines, -5 lines 0 comments Download
M ui/webui/resources/js/cr/ui/drag_wrapper.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/js/cr/ui/expandable_bubble.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/js/cr/ui/focus_grid.js View 3 chunks +9 lines, -3 lines 0 comments Download
M ui/webui/resources/js/cr/ui/focus_manager.js View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/js/cr/ui/focus_outline_manager.js View 2 chunks +15 lines, -7 lines 0 comments Download
M ui/webui/resources/js/cr/ui/focus_row.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/js/cr/ui/grid.js View 3 chunks +12 lines, -4 lines 0 comments Download
M ui/webui/resources/js/cr/ui/list.js View 9 chunks +30 lines, -10 lines 0 comments Download
M ui/webui/resources/js/cr/ui/list_item.js View 2 chunks +9 lines, -4 lines 0 comments Download
M ui/webui/resources/js/cr/ui/list_selection_controller.js View 5 chunks +21 lines, -7 lines 0 comments Download
M ui/webui/resources/js/cr/ui/list_selection_model.js View 6 chunks +22 lines, -9 lines 0 comments Download
M ui/webui/resources/js/cr/ui/list_single_selection_model.js View 8 chunks +31 lines, -10 lines 0 comments Download
M ui/webui/resources/js/cr/ui/menu.js View 5 chunks +15 lines, -5 lines 0 comments Download
M ui/webui/resources/js/cr/ui/menu_button.js View 2 chunks +6 lines, -2 lines 0 comments Download
M ui/webui/resources/js/cr/ui/menu_item.js View 2 chunks +18 lines, -6 lines 0 comments Download
M ui/webui/resources/js/cr/ui/overlay.js View 2 chunks +6 lines, -3 lines 0 comments Download
M ui/webui/resources/js/cr/ui/page_manager/page.js View 3 chunks +12 lines, -4 lines 0 comments Download
M ui/webui/resources/js/cr/ui/page_manager/page_manager.js View 3 chunks +12 lines, -4 lines 0 comments Download
M ui/webui/resources/js/cr/ui/repeating_button.js View 2 chunks +15 lines, -5 lines 0 comments Download
M ui/webui/resources/js/cr/ui/splitter.js View 3 chunks +9 lines, -3 lines 0 comments Download
M ui/webui/resources/js/cr/ui/table.js View 7 chunks +36 lines, -12 lines 0 comments Download
M ui/webui/resources/js/cr/ui/table/table_column.js View 1 chunk +6 lines, -2 lines 0 comments Download
M ui/webui/resources/js/cr/ui/table/table_column_model.js View 4 chunks +18 lines, -6 lines 0 comments Download
M ui/webui/resources/js/cr/ui/table/table_header.js View 3 chunks +9 lines, -3 lines 0 comments Download
M ui/webui/resources/js/cr/ui/tabs.js View 1 chunk +3 lines, -2 lines 0 comments Download
M ui/webui/resources/js/cr/ui/touch_handler.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/js/cr/ui/tree.js View 13 chunks +55 lines, -19 lines 0 comments Download
M ui/webui/resources/js/i18n_behavior.js View 1 chunk +3 lines, -1 line 0 comments Download
M ui/webui/resources/js/load_time_data.js View 2 chunks +9 lines, -4 lines 0 comments Download
M ui/webui/resources/js/parse_html_subset.js View 1 chunk +3 lines, -2 lines 0 comments Download
M ui/webui/resources/js/promise_resolver.js View 1 chunk +18 lines, -6 lines 0 comments Download
M ui/webui/resources/js/util.js View 2 chunks +6 lines, -2 lines 0 comments Download
M ui/webui/resources/js/web_ui_listener_behavior.js View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 33 (25 generated)
Dan Beam
4 years ago (2016-12-22 19:50:13 UTC) #2
stevenjb
lgtm
4 years ago (2016-12-22 20:44:09 UTC) #17
dschuyler
https://codereview.chromium.org/2603443002/diff/20001/ui/webui/resources/js/chromeos/ui_account_tweaks.js File ui/webui/resources/js/chromeos/ui_account_tweaks.js (right): https://codereview.chromium.org/2603443002/diff/20001/ui/webui/resources/js/chromeos/ui_account_tweaks.js#newcode29 ui/webui/resources/js/chromeos/ui_account_tweaks.js:29: } Maybe add "Empty" (SFS_Empty) to AllowShortFunctionsOnASingleLine? https://codereview.chromium.org/2603443002/diff/20001/ui/webui/resources/js/cr/ui/list_selection_model.js File ...
3 years, 12 months ago (2016-12-22 22:34:27 UTC) #20
Dan Beam
https://codereview.chromium.org/2603443002/diff/20001/ui/webui/resources/js/chromeos/ui_account_tweaks.js File ui/webui/resources/js/chromeos/ui_account_tweaks.js (right): https://codereview.chromium.org/2603443002/diff/20001/ui/webui/resources/js/chromeos/ui_account_tweaks.js#newcode29 ui/webui/resources/js/chromeos/ui_account_tweaks.js:29: } On 2016/12/22 22:34:27, dschuyler wrote: > Maybe add ...
3 years, 12 months ago (2016-12-22 22:37:30 UTC) #21
dschuyler
lgtm
3 years, 12 months ago (2016-12-22 23:33:38 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2603443002/60001
3 years, 12 months ago (2016-12-22 23:55:29 UTC) #28
commit-bot: I haz the power
Committed patchset #4 (id:60001)
3 years, 12 months ago (2016-12-23 00:34:35 UTC) #31
commit-bot: I haz the power
3 years, 12 months ago (2016-12-23 00:36:43 UTC) #33
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/55cf33bce9bcb48b733ff335b332aa5b985fc257
Cr-Commit-Position: refs/heads/master@{#440558}

Powered by Google App Engine
This is Rietveld 408576698