Restored --version cli argument. Added a test for it

This commit is contained in:
Mick Grove 2025-07-01 10:31:09 -07:00
commit c6567ee04b
4 changed files with 19 additions and 3 deletions

View file

@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
## [1.18.1]
- Restored --version cli argument
- Added test for the argument
## [1.18.0]
- Added rules for DeepSeek, xAI
- Removed branding

View file

@ -10,7 +10,7 @@ publish = false
[package]
name = "kingfisher"
version = "1.18.0"
version = "1.18.1"
edition.workspace = true
rust-version.workspace = true
license.workspace = true

View file

@ -10,10 +10,11 @@ use crate::cli::commands::{
github::GitHubArgs, gitlab::GitLabArgs, rules::RulesArgs, scan::ScanArgs,
};
#[deny(missing_docs)]
#[derive(Parser, Debug)]
/// Kingfisher Detect and validate secrets across files and full Git history
#[command(version = env!("CARGO_PKG_VERSION"))]
/// Kingfisher - Detect and validate secrets across files and full Git history
pub struct CommandLineArgs {
/// The command to execute
#[command(subcommand)]

View file

@ -22,4 +22,14 @@ mod test {
.success()
.stdout(contains("kingfisher.aws.").and(contains("pattern")));
}
#[test]
fn cli_version_flag() {
Command::cargo_bin("kingfisher")
.unwrap()
.arg("--version")
.assert()
.success()
.stdout(contains(env!("CARGO_PKG_VERSION")));
}
}