sarah 0.1.5

Count tokens, lines and function sizes per file to help AI agents decide what to refactor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// The binary's only writer to stdout and stderr (rust.md: one output module).
pub struct CliOutput;

impl CliOutput {
    #[expect(
        clippy::print_stdout,
        reason = "the rendered report is the CLI's output"
    )]
    pub fn print_report(rendered: &str) {
        println!("{rendered}");
    }

    #[expect(clippy::print_stderr, reason = "fatal errors go to stderr")]
    pub fn print_error(err: &anyhow::Error) {
        eprintln!("Error: {err:?}");
    }
}