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

Issue 1180443003: Don't allow inline block comments to eat pending newlines. (Closed)

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

Description

Don't allow inline block comments to eat pending newlines. Fix #178. R=pquitslund@google.com Committed: 6ed55b93f5b08f53046e8856ad0e7cee12fdca34

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add a test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -8 lines) Patch
M lib/src/chunk.dart View 2 chunks +4 lines, -1 line 0 comments Download
M lib/src/chunk_builder.dart View 6 chunks +29 lines, -6 lines 0 comments Download
M lib/src/whitespace.dart View 2 chunks +20 lines, -0 lines 0 comments Download
M test/comments/top_level.unit View 1 1 chunk +20 lines, -1 line 0 comments Download
A test/regression/178.unit View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Bob Nystrom
5 years, 6 months ago (2015-06-10 16:39:32 UTC) #2
pquitslund
lgtm https://chromiumcodereview.appspot.com/1180443003/diff/1/test/regression/178.unit File test/regression/178.unit (right): https://chromiumcodereview.appspot.com/1180443003/diff/1/test/regression/178.unit#newcode9 test/regression/178.unit:9: /* soup */ Out of curiosity, how does ...
5 years, 6 months ago (2015-06-10 17:01:50 UTC) #3
Bob Nystrom
Committed patchset #2 (id:20001) manually as 6ed55b93f5b08f53046e8856ad0e7cee12fdca34 (presubmit successful).
5 years, 6 months ago (2015-06-10 17:14:45 UTC) #4
Bob Nystrom
5 years, 6 months ago (2015-06-10 17:15:16 UTC) #5
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/1180443003/diff/1/test/regression/178....
File test/regression/178.unit (right):

https://chromiumcodereview.appspot.com/1180443003/diff/1/test/regression/178....
test/regression/178.unit:9: /* soup */
On 2015/06/10 17:01:50, pquitslund wrote:
> Out of curiosity, how does this format?
> 
> import 'dart:async'; /* soup */
> import 'dart:io';
> 
> I would *hope* it leaves the comment well enough alone (and not shove it to a
> newline)?

Yeah, it leaves that alone. The check for this corner case in chunk_builder.dart
is quite precise. There have to be no newlines anywhere between the previous
token and the token after the comment(s).

Added a test.

Powered by Google App Engine
This is Rietveld 408576698