Documentation
¶
Overview ¶
Package pathutil holds the small path helpers shared by cover100's collectors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RelTo ¶
RelTo returns abs expressed relative to root using forward slashes, which is the form every node id and report path uses.
ok is false when abs lies outside root: a coverage report may legitimately mention files the scan did not cover (a monorepo sibling, a linked package), and those must be dropped rather than reported under a "../" path.
Coverage tools report resolved paths, while the scan root is whatever the user typed, so the two can name the same directory through different symlink chains — on macOS `/tmp` is a symlink to `/private/tmp`, and a checkout can be reached through a linked workspace directory. When the literal comparison fails, both paths are resolved and compared again.
Types ¶
This section is empty.