Skip to content

Commit

Permalink
feat!: Add scanning for unmanaged files (WIP)
Browse files Browse the repository at this point in the history
This is a POC that works, but code neither quality nor performance
are up to par yet.
  • Loading branch information
VorpalBlade committed Mar 4, 2024
1 parent d5cfb0a commit c1f1f6a
Show file tree
Hide file tree
Showing 8 changed files with 428 additions and 53 deletions.
194 changes: 172 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 21 additions & 3 deletions crates/paketkoll/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use std::fmt::Display;

use clap::Parser;
use clap::{Parser, Subcommand};

#[derive(Debug, Parser)]
#[command(version, about, long_about = None)]
#[command(propagate_version = true)]
pub(crate) struct Cli {
/// Trust mtime (don't check checksum if it matches)
#[arg(long)]
Expand All @@ -14,8 +15,25 @@ pub(crate) struct Cli {
/// Which package manager backend to use
#[arg(short, long, default_value_t = Backend::Auto)]
pub(crate) backend: Backend,
/// Packages to check (default: all of them)
pub(crate) packages: Vec<String>,
/// Operation to perform
#[command(subcommand)]
pub(crate) command: Commands,
}

#[derive(Debug, Subcommand)]
pub(crate) enum Commands {
/// Check package files
Check {
/// Packages to check (default: all of them)
packages: Vec<String>,
},
/// Check package files and search for unexpected files
CheckUnexpected {
/// Extra paths to ignore (for unexpected file check only).
/// Globs are supported.
#[arg(long)]
ignore: Vec<String>,
},
}

/// Determine which package manager backend to use
Expand Down
Loading

0 comments on commit c1f1f6a

Please sign in to comment.