-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
Exciting! Will take a look today! |
final sourceUrl = mapping.urls[columnEntry.sourceUrlId]; | ||
|
||
// Ignore coverage information for the SDK. | ||
if (sourceUrl.startsWith('org-dartlang-sdk:')) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How stable is this? Where is it defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It comes from the SDK. I don't believe there is a way to programatically consume this value. We have similar logic in package:dwds
.
final allCoverage = <Map<String, dynamic>>[]; | ||
coverageHitMaps.forEach((uri, hitMap) { | ||
allCoverage.add(toScriptCoverageJson(uri, hitMap)); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[optional]
final allCoverage = [
for(var hitMap in coverageHitMaps.entries)
toScriptCoverageJson(hitMap.key, hitMap.value),
];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SDK constraint is wide on this package so I don't believe we can use this feature yet.
range['count'] > 0, | ||
)); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[optional]
return [
for (Map<String, dynamic> functions in entry['functions'])
for (Map<String, dynamic> range in functions['ranges'])
_CoverageInfo(
range['startOffset'],
range['endOffset'],
range['count'] > 0,
),
];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above comment.
11: 1, | ||
13: 1, | ||
14: 1, | ||
15: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] Would this be shorter without a trailing comma?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,154 @@ | |||
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how this is done on the Dart team, but the general policy we use for Flutter is to use a single year for all files (in our case the earliest date we had in any of them, which was 2013). We used to use a policy that new files got the current year, old files preserved their headers, but that changed a few years back.
If current-year is still the right approach for Dart packages, then LGTM. Otherwise we should probably (in a separate PR), set these all consistently to 2013 in this repo, which is the earliest date I see in our headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most other packages I touch follow the current-year pattern.
|
||
@override | ||
int get hashCode => hash2(line, column); | ||
@override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add a blank line before the @override
.
Towards dart-lang/test#36 Add `parseChromeCoverage` method to be used by `package:test` and internal tools. This method returns a hit-map based Dart report suitable for consumption by `package:coverage` to produce LCOV reports.
Towards dart-lang/test#36
Add
parseChromeCoverage
method to be used bypackage:test
and internal tools. This method returns a hit-map based Dart report suitable for consumption bypackage:coverage
to produce LCOV reports.