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

Replace single WMC field with class and interface sums #916

Merged
merged 3 commits into from
Sep 29, 2022

Conversation

marco-ballario
Copy link
Contributor

@marco-ballario marco-ballario commented Aug 24, 2022

This PR splits the single WMC value into two fields, corresponding to classes and interfaces.
It also introduces class and interface sums and a total field.
Moreover this PR modifies the WMC computation so that the space kind field is updated at most once.
Serialization, dump and unit tests have been updated accordingly.

The code has been tested on 2 small repositories (Simple-Java-Calculator and Notepad) and 1 large repository (netbeans).
For the small repositories all the measures have the expected values.
For the large repository the computation ends smoothly and never unexpectedly stops.

Thanks in advance for the review!

@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2022

Codecov Report

Base: 68.54% // Head: 68.61% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (2bb2ff9) compared to base (7ee331d).
Patch coverage: 79.31% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #916      +/-   ##
==========================================
+ Coverage   68.54%   68.61%   +0.07%     
==========================================
  Files          60       60              
  Lines       12297    12377      +80     
==========================================
+ Hits         8429     8493      +64     
- Misses       3868     3884      +16     
Impacted Files Coverage Δ
src/output/dump_metrics.rs 83.69% <0.00%> (-2.12%) ⬇️
src/metrics/wmc.rs 95.95% <88.34%> (-1.21%) ⬇️
src/spaces.rs 91.32% <100.00%> (+0.51%) ⬆️
src/getter.rs 83.33% <0.00%> (-0.34%) ⬇️
src/parser.rs 33.80% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@marco-ballario marco-ballario changed the title Introduce a sum field in the WMC metric stats Replace single WMC field with class and interface sums Sep 27, 2022
@marco-ballario marco-ballario force-pushed the wmc-sum branch 4 times, most recently from 3042a75 to b180e01 Compare September 28, 2022 08:47
Copy link
Collaborator

@Luni-4 Luni-4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine for me, thank you!

@Luni-4 Luni-4 merged commit f391f31 into mozilla:master Sep 29, 2022
@Luni-4 Luni-4 deleted the wmc-sum branch September 29, 2022 15:19
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.

3 participants