Skip to content

Commit bbc6797

Browse files
Rename WMC Cyclomatic Complexity field
1 parent a2665ba commit bbc6797

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/metrics/wmc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use crate::*;
1919
/// <https://www.researchgate.net/publication/3187649_Kemerer_CF_A_metric_suite_for_object_oriented_design_IEEE_Trans_Softw_Eng_206_476-493>
2020
#[derive(Debug, Clone, Default)]
2121
pub struct Stats {
22-
cc: f64,
22+
cyclomatic: f64,
2323
class_wmc: f64,
2424
interface_wmc: f64,
2525
class_wmc_sum: f64,
@@ -61,8 +61,8 @@ impl Stats {
6161
// into the `Wmc` metric value of a class or interface
6262
if let Function = other.space_kind {
6363
match self.space_kind {
64-
Class => self.class_wmc += other.cc,
65-
Interface => self.interface_wmc += other.cc,
64+
Class => self.class_wmc += other.cyclomatic,
65+
Interface => self.interface_wmc += other.cyclomatic,
6666
_ => {}
6767
}
6868
}
@@ -142,7 +142,7 @@ impl Wmc for JavaCode {
142142
Function => {
143143
stats.space_kind = space_kind;
144144
// Saves the cyclomatic complexity of the method
145-
stats.cc = cyclomatic.cyclomatic_sum();
145+
stats.cyclomatic = cyclomatic.cyclomatic_sum();
146146
}
147147
Class | Interface | Unit => {
148148
stats.space_kind = space_kind;

0 commit comments

Comments
 (0)