nu-lint 1.3.1

Linter for Nu shell scripts that helpfully suggests improvements
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::{
    io::{self, ErrorKind, Write},
    process::ExitCode,
};

use nu_lint::cli::run;

fn main() -> ExitCode {
    match run() {
        Ok(code) => code,
        Err(error) if error.kind() == ErrorKind::BrokenPipe => ExitCode::SUCCESS,
        Err(error) => {
            let _ = writeln!(io::stderr(), "Error: {error}");
            ExitCode::FAILURE
        }
    }
}