run_with_reviewdog

Function run_with_reviewdog 

Source
fn run_with_reviewdog(
    root: &Path,
    cargo_args: &[&str],
    diff_branch: Option<&str>,
) -> Result<()>
Expand description

Runs cargo clippy --message-format=short and pipes the output through reviewdog.

When diff_branch is Some, reviewdog uses git diff <branch> as the diff source and the local reporter (terminal output). When None, reviewdog fetches the PR diff from the GitHub API and posts inline review comments via the github-pr-review reporter.

Both processes run concurrently via a pipe so neither buffers the full output in memory.

ยงErrors

Returns an error if either process fails to spawn or exits non-zero.