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

Adjust cc violation limits #358

Merged

Conversation

UFOMelkor
Copy link
Member

Changing the CCN and WMC calculation results in higher CCN and especially WMC values.

Therefore the threshold for violations should to be adjusted too.
For the CCN 10 as a threshold is suggested by McCabe itself.
For the WMC no source could be found, but in other open source metric tools 50 has been found as threshold.

Applying this thresholds on symfony leeds to the following violations:

CCN violations WMC violations
Before changing ccn 104 237
After changing ccn 297 458
After adjusting thresholds 115 293

Altogether when applying the new CCN calculation with the new thresholds, which are based on resources, the number of violations does not change significantly.

Changing the CCN and WMC calculation results in higher CCN and
especially WMC values.

Therefore the threshold for violations should to be adjusted too.
For the CCN 10 as a threshold is suggested by McCabe itself.
For the WMC no source could be found, but in other open source metric
tools 50 has been found as threshold.

Applying this thresholds on symfony leeds to the following violations:

|                            | CCN violations | WMC violations |
| -------------------------- | -------------- | -------------- |
| Before changing ccn        |       104      |       237      |
| After changing ccn         |       297      |       458      |
| After adjusting thresholds |       115      |       293      |

Altogether when applying the new CCN calculation with the new
thresholds, which are based on resources, the number of violations does
not change significantly.
@UFOMelkor UFOMelkor merged commit 3434a93 into phpmetrics:master Jul 9, 2018
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

Successfully merging this pull request may close these issues.

1 participant