Skip to content

Commit 9f42839

Browse files
committed
fix missing mutants on --coverage
1 parent 20fd1b9 commit 9f42839

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

move-mutator/src/mutate.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@ fn traverse_function(
164164
let fn_loc = function.module_env.env.get_node_loc(exp_data.node_id());
165165
let fn_name = function.get_full_name_str();
166166
trace!("checking coverage {fn_loc:?} for {fn_name}");
167-
if !conf.coverage.check_location(fn_name, &fn_loc) {
168-
return true;
167+
if conf.project.apply_coverage {
168+
if !conf.coverage.check_location(fn_name, &fn_loc) {
169+
return true;
170+
}
169171
}
170172

171173
result.extend(parse_expression_and_find_mutants(function, exp_data));

0 commit comments

Comments
 (0)