diff --git a/src/cli.rs b/src/cli.rs index 5a53a8c..d8dffb3 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -20,6 +20,10 @@ pub struct Cli { /// testing. #[arg(long)] strict: bool, + /// Return non-zero exit code if some log lines do not have associated compile id. Used for + /// unit testing + #[arg(long)] + strict_compile_id: bool, /// Don't open browser at the end #[arg(long)] no_browser: bool, @@ -43,6 +47,7 @@ fn main() -> anyhow::Result<()> { let config = ParseConfig { strict: cli.strict, + strict_compile_id: cli.strict_compile_id, custom_parsers: Vec::new(), }; diff --git a/src/lib.rs b/src/lib.rs index 63295c3..87f2933 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,6 +19,7 @@ mod types; pub struct ParseConfig { pub strict: bool, + pub strict_compile_id: bool, pub custom_parsers: Vec>, } @@ -281,6 +282,8 @@ pub fn parse_path(path: &PathBuf, config: ParseConfig) -> anyhow::Result anyhow::Result