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

How to ignore compilation of some files inside a classpath. #27

Open
saana1 opened this issue Feb 13, 2014 · 2 comments
Open

How to ignore compilation of some files inside a classpath. #27

saana1 opened this issue Feb 13, 2014 · 2 comments

Comments

@saana1
Copy link

saana1 commented Feb 13, 2014

My haxe code has multiple files within a single class path folder."myexample/hxproj/common/src".

Since MCOVER expects classPath and NOT individual file names, how do I exclude some of the files from being compiled ?I cannot move out any file..have to just ignore some files in that classPath.
In the normal build I can use a MAKEFILE to add list of files I compile in the folder.
I do not want MCover to compile few files which are not in the MAKEFILE.

Please note that ignoreClass option in the MCOVER macro will not help here as it appears to still compile these classes and only ignore it when reporting the coverage.

@misprintt
Copy link
Contributor

Hi,

The MCover macro loops through all files in all packages and runs a regex against each class to filter out any classes with @:IgnoreCover metadata. The ignoreClasses macro effectively does the same thing.

These classes are not added to the compiler by MCover.

If another class (that is included in compilation) references this class then the compiler will still compile it (normal compiler behaviour). In this case you may need to wrap the 'ignored' class around conditional compilation flags to prevent it from being compiled under specific conditions.

This can often occur when compiling for multiple targets and having some classes are target specific (e.g. SomeClass_js.hx and SomeClass_flash.hx).

@misprintt misprintt reopened this Feb 13, 2014
@saana1
Copy link
Author

saana1 commented Feb 14, 2014

Hi

My mcover macro is like this:
mcover.MCover.coverage([''],['ex/app1/src'],['app1.src.AppTest','app1.src.FlyoutTest'])

I want to ignore the classess FlyoutTest and AppTest and hence I added them in the IgnoreClass macro list.
But during build, it compiles the classes AppTest and FlyoutTest. There is compile error in AppTest class. ( this is a known error and I had planned to fix it up later, so wanted mcover to skip this class!)
I tried adding the @:IgnoreCover metadata on top of AppTest class. But still it is getting comipled.

Anyways, when I run the report, the details for FlyoutTest and AppTest are not present. But I want to skip the comiplation also.

Thanks.

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