Skip to content

Commit

Permalink
Add an extra debug-level message
Browse files Browse the repository at this point in the history
  • Loading branch information
bradlarsen committed Aug 17, 2023
1 parent 4786455 commit 237d8ac
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/noseyparker/src/match_type.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use bstr::BString;
use tracing::debug;

use crate::blob_id::BlobId;
use crate::location::{LocationMapping, Location};
Expand Down Expand Up @@ -66,7 +67,13 @@ impl Match {
.enumerate()
.skip(1)
.filter_map(move |(group_index, group)| {
let group = group?; // XXX should we warn on empty match groups?
let group = match group {
Some(group) => group,
None => {
debug!("blob {}: empty match group at index {group_index}: {} {}", blob_match.blob.id, blob_match.rule.id, blob_match.rule.name);
return None;
}
};
Some(Match {
blob_id: blob_match.blob.id,
rule_name: blob_match.rule.name.clone(),
Expand Down

0 comments on commit 237d8ac

Please sign in to comment.