Skip to main content

run

Function run 

Source
pub fn run<R, W, E>(
    mode: Mode,
    reader: R,
    writer: &mut W,
    error_writer: &mut E,
) -> Result<RunReport, Error>
where R: BufRead, W: Write + ?Sized, E: Write + ?Sized,
Expand description

Reads clippy JSON from reader, formats according to mode, writes to writer.

Per-line JSON parse errors are logged to error_writer and the run continues; only I/O failures on reader or writer are fatal. In Mode::Github the summary is appended to the file at $GITHUB_STEP_SUMMARY (if set) instead of being written to writer; annotations still go to writer.

ยงErrors

Returns Error::Io if reading from reader, writing to writer, or writing to error_writer / $GITHUB_STEP_SUMMARY fails.