pub fn score_commit(
root: &Path,
spec: &str,
options: &Options,
) -> Result<JitReport, Error>Available on crate feature
vcs-git only.Expand description
Score a single commit for just-in-time defect-induction risk (issue #331).
spec is any revision spelling the backend resolves to a commit
(HEAD, a SHA, a tag, main~3, …). The commit is scored against its
first parent; the touched files’ priors and the author’s experience
are measured from the history before it, windowed by options.
Returns a JitReport with the feature breakdown, per-group
contributions, and the ordinal composite JitReport::risk_score.
§Errors
Returns Error::NotARepository when root is not inside a
supported VCS working tree, Error::ResolveRef when spec does not
resolve to a commit, or a walk/diff variant when the history walk
itself fails.