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

Issue 607243002: gn format: add call wrapping (Closed)

Created:
6 years, 2 months ago by scottmg
Modified:
6 years, 2 months ago
Reviewers:
brettw
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@gn-suffix-missing-newline
Project:
chromium
Visibility:
Public.

Description

gn format: add call wrapping For function call arguments: - if all arguments plus ')' fit at current point, insert - if all arguments fit at current, one per line - otherwise at minimum of current and margin+4, one per line, recurse into children. Similar for binary expressions so that "a + b" can wrap. Also, add basic output of AccessorNode + test. (not as fancy as clang-format, but there's not that many long function calls in .gn files.) R=brettw@chromium.org BUG=348474 Committed: https://crrev.com/8a4459122520cd7d59be4f3b03a2a7eb74344a71 Cr-Commit-Position: refs/heads/master@{#297765}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : wip on func call formatting #

Patch Set 4 : somewhat improved #

Patch Set 5 : . #

Patch Set 6 : . #

Patch Set 7 : make expression wrapping work a bit, test for accessors #

Total comments: 1

Patch Set 8 : 64 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+262 lines, -42 lines) Patch
M tools/gn/command_format.cc View 1 2 3 4 5 6 7 10 chunks +149 lines, -38 lines 0 comments Download
M tools/gn/command_format_unittest.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M tools/gn/format_test_data/017.golden View 1 2 3 4 5 6 1 chunk +3 lines, -4 lines 0 comments Download
A tools/gn/format_test_data/021.gn View 1 2 3 4 1 chunk +33 lines, -0 lines 0 comments Download
A tools/gn/format_test_data/021.golden View 1 2 3 4 5 1 chunk +62 lines, -0 lines 0 comments Download
A tools/gn/format_test_data/022.gn View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
A tools/gn/format_test_data/022.golden View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
scottmg
It doesn't diff very well, but it's not as big as it looks initially. OTOH, ...
6 years, 2 months ago (2014-10-01 21:46:17 UTC) #2
brettw
lgtm https://codereview.chromium.org/607243002/diff/140001/tools/gn/format_test_data/022.golden File tools/gn/format_test_data/022.golden (right): https://codereview.chromium.org/607243002/diff/140001/tools/gn/format_test_data/022.golden#newcode3 tools/gn/format_test_data/022.golden:3: x = a.b This is one case where ...
6 years, 2 months ago (2014-10-01 23:52:38 UTC) #3
scottmg
On 2014/10/01 23:52:38, brettw wrote: > lgtm > > https://codereview.chromium.org/607243002/diff/140001/tools/gn/format_test_data/022.golden > File tools/gn/format_test_data/022.golden (right): > ...
6 years, 2 months ago (2014-10-02 00:12:31 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/607243002/140001
6 years, 2 months ago (2014-10-02 00:13:36 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_swarming/builds/15068)
6 years, 2 months ago (2014-10-02 01:00:54 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/607243002/160001
6 years, 2 months ago (2014-10-02 01:27:05 UTC) #10
commit-bot: I haz the power
Committed patchset #8 (id:160001) as c38649ed037c5c88680e9294286d9f48b5146b69
6 years, 2 months ago (2014-10-02 02:06:16 UTC) #11
commit-bot: I haz the power
6 years, 2 months ago (2014-10-02 02:06:53 UTC) #12
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/8a4459122520cd7d59be4f3b03a2a7eb74344a71
Cr-Commit-Position: refs/heads/master@{#297765}

Powered by Google App Engine
This is Rietveld 408576698