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

Fix wrong Halstead computation for Python #276

Merged
merged 1 commit into from
Oct 5, 2020

Conversation

Luni-4
Copy link
Collaborator

@Luni-4 Luni-4 commented Sep 24, 2020

We were counting wrong operators for Python Halstead's implementation.

@Luni-4 Luni-4 requested a review from calixteman September 24, 2020 13:45
@sylvestre
Copy link
Collaborator

You should add a test for this check :)

@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2020

Codecov Report

Merging #276 into master will increase coverage by 0.04%.
The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #276      +/-   ##
==========================================
+ Coverage   17.67%   17.72%   +0.04%     
==========================================
  Files          46       46              
  Lines        5963     5958       -5     
  Branches      707      707              
==========================================
+ Hits         1054     1056       +2     
+ Misses       4498     4489       -9     
- Partials      411      413       +2     
Impacted Files Coverage Δ
src/getter.rs 30.86% <50.00%> (ø)
src/metrics/halstead.rs 42.39% <66.66%> (+1.28%) ⬆️
src/metrics/loc.rs 48.00% <66.66%> (+0.84%) ⬆️
src/output/dump.rs 50.00% <0.00%> (-0.67%) ⬇️
src/tools.rs 55.39% <0.00%> (-0.22%) ⬇️
src/count.rs 0.00% <0.00%> (ø)
rust-code-analysis-cli/src/formats.rs 0.00% <0.00%> (ø)
src/metrics/cyclomatic.rs 46.15% <0.00%> (+0.58%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8ccc51...32473fb. Read the comment docs.

@Luni-4
Copy link
Collaborator Author

Luni-4 commented Sep 24, 2020

You should add a test for this check :)

It's already tested here :)

@Luni-4
Copy link
Collaborator Author

Luni-4 commented Sep 24, 2020

@sylvestre

Added a regression test also :)

@Luni-4 Luni-4 force-pushed the fix-halstead branch 2 times, most recently from fc4ac13 to b42b0e6 Compare September 24, 2020 17:09
We were counting wrong operators for Python Halstead's implementation
@calixteman calixteman merged commit efe397f into mozilla:master Oct 5, 2020
@Luni-4 Luni-4 deleted the fix-halstead branch October 5, 2020 08:04
spacedragon pushed a commit to spacedragon/rust-code-analysis that referenced this pull request Feb 2, 2021
We were counting wrong operators for Python Halstead's implementation
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.

4 participants