taiki-e / cargo-llvm-cov

Cargo subcommand to easily use LLVM source-based code coverage (-C instrument-coverage).
Apache License 2.0
920 stars 57 forks source link

Cov says function *signatures* are not covered while the *body* is fully covered? #327

Open fzyzcjy opened 9 months ago

fzyzcjy commented 9 months ago

Hi thanks for the project! However, I am quite confused about what it gives. Consider the two following examples, it says, function signatures are not covered while the body is fully covered. I cannot understand how this can happen :/

Example 1: https://app.codecov.io/gh/fzyzcjy/flutter_rust_bridge/blob/master/frb_codegen%2Fsrc%2Flibrary%2Futils%2Fdart_repository%2Fdart_repo.rs

image

Example 2: https://app.codecov.io/gh/fzyzcjy/flutter_rust_bridge/blob/master/frb_codegen%2Fsrc%2Flibrary%2Fcodegen%2Fgenerator%2Fwire%2Frust%2Fspec_generator%2Fcodec%2Fdco%2Fencoder%2Fty%2Fdelegate.rs

image

taiki-e commented 9 months ago

Hmm. This is very odd. Do other report formats (such as --codecov, --html) have the same problem?

fzyzcjy commented 9 months ago

Thank you for the reply.

I later find more weird problems. For example, sometimes a comment line itself is red (while we know comments are not executable code at all...).

I changed to codecov reporter and do not use lcov currently (because I need to hack the output to remove these manually).