pub fn rules_candidate_path(
rules_path: &Path,
repository_root: &Path,
) -> Option<Vec<u8>>Expand description
What:
The rules file’s pathname as a candidate would carry it,
when it lies inside the repository.
Option<Vec<u8>> is “pathname bytes or nothing”.
Why:
A rules file tracked in the repository would match its own patterns,
so its
candidate is not scanned.
A rules file outside the repository can never be a
candidate,
which is “nothing”.
In TS you’d write (pseudocode):
function rulesCandidatePath(rulesPath: string, repositoryRoot: string): string | undefined;