Codecov generates negative coverage for unchanged files


While creating a new pull request several times, it happens that the codecov has reported negative coverage for files that have not been modified at all. It also varies, sometimes codecov is positive and sometimes is not.
Here is a PR link (, it is an open-source project.

After creating the PR on eclipse / kapua official repo, codecov generates negative coverage. Meanwhile, I tried to do the same PR to my forked develop and there codecov works without problems (
The question is why codecov generate and show negative reports / or missed lines. if the new tests were added and if the CI passed correctly?
Please advise for any hint regarding this issue.


My forked project:

Official repo:



Additional Information

I am also submitting a .yaml file configuration …
require_ci_to_pass: true

    behavior: default
    layout: "reach, diff, flags, files"
    require_base: false
    require_changes: false
    require_head: true

    precision: 2
    range: "70...100"
    round: down
        changes: false
        project: true
        patch: true

            conditional: true
            loop: true
            method: false
            macro: false
        enable_partials: false

    - "qa"
    - "**/test/"
    - "**/test-steps/"

I can confirm this - I tried on my fork and although I get +0.00% coverage it is not negative (link to my fork PR is here).
Can anybody else maybe try and see if they get negative coverage (try to create a PR on your own form from the branch code-incubus provided to newest develop branch of Kapua project)? This is getting really frustrating on the Kapua project, as some PRs without tests have 1.xx+% coverage and sometimes PR with only tests have negative coverage…


1 Like

Hi all, we have made some changes and upgrades to our system. Is this still happening and if so, is there a more recent commit where this occurs?

Hi @tom,
thanks for the update. Until now we have implemented a “workaround” (creating PRs with close to 1k lines, that way we always have positive coverage).
I will try to create some simple (short tests) and push them to my fork. I will let you know how this goes.


1 Like