feat: run clippy + BlueBuildTrait (#4)

* feat: run clippy + BlueBuildTrait

* chore: add default run impl; more clippy

* chore: remove vscode folder; not needed

* cleanups

* Move to commands.rs

* Move functions; remove run function implementation from each command

* Remove run impl from init commands

* Use error log

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
This commit is contained in:
N16hth4wk 2024-01-21 21:26:35 -06:00 committed by GitHub
parent 9454baa750
commit dbbd087b5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 259 additions and 264 deletions

View file

@ -1,11 +1,17 @@
use blue_build::{self, build, local, template};
#![warn(clippy::pedantic, clippy::nursery)]
use clap::{Parser, Subcommand};
use clap_verbosity_flag::{InfoLevel, Verbosity};
use env_logger::WriteStyle;
use log::trace;
use blue_build::{
self,
commands::{build, local, template, BlueBuildCommand},
};
#[cfg(feature = "init")]
use blue_build::init;
use blue_build::commands::init;
#[derive(Parser, Debug)]
#[command(name = "BlueBuild", author, version, about, long_about = None)]
@ -68,15 +74,15 @@ fn main() {
trace!("{args:#?}");
match args.command {
#[cfg(feature = "init")]
CommandArgs::Init(mut command) => command.run(),
#[cfg(feature = "init")]
CommandArgs::New(mut command) => command.run(),
CommandArgs::Template(mut command) => command.run(),
CommandArgs::Build(mut command) => command.run(),
CommandArgs::Template(command) => command.run(),
CommandArgs::Upgrade(command) => command.run(),
CommandArgs::Rebase(command) => command.run(),
#[cfg(feature = "init")]
CommandArgs::Init(command) => command.run(),
#[cfg(feature = "init")]
CommandArgs::New(command) => command.run(),
CommandArgs::Rebase(mut command) => command.run(),
CommandArgs::Upgrade(mut command) => command.run(),
}
}