Skip to content

Strict mode for requiring full line coverage (in gcov)? #604

Open
@MichaelChirico

Description

@MichaelChirico

For some years, we've slowly been adding newlines to code to improve our code coverage due to {covr} reporting full coverage of partially-covered lines, e.g.

-if (verbose) Rprintf("reached.\n");
+if (verbose)
+  Rprintf("reached.\n");

Now I am learning a bit more about gcov internals:

Rdatatable/data.table#6950 (comment)

It seems gcov indeed recognizes this line is only partially covered if the test suite always uses verbose=0 by reporting 1* "partially covered":

https://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html

Can this somehow be reported to the user? Is there any option to require lines be fully-covered in order for codecov to consider them "covered" in a 0/1 sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions