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

make Kavorka generated code coverage friendly #37

Open
tobyink opened this issue Jan 9, 2021 · 2 comments
Open

make Kavorka generated code coverage friendly #37

tobyink opened this issue Jan 9, 2021 · 2 comments

Comments

@tobyink
Copy link
Owner

tobyink commented Jan 9, 2021

Migrated from rt.cpan.org #99115 (status was 'stalled')

Requestors:

From [email protected] on 2014-09-24 15:33:32
:

foo.pl:

method foo { return }
method bar($something?) { return }
method quux(:$file, Bool :$debugging = undef) { return }
PACKAGE->foo;
PACKAGE->bar;
PACKAGE->quux;

cover -delete ; perl -MDevel::Cover -MKavorka foo.pl ; cover

Coverage should be 100%, but is only 77% because of the extra code generated to handle signatures etc. In a larger project, this extra code is an amount of noise among the test gaps in my own code. So I propose that by default Kavorka should annotate its generated code to exclude it from coverage: http://p3rl.org/Devel::Cover#UNCOVERABLE-CRITERIA

@tobyink
Copy link
Owner Author

tobyink commented Jan 9, 2021

From [email protected] on 2014-09-28 08:14:51
:

Inserting comments is problematic. Perl comments are terminated with a line break. Inserting line breaks screws up the line numbers in error messages and warnings.

@tobyink
Copy link
Owner Author

tobyink commented Jan 9, 2021

From [email protected] (@pwr22) on 2014-12-17 13:05:22
:

Is it not possible to achieve 100% coverage by testing the variety of signatures accepted? IMO this is how coverage should be working anyway though I suppose it is technically testing Kavorka rather than the code in question

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

1 participant