Skip to content

Commit ccd4b82

Browse files
committed
fixup: skip blocklist check if no files specified
1 parent 721044b commit ccd4b82

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/ir/item.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -641,11 +641,13 @@ impl Item {
641641
return true;
642642
}
643643

644-
if let Some(location) = &self.location {
645-
let (file, _, _, _) = location.location();
646-
if let Some(filename) = file.name() {
647-
if ctx.options().blocklisted_files.matches(&filename) {
648-
return true;
644+
if !ctx.options().blocklisted_files.is_empty() {
645+
if let Some(location) = &self.location {
646+
let (file, _, _, _) = location.location();
647+
if let Some(filename) = file.name() {
648+
if ctx.options().blocklisted_files.matches(&filename) {
649+
return true;
650+
}
649651
}
650652
}
651653
}

0 commit comments

Comments
 (0)