|
Ran
|
Jobs
1
|
Files
10
|
Run time
1min
|
Badge
README BADGES
|
push
github
[coverage] Fix BazelResolver file URI matching and path handling (#2876) Fix `BazelResolver.resolve` on `file:` URIs when `workspacePath` is empty or slash-padded, percent-encoded segments are present, or URIs traverse outside the workspace. In [`resolver.dart`](https://github.com/dart-lang/tools/blob/ddda9d89d/pkgs/coverage/lib/src/resolver.dart#L217-L226), per-call `'.runfiles/$workspacePath'.replaceAll(RegExp(r'/*$'), '/')` doubled trailing slashes on empty or slash-suffixed workspaces, while slicing raw `uri.path` left `%20` segments un-decoded for `Loader` file reads, returned `''` on directory-only `.runfiles` URIs, and allowed `..` escapes. Pre-normalizing `_workspace` once in the constructor and matching non-empty `uri.pathSegments` with `p.posix.isWithin` and `p.posix.relative` fixes all four cases without `RegExp` or substring index math (`p.posix` preserves 2-slash `file://x/y/...` handling on Windows and avoids `p.url` treating colon segments as schemes).
17 of 17 new or added lines in 1 file covered. (100.0%)
763 of 812 relevant lines covered (93.97%)
4.09 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 44007185987.1 | 10 |
93.97
|
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|