The codecov suppression using // $COVERAGE-OFF/ON did not work.

https://github.com/apache/daffodil/pull/539/files#diff-3fd1e3ba2fc61e010a380dd6ae37d03e861205f391bf5cd110e54a7c912d2067

When I view it, it shows a codecov warning, right in the middle of a block 
surrounded by the Coverage off/on comments.

So that suppression of the codecov report for these annotations did not work.

Is this a feature we need to enable in codecov?


________________________________
From: Interrante, John A (GE Research, US) <john.interra...@ge.com>
Sent: Tuesday, April 27, 2021 1:52 PM
To: dev@daffodil.apache.org <dev@daffodil.apache.org>
Subject: codecov - annotation to suppress false positives?

I think you'd want "informational" mode, not "only_pulls".  It looks like the 
latter might lose the information from merged commits:

    only_pulls
        Only post a status to pull requests, defaults to false. If true no 
status will be posted for commits not on a pull request.

If code coverage jumps well above the 80% cutoff once DAFFODIL-2509 gets done, 
we'll probably want to stop setting "informational" mode.

-----Original Message-----
From: Steve Lawrence <slawre...@apache.org>
Sent: Tuesday, April 27, 2021 1:32 PM
To: dev@daffodil.apache.org
Subject: EXT: Re: codecov - annotation to suppress false positives?

Thanks!

Related to codecov, does anyone have any thoughts on changing codecov.io 
settings so the GitHub actions are only in the "informational" mode:

  https://docs.codecov.io/docs/commit-status#informational

This way if there are any missing lines of code, it won't fail the check. I 
think we would still get the inline notices saying that a line has missing 
coverage, but a PR will still show the check as passing, and commits will also 
show a pass.

Alternatively we could set the "only_pulls" setting:

  https://docs.codecov.io/docs/commit-status#only_pulls

This way PR codecov checks can still fail the check if not sufficiently 
covered, but if we decide that's fine and merge it then it won't cause the 
merged commit to fail the check.


On 4/27/21 1:20 PM, Beckerle, Mike wrote:
> Created https://issues.apache.org/jira/browse/DAFFODIL-2509
> about adding these coverage exceptions uniformly for all the Assert.xyzzy 
> where it is applicable.
> ________________________________
> From: Steve Lawrence <slawre...@apache.org>
> Sent: Tuesday, April 27, 2021 12:45 PM
> To: dev@daffodil.apache.org <dev@daffodil.apache.org>
> Subject: Re: codecov - annotation to suppress false positives?
>
> We use the sbt-scoverage plugin for generating coverage measurements
> before sending them to codecov.io for display. It looks like this does
> have a way exclude packages and sections of code:
>
> https://github.com/scoverage/sbt-scoverage#exclude-classes-and-package
> s
>
> So we could maybe do something like:
>
>   foo match {
>     case real1 => ...
>     case real2 => ... r
>     // $COVERAGE-OFF
>     case thingy =>  {
>       Assert.invariantFailed(".....msg...")
>     }
>     // $COVERAGE-ON
>   }
>
> To exclude the entire case that should never be hit?
>
>
> On 4/27/21 10:29 AM, Beckerle, Mike wrote:
>> We have assertions like:
>>
>> foo match {
>> ... real cases ....
>> case thingy =>  Assert.invariantFailed(".....msg...")
>> }
>>
>> The same thing can happen with if-then-else logic obviously where you
>> make a decision, and some paths through the logic can't occur.
>>
>> These always get marked as non-covered, because by nature they're
>> never supposed to happen.
>>
>> Is there a structured comment or some way to tell codecov that this
>> is ok, and not to issue a warning about this line?
>>
>> Mike Beckerle | Principal Engineer
>>
>> mbecke...@owlcyberdefense.com <mailto:bhum...@owlcyberdefense.com>
>>
>> P +1-781-330-0412
>>
>
>

Reply via email to