From 6c8da36eb260498abe3bb3783eb49cfe2b5a53e3 Mon Sep 17 00:00:00 2001 From: Enveil Bot Date: Sat, 28 Feb 2026 08:19:44 +0000 Subject: [PATCH] feat(#21): Add version command --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index bdcbba2..3938aa1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,9 +1,4 @@ use clap::{Parser, Subcommand}; -use std::collections::HashSet; -use std::fs; -use std::path::Path; -use serde::Serialize; - mod git_hooks; use git_hooks::GitHooks; @@ -16,9 +11,12 @@ use detector::{SecretDetector, SecretFinding}; use git_hooks::GitHooks; use protector::{FileProtector, ProtectOption, ProtectResult, SensitiveFiles}; +const VERSION: &str = "0.1.0"; + #[derive(Parser)] #[command(name = "enveil")] #[command(about = "Secret detection and protection tool", long_about = None)] +#[command(version = VERSION)] struct Cli { #[command(subcommand)] command: Commands, @@ -63,6 +61,7 @@ enum Commands { }, } +<<<<<<< HEAD #[derive(Serialize)] struct ScanResult { path: String, @@ -239,6 +238,7 @@ fn main() { match &cli.command { Commands::Scan { path, verbose, format } => { +<<<<<<< HEAD let scan_path = path.as_deref().unwrap_or("."); match scan_directory(Path::new(scan_path), *verbose) {