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

Issue 11609005: Fix analyzer errors/warnings for Pub. (Closed)

Created:
8 years ago by nweiz
Modified:
8 years ago
Reviewers:
Bob Nystrom
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix analyzer errors/warnings for Pub. Committed: https://code.google.com/p/dart/source/detail?r=16299

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -13 lines) Patch
M utils/pub/http.dart View 1 chunk +1 line, -1 line 2 comments Download
M utils/pub/path.dart View 3 chunks +5 lines, -5 lines 2 comments Download
M utils/pub/source.dart View 1 chunk +4 lines, -2 lines 0 comments Download
M utils/pub/yaml/composer.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M utils/pub/yaml/constructor.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M utils/pub/yaml/model.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M utils/pub/yaml/parser.dart View 2 chunks +5 lines, -3 lines 0 comments Download
M utils/pub/yaml/visitor.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M utils/pub/yaml/yaml_map.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M utils/tests/pub/test_pub.dart View 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
nweiz
8 years ago (2012-12-18 19:25:15 UTC) #1
Bob Nystrom
I think I'd rather make separatorPattern a RegExp for now until the bug to move ...
8 years ago (2012-12-18 19:40:35 UTC) #2
nweiz
8 years ago (2012-12-19 01:10:21 UTC) #3
Message was sent while issue was closed.
https://codereview.chromium.org/11609005/diff/1/utils/pub/http.dart
File utils/pub/http.dart (right):

https://codereview.chromium.org/11609005/diff/1/utils/pub/http.dart#newcode6
utils/pub/http.dart:6: library pub_http;
On 2012/12/18 19:40:35, Bob Nystrom wrote:
> Do dotted identifiers work here yet? If not, add a TODO.

The analyzer likes it and the tests run, so let's give it a shot.

https://codereview.chromium.org/11609005/diff/1/utils/pub/path.dart
File utils/pub/path.dart (right):

https://codereview.chromium.org/11609005/diff/1/utils/pub/path.dart#newcode297
utils/pub/path.dart:297: if (part.length > 0 &&
part[0].contains(style.separatorPattern)) {
On 2012/12/18 19:40:35, Bob Nystrom wrote:
> A simpler fix here is to just make separatorPattern a RegExp instead of a
> Pattern.

I think using str.contains(pattern) is about as clean as pattern.hasMatch(str),
so I'd like to keep the separator as a pattern. I'll change _rootPattern,
though, since faking firstMatch is pretty ugly.

Powered by Google App Engine
This is Rietveld 408576698