1#![deny(clippy::pedantic, warnings)]
2#![allow(
3 clippy::module_name_repetitions,
4 clippy::print_stdout,
5 clippy::unused_self,
6 clippy::unnecessary_wraps
7)]
8
9#[macro_use]
10mod macros;
11mod app;
12mod commands;
13mod config;
14mod features;
15mod git;
16mod platform;
17mod testing;
18mod util;
19
20use anyhow::Result;
21use clap::Parser;
22use std::env;
23
24use commands::Cli;
25
26fn main() -> Result<()> {
27 let cli = Cli::parse();
28
29 app::set_global_verbosity(cli.verbose.log_level_filter());
30 app::set_global_config(config::load()?);
31
32 let path = if app::config().repo.is_empty() {
33 env::current_dir()
34 .expect("Could not determine current directory")
35 .display()
36 .to_string()
37 } else {
38 app::config().repo.clone()
39 };
40 app::set_global_path(path);
41
42 cli.exec()
43}