jlint 0.4.1

A command-line linter for Rust projects that flags noisy qualified paths and blank lines between imports
Documentation
use std::env;
use std::path::PathBuf;
use std::process::ExitCode;

fn main() -> ExitCode {
  let mut no_banner = false;
  let mut root = None;
  for argument in env::args_os().skip(1) {
    if argument == "--no-banner" {
      no_banner = true;
    } else if root.is_none() {
      root = Some(PathBuf::from(argument));
    }
  }
  let root = root.unwrap_or_else(|| {
    env::current_dir().expect("current directory")
  });
  let result = jlint::lint_with_options(
    &root,
    &jlint::LintOptions { no_banner },
  );
  if result.errors > 0 {
    ExitCode::FAILURE
  } else {
    ExitCode::SUCCESS
  }
}