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 PHP_CodeCoverage_Report_Crap4j::$threshold configurable #1663

Closed
SchulteMarkus opened this issue Mar 31, 2015 · 1 comment
Closed

Make PHP_CodeCoverage_Report_Crap4j::$threshold configurable #1663

SchulteMarkus opened this issue Mar 31, 2015 · 1 comment
Milestone

Comments

@SchulteMarkus
Copy link

CRAP as an additional metric is awesome.

For time being, the CRAPpy threshold is hard coded to 30 within PHPUnit. According to Crap4j faq, this is a point where you have to start refactoring your code. Well, but in a goode php-project, you might want to see even CRAPpy code with less CRAP than 30.

Please make this threshold configurable, for example via phpunit.xml.

Background is, CRAPpy methods with less than 30 CRAP-points get a crapLoad = 0 (PHP_CodeCoverage_Report_Crap4j::getCrapLoad()). I am using crap4j.xml within Jenkins and Crap4j Plugin, and a I want to have methods with CRAP >= 20 reported by this plugin.

@SchulteMarkus SchulteMarkus changed the title Make PHP_CodeCoverage_Report_Crap4j::$threshold Make PHP_CodeCoverage_Report_Crap4j::$threshold configurable Mar 31, 2015
sebastianbergmann added a commit to sebastianbergmann/php-code-coverage that referenced this issue Jun 19, 2015
@sebastianbergmann sebastianbergmann added this to the PHPUnit 4.8 milestone Jun 19, 2015
@SchulteMarkus
Copy link
Author

Thank you!

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