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 environment;
15mod features;
16mod git;
17mod platform;
18mod testing;
19mod util;
20
21use std::env;
22
23use anyhow::Result;
24use clap::Parser;
25use commands::Cli;
26
27fn main() -> Result<()> {
28 let cli = Cli::parse();
29
30 app::set_global_verbosity(cli.verbose.log_level_filter());
31 app::set_global_config(config::load()?);
32
33 let path = if app::config().repo.is_empty() {
34 env::current_dir()
35 .expect("Could not determine current directory")
36 .display()
37 .to_string()
38 } else {
39 app::config().repo.clone()
40 };
41 app::set_global_path(path);
42
43 cli.exec()
44}