Skip to content

Commit fcdce0a

Browse files
committed
Merge branch 'prodigy-workflow-1762310617374'
2 parents 893a6da + e926445 commit fcdce0a

File tree

11 files changed

+654
-842
lines changed

11 files changed

+654
-842
lines changed

specs/166-lcov-function-name-matching-fix.md

Lines changed: 0 additions & 782 deletions
This file was deleted.

src/analyzers/file_analyzer.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,20 +506,23 @@ mod tests {
506506
execution_count: 10,
507507
coverage_percentage: 80.0,
508508
uncovered_lines: vec![2, 3],
509+
normalized: crate::risk::lcov::NormalizedFunctionName::simple("func1"),
509510
},
510511
FunctionCoverage {
511512
name: "func2".to_string(),
512513
start_line: 10,
513514
execution_count: 0,
514515
coverage_percentage: 0.0,
515516
uncovered_lines: vec![10, 11, 12, 13, 14],
517+
normalized: crate::risk::lcov::NormalizedFunctionName::simple("func2"),
516518
},
517519
FunctionCoverage {
518520
name: "func3".to_string(),
519521
start_line: 20,
520522
execution_count: 5,
521523
coverage_percentage: 50.0,
522524
uncovered_lines: vec![21, 22],
525+
normalized: crate::risk::lcov::NormalizedFunctionName::simple("func3"),
523526
},
524527
];
525528
functions.insert(PathBuf::from("test.rs"), function_coverages);

src/cli.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,32 @@ pub enum Commands {
457457
#[arg(long, short = 'q')]
458458
quiet: bool,
459459
},
460+
461+
/// Explain coverage detection for a specific function (debugging tool)
462+
ExplainCoverage {
463+
/// Path to the codebase to analyze
464+
path: PathBuf,
465+
466+
/// LCOV coverage file
467+
#[arg(long = "coverage-file", visible_alias = "lcov")]
468+
coverage_file: PathBuf,
469+
470+
/// Function name to explain (e.g., "create_auto_commit")
471+
#[arg(long = "function")]
472+
function_name: String,
473+
474+
/// File path containing the function (optional, helps narrow search)
475+
#[arg(long = "file")]
476+
file_path: Option<PathBuf>,
477+
478+
/// Show all attempted matching strategies
479+
#[arg(long = "verbose", short = 'v')]
480+
verbose: bool,
481+
482+
/// Output format
483+
#[arg(short = 'f', long = "format", value_enum, default_value = "text")]
484+
format: DebugFormatArg,
485+
},
460486
}
461487

462488
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]

0 commit comments

Comments
 (0)