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

Support ignoring coverage for concrete expressions. #26

Open
nadako opened this issue Jan 17, 2014 · 3 comments
Open

Support ignoring coverage for concrete expressions. #26

nadako opened this issue Jan 17, 2014 · 3 comments

Comments

@nadako
Copy link
Contributor

nadako commented Jan 17, 2014

We use a build macro for some of our classes, that inject some runtime checking expressions into a class method.

We test all expressions that can be generated by that macro in a separate test and would like these expressions to be ignored by MCover in all other classes.

It would be nice if MCover could ignore coverage at expression level by checking expression metadata. Then our build macro can add that meta for its expressions to make sure they are ignored.

@nadako
Copy link
Contributor Author

nadako commented Jan 17, 2014

Actually, I've found that massivecover already ignores EMeta expressions, so it can be a bug, because not all expressions with metadata should be ignored.

@misprintt
Copy link
Contributor

I've added support for EMeta (and ignoring individual expressions) in the feature/v3 branch.

I haven't added it to master (2.x) because 3.0 includes a lot of refactoring of the internal macros including the class that traverses the expression tree.

If you need it immediately, then you could create a fork of master, and add the equivalent of (https://github.com/massiveinteractive/MassiveCover/blob/feature/v3/src/mcover/macro/BuildMacro.hx#L208)
to the old class https://github.com/massiveinteractive/MassiveCover/blob/master/src/mcover/coverage/macro/CoverageExpressionParser.hx#L118

FYI - feature/v3 is backwards compatible (other than the removal of haxe 2.x support and the removal of the unused mcover.logger tools)

@nadako
Copy link
Contributor Author

nadako commented Jan 18, 2014

Thanks, I will check it out. Any estimates on new release?

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