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

0% coverage reported #22

Open
Remi-Gau opened this issue Feb 9, 2021 · 3 comments
Open

0% coverage reported #22

Remi-Gau opened this issue Feb 9, 2021 · 3 comments

Comments

@Remi-Gau
Copy link
Contributor

Remi-Gau commented Feb 9, 2021

Raising an issue here after discussing it in the moxunit github action repo: joergbrech/moxunit-action#13

In brief:

I am running my test with moxunit and even when they pass I get 0% coverage (bids-standard/bids-matlab#124 (comment)).

The issue seems to be related to the fact that the code hose coverage is to be estimated in a "package" folder (folder starts with a "+").

@joergbrech checked an simply remove the + seemed to do the trick: joergbrech/moxunit-action#13 (comment)

@Remi-Gau
Copy link
Contributor Author

Tempted to give a go at enhancing Mocov to allow coverage of package folders.

Before I go in a deep dive by myself, I would not mind any pointers as to where I should focus my attention in the code base to get started on this.

@nno
Copy link
Contributor

nno commented Apr 28, 2022

Greetings, thanks for considering to see if you can allow coverage of package folders. A PR would definitely be appreciated.

The approach taken by MOcov is to rewrite each .m file and store the changed version in a temporary directory, adding an extra statement to each extra executable line marking it as executed.
Probably a good start is here: https://github.com/MOcov/MOcov/blob/master/MOcov/%40MOcovMFileCollection/rewrite_mfiles.m. This function sets the name of the temporary files. If you have more questions please let me know.

@Remi-Gau
Copy link
Contributor Author

Awesome I will start looking into it. I am juggling with a million things so don't expect fast progress on this, but as I also need this to get accurate coverage one of my main project it could also move pretty fast.

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

2 participants