fastlane-community / xcov

Nice code coverage reporting without hassle
MIT License
556 stars 107 forks source link

xcov 1.4.3 total percentage does not respect ignored files #130

Closed JLau-cy closed 4 years ago

JLau-cy commented 6 years ago

In xcov 1.4.3 files that are ignored in the .xcovignore file is included in the overall percentage calculation.

Tested this on 1.4.2 and it is working as expected.

wolesolana commented 6 years ago

I'm experiencing a similar issue since upgrading to 1.4.3

TheSooth commented 6 years ago

the same with 1.4.3

waitbutY commented 6 years ago

same for me, on 1.4.3

mixtly87 commented 6 years ago

Is there any chance this will get fixed soon?

RodBrown1988 commented 6 years ago

This issue appears to have been introduced by #129.

@nakiostudio this is affecting everyone who has to upgrade to Xcode 10. Could you take look at this?

nakiostudio commented 6 years ago

Hi all 👋

Thank you for your patience here, I hit a dead end trying to fix this issue.

In order to make the code coverage reported by xcov match the one reported by Xcode I need to use the target coverage specified in the . xccovreport file (which is based on lines coverage). If xcov computes the coverage itself (so ignored files can be ignored) with function coverage then the resulting coverage differs to Xcode's.

So there are two solutions really:

What do you peeps think?

mixtly87 commented 6 years ago

Keep ignored files support.

On Fri, Sep 14, 2018 at 16:09 Carlos Vidal notifications@github.com wrote:

Hi all 👋

Thank you for your patience here, I hit a dead end trying to fix this issue.

In order to make the code coverage reported by xcov match the one reported by Xcode I need to use the target coverage specified in the . xccovreport file (which is based on lines coverage). If xcov computes the coverage itself (so ignored files can be ignored) with function coverage then the resulting coverage differs to Xcode's.

So there are two solutions really:

  • Drop ignored files support.
  • Go back to coverage based on function coverage and keep ignored files support.

What do you peeps think?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nakiostudio/xcov/issues/130#issuecomment-421370389, or mute the thread https://github.com/notifications/unsubscribe-auth/AO-2UUCMble5hg3hOv47T-OPI3CSwfplks5ua7iggaJpZM4UpkKe .

-- Best regards, Marko Čičak

RodBrown1988 commented 6 years ago

Thanks, @nakiostudio.

Agreed, keep ignore support, the ignore support is important for us. We use Xcov in my workplace specifically because it provides us the ability to pull unnecessary data out of the report eg views which we don’t test.

Just curious, is there a way where you can determine what to ignore, and if it is nothing, use the one that matches Xcode? If you’re ignoring files, the overall number won’t match Xcode anyway.

kasperhansen commented 6 years ago

Keep ignored files support. This is our main reason for using xcov.

ringsheep commented 6 years ago

Keep ignored files support, or provide two total numbers at one time (one from xcode, one from xcov)

coldmint commented 5 years ago

Keep ignored files support

npu3pak commented 5 years ago

Keep ignored files support please

tiwsetd commented 5 years ago

Please keep ignored files support

Is there any workaround in place for getting coverage numbers that respect the ignored files at the moment?

mothule commented 5 years ago

Keep ignored files support

vishwesh447 commented 5 years ago

Please keep the ignored files support.

pballartzinio commented 5 years ago

Please keep ignored files support

hefgi commented 5 years ago

Hey guys, this is still present in 1.5.0, can we expect having that fix ?

gibachan commented 5 years ago

Please keep ignored files support. Any updates?

RodBrown1988 commented 5 years ago

@nakiostudio seems people are pretty set on supporting ignored files. Do you have any updates for this?

nakiostudio commented 5 years ago

Thank you all for the feedback and patience. I’ve been away without access to a laptop for quite some time. I plan to tackle this next week preserving ignored files support and using the appropriate way of calculating coverage depending on the ignored files setting. I will keep you all posted.

khomchyk commented 5 years ago

Hello! Any updates?

kunass2 commented 5 years ago

Any updates?

narlei commented 5 years ago

Waiting anxiously! 👍 Not working with the last version too.

mcicak commented 5 years ago

Just updated to latest 1.5.0 but the issue is still present. Any info on when this will be covered? Thanks!

clausjoergensen commented 5 years ago

There's several open issues for this problem now. Looks like it regressed in 1.4.3 and haven't been fixed since? That's pretty bad, since the reporting is effectively null and void by including the ignored files.

Some feedback on when/if this will be addressed would be nice.

npu3pak commented 5 years ago

I am using Slather as temporary solution. It works with XCode 10.1

kyrylhorbushko commented 5 years ago

any updates?

alexito4 commented 5 years ago

Is interesting to note that when using https://github.com/nakiostudio/danger-xcov the files reported on the PR are correctly ignore, but the % is still wrong.

ascentman commented 5 years ago

...also wait for updates. @nakiostudio keep us informed about any progress here:) Thanks!

narlei commented 5 years ago

This PR solve the problem! https://github.com/tasaiii725/xcov

clausjoergensen commented 5 years ago

@narlei You're referring to #130 ?

narlei commented 5 years ago

@clausjoergensen yes, I'm using this PR as xcov lib: Gemfile: gem 'xcov', git: 'https://github.com/tasaiii725/xcov'

And now ignored coverage files are working.

narlei commented 5 years ago

Version 1.6.0 still have the problem.

joshdholtz commented 5 years ago

Will get this fixed in the next release! 💪

dannypier commented 4 years ago

Version 1.7.0 still exhibits the issue.

joeboyscout04 commented 4 years ago

Was anyone able to test the PR mentioned above? Looks like it's still open https://github.com/fastlane-community/xcov/pull/144

Zeta611 commented 4 years ago

I'm using this (https://github.com/aksvenk/xcov/tree/coverage-percentage-fix) via:

gem 'xcov', github: 'aksvenk/xcov', branch: 'coverage-percentage-fix'

and it works great!

chinnasamymca commented 4 years ago

I too tested, Works fine for me. @Zeta611 Can you please create MR to the main repo.

Zeta611 commented 4 years ago

@chinnasamymca Here it is: #170 :)

joshdholtz commented 4 years ago

Fixed by https://github.com/fastlane-community/xcov/pull/170

joshdholtz commented 4 years ago

Released in v1.7.1 🚀