Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xcov 1.4.3 total percentage does not respect ignored files #130

Closed
JLau-cy opened this issue Jun 15, 2018 · 41 comments
Closed

xcov 1.4.3 total percentage does not respect ignored files #130

JLau-cy opened this issue Jun 15, 2018 · 41 comments

Comments

@JLau-cy
Copy link

JLau-cy commented Jun 15, 2018

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
Copy link

I'm experiencing a similar issue since upgrading to 1.4.3

@TheSooth
Copy link

TheSooth commented Aug 9, 2018

the same with 1.4.3

@waitbutY
Copy link

same for me, on 1.4.3

@mixtly87
Copy link

Is there any chance this will get fixed soon?

@RodBrown1988
Copy link

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
Copy link
Collaborator

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?

@mixtly87
Copy link

mixtly87 commented Sep 14, 2018 via email

@RodBrown1988
Copy link

RodBrown1988 commented Sep 14, 2018

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
Copy link

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

@ringsheep
Copy link

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

@coldmint
Copy link

Keep ignored files support

@npu3pak
Copy link

npu3pak commented Oct 15, 2018

Keep ignored files support please

@tiwsetd
Copy link

tiwsetd commented Oct 15, 2018

Please keep ignored files support

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

@mothule
Copy link

mothule commented Oct 29, 2018

Keep ignored files support

@vishwesh447
Copy link

Please keep the ignored files support.

@pballartzinio
Copy link

Please keep ignored files support

@hefgi
Copy link

hefgi commented Nov 7, 2018

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

@gibachan
Copy link

gibachan commented Nov 9, 2018

Please keep ignored files support.
Any updates?

@RodBrown1988
Copy link

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

@nakiostudio
Copy link
Collaborator

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
Copy link

khomchyk commented Dec 4, 2018

Hello!
Any updates?

@kunass2
Copy link

kunass2 commented Dec 6, 2018

Any updates?

@narlei
Copy link

narlei commented Dec 13, 2018

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

@mcicak
Copy link

mcicak commented Dec 29, 2018

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

@clausjoergensen
Copy link

clausjoergensen commented Jan 13, 2019

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
Copy link

npu3pak commented Jan 14, 2019

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

@kyrylhorbushko
Copy link

any updates?

@alexito4
Copy link

alexito4 commented Mar 6, 2019

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
Copy link

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

@narlei
Copy link

narlei commented Apr 4, 2019

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

@clausjoergensen
Copy link

@narlei You're referring to #130 ?

@narlei
Copy link

narlei commented Apr 8, 2019

@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
Copy link

narlei commented Sep 18, 2019

Version 1.6.0 still have the problem.

@joshdholtz
Copy link
Member

Will get this fixed in the next release! 💪

@dannypier
Copy link

Version 1.7.0 still exhibits the issue.

@joeboyscout04
Copy link

Was anyone able to test the PR mentioned above? Looks like it's still open #144

aksvenk added a commit to aksvenk/xcov that referenced this issue Nov 11, 2019
This is a fix for a long-running issue where in a bid to bring xcov values closer to XCode’s report, file and folder exclusions were being ignored. i.e. Exclusions were always considered when calculating the total coverage percentage.

This commit reverts 2c68bfb which introduced the issue.

For more information see: fastlane-community#130
@Zeta611
Copy link

Zeta611 commented Jan 27, 2020

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
Copy link

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

@Zeta611
Copy link

Zeta611 commented Jan 27, 2020

@chinnasamymca Here it is: #170 :)

@joshdholtz
Copy link
Member

Fixed by #170

@joshdholtz
Copy link
Member

Released in v1.7.1 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests