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

Issue 1475873002: More sophisticated handling of parameter metadata. (Closed)

Created:
5 years ago by Bob Nystrom
Modified:
5 years ago
Reviewers:
nweiz
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/dart_style.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

More sophisticated handling of parameter metadata. This tries to produce better output in parameter lists with lots of or very long metadata annotations. The rules are: - If any metadata annotation splits, all of the ones in the parameter list do. - If so, the parameters are indented to distinguish them in the list. Fix #387. Fix #444. R=nweiz@google.com Committed: https://github.com/dart-lang/dart_style/commit/7da513548ba418af46eac5be1bc73afaa96895db

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -6 lines) Patch
M CHANGELOG.md View 1 chunk +2 lines, -0 lines 0 comments Download
A lib/src/rule/metadata.dart View 1 chunk +66 lines, -0 lines 2 comments Download
M lib/src/source_visitor.dart View 9 chunks +44 lines, -2 lines 2 comments Download
M test/regression/0200/0247.unit View 1 chunk +3 lines, -3 lines 0 comments Download
A test/regression/0300/0387.unit View 1 chunk +19 lines, -0 lines 0 comments Download
A test/regression/0400/0444.unit View 1 chunk +26 lines, -0 lines 0 comments Download
M test/whitespace/metadata.unit View 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 6 (2 generated)
Bob Nystrom
5 years ago (2015-11-25 01:20:06 UTC) #2
nweiz
lgtm https://codereview.chromium.org/1475873002/diff/1/lib/src/rule/metadata.dart File lib/src/rule/metadata.dart (right): https://codereview.chromium.org/1475873002/diff/1/lib/src/rule/metadata.dart#newcode42 lib/src/rule/metadata.dart:42: if (value == 0) return null; Consider making ...
5 years ago (2015-11-30 19:17:01 UTC) #3
Bob Nystrom
Committed patchset #1 (id:1) manually as 7da513548ba418af46eac5be1bc73afaa96895db (presubmit successful).
5 years ago (2015-11-30 21:35:40 UTC) #5
Bob Nystrom
5 years ago (2015-11-30 21:36:14 UTC) #6
Message was sent while issue was closed.
Thanks!

https://codereview.chromium.org/1475873002/diff/1/lib/src/rule/metadata.dart
File lib/src/rule/metadata.dart (right):

https://codereview.chromium.org/1475873002/diff/1/lib/src/rule/metadata.dart#...
lib/src/rule/metadata.dart:42: if (value == 0) return null;
On 2015/11/30 19:17:01, nweiz wrote:
> Consider making a getter for "value == 0", like isNotSplit or something like
> that.

Done.

https://codereview.chromium.org/1475873002/diff/1/lib/src/source_visitor.dart
File lib/src/source_visitor.dart (right):

https://codereview.chromium.org/1475873002/diff/1/lib/src/source_visitor.dart...
lib/src/source_visitor.dart:1646: // as well?
On 2015/11/30 19:17:01, nweiz wrote:
> The doc comment for MetadataRule implies that it does. If it doesn't yet, that
> comment should be updated.

Done.

Powered by Google App Engine
This is Rietveld 408576698