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

Readjusting Halstead Metrics #98

Merged
merged 4 commits into from
Mar 9, 2024
Merged

Readjusting Halstead Metrics #98

merged 4 commits into from
Mar 9, 2024

Conversation

Maimunar
Copy link
Contributor

@Maimunar Maimunar commented Mar 8, 2024

While using the library (with the json tag) I noticed a discrepancy between some of the logic presented in the json and the logic shown in the research I read (resources below), namely:

  • A swapped definition of program length and vocabulary size
  • A swapped definition in calculating difficulty - again, seems like it swapped total and unique operators

This PR goes over the changes and also fixes the tests

Some resources I used to get the right definitions:
https://en.wikipedia.org/wiki/Halstead_complexity_measures
https://www.geeksforgeeks.org/software-engineering-halsteads-software-metrics/

If there is any other contribution guideline I missed, I'm happy to assist with that

@sgb-io sgb-io mentioned this pull request Mar 9, 2024
@sgb-io
Copy link
Owner

sgb-io commented Mar 9, 2024

Thanks for helping to uncover and fix this @Maimunar! I will shortly release v2.0.0 since this changes output scores

@sgb-io sgb-io merged commit c7c4396 into sgb-io:main Mar 9, 2024
9 checks passed
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.

2 participants