Skip to content

Commit 090767f

Browse files
Add minimum and maximum implementation for Nom (#716)
* Add fields closures_sum and functions_sum , refactored code to be complaint with the changes * Add minimum and maximum implementation for Nom metric
1 parent 58b0ac2 commit 090767f

File tree

3 files changed

+204
-63
lines changed

3 files changed

+204
-63
lines changed

rust-code-analysis-web/src/web/server.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ mod tests {
650650
"n1": 2.0,
651651
"volume": 4.754_887_502_163_468},
652652
"loc": {"cloc": 1.0, "ploc": 2.0, "lloc": 1.0, "sloc": 4.0, "blank": 1.0},
653-
"nom": {"functions": 1.0, "closures": 0.0, "total": 1.0},
653+
"nom": {"functions": 1.0, "closures": 0.0, "total": 1.0, "closures_min": 0.0, "closures_max": 0.0, "functions_min": 0.0, "functions_max": 1.0},
654654
"mi": {"mi_original": 139.974_331_558_152_1,
655655
"mi_sei": 161.414_455_240_662_22,
656656
"mi_visual_studio": 81.856_334_244_533_39}},
@@ -677,7 +677,7 @@ mod tests {
677677
"n1": 2.0,
678678
"volume": 4.754_887_502_163_468},
679679
"loc": {"cloc": 0.0, "ploc": 2.0, "lloc": 1.0, "sloc": 2.0, "blank": 0.0},
680-
"nom": {"functions": 1.0, "closures": 0.0, "total": 1.0},
680+
"nom": {"functions": 1.0, "closures": 0.0, "total": 1.0, "closures_min": 0.0, "closures_max": 0.0, "functions_min": 1.0, "functions_max": 1.0},
681681
"mi": {"mi_original": 151.433_315_883_223_23,
682682
"mi_sei": 142.873_061_717_489_78,
683683
"mi_visual_studio": 88.557_494_668_551_6}},
@@ -730,7 +730,7 @@ mod tests {
730730
"n1": 2.0,
731731
"volume": 4.754_887_502_163_468},
732732
"loc": {"cloc": 0.0, "ploc": 2.0, "lloc": 1.0, "sloc": 2.0, "blank": 0.0},
733-
"nom": {"functions": 1.0, "closures": 0.0, "total": 1.0},
733+
"nom": {"functions": 1.0, "closures": 0.0, "total": 1.0, "closures_min": 0.0, "closures_max": 0.0, "functions_min": 0.0, "functions_max": 1.0},
734734
"mi": {"mi_original": 151.203_315_883_223_2,
735735
"mi_sei": 142.643_061_717_489_76,
736736
"mi_visual_studio": 88.422_991_744_574_97}},
@@ -779,7 +779,7 @@ mod tests {
779779
"n1": 2.0,
780780
"volume": 4.754_887_502_163_468},
781781
"loc": {"cloc": 0.0, "ploc": 2.0, "lloc": 1.0, "sloc": 2.0, "blank": 0.0},
782-
"nom": {"functions": 1.0, "closures": 0.0, "total": 1.0},
782+
"nom": {"functions": 1.0, "closures": 0.0, "total": 1.0, "closures_min": 0.0, "closures_max": 0.0, "functions_min": 0.0, "functions_max": 1.0},
783783
"mi": {"mi_original": 151.203_315_883_223_2,
784784
"mi_sei": 142.643_061_717_489_76,
785785
"mi_visual_studio": 88.422_991_744_574_97}},
@@ -806,7 +806,7 @@ mod tests {
806806
"n1": 2.0,
807807
"volume": 4.754_887_502_163_468},
808808
"loc": {"cloc": 0.0, "ploc": 2.0, "lloc": 1.0, "sloc": 2.0, "blank": 0.0},
809-
"nom": {"functions": 1.0, "closures": 0.0, "total": 1.0},
809+
"nom": {"functions": 1.0, "closures": 0.0, "total": 1.0, "closures_min": 0.0, "closures_max": 0.0, "functions_min": 1.0, "functions_max": 1.0},
810810
"mi": {"mi_original": 151.433_315_883_223_23,
811811
"mi_sei": 142.873_061_717_489_78,
812812
"mi_visual_studio": 88.557_494_668_551_6}},

0 commit comments

Comments
 (0)