@@ -83,42 +83,42 @@ class CoverageMetrics {
8383 }
8484 }
8585
86- return records.fold <CoverageMetrics >(
87- const CoverageMetrics () ,
88- (current, record) {
89- final found = record.lines ? .found ?? 0 ;
90- final hit = record.lines? .hit ?? 0 ;
91- if (globs.isNotEmpty && record.file != null ) {
92- for ( final glob in globs ) {
93- if (glob. matches (record.file ! )) return current;
94- }
86+ return records.fold <CoverageMetrics >(const CoverageMetrics (), (
87+ current ,
88+ record,
89+ ) {
90+ final found = record.lines? .found ?? 0 ;
91+ final hit = record.lines ? .hit ?? 0 ;
92+ if (globs.isNotEmpty && record.file != null ) {
93+ for ( final glob in globs) {
94+ if (glob. matches (record.file ! )) return current;
9595 }
96+ }
9697
97- final file = record.file;
98- final details = record.lines? .details;
99- final uncoveredLines = Map <String , List <int >>.from (
100- current.uncoveredLines,
101- );
102-
103- if (file != null && details != null ) {
104- for (final line in details) {
105- if ((line.hit ?? 1 ) == 0 && line.line != null ) {
106- uncoveredLines.update (
107- file,
108- (lines) => [...lines, line.line! ],
109- ifAbsent: () => [line.line! ],
110- );
111- }
98+ final file = record.file;
99+ final details = record.lines? .details;
100+ final uncoveredLines = Map <String , List <int >>.from (
101+ current.uncoveredLines,
102+ );
103+
104+ if (file != null && details != null ) {
105+ for (final line in details) {
106+ if ((line.hit ?? 1 ) == 0 && line.line != null ) {
107+ uncoveredLines.update (
108+ file,
109+ (lines) => [...lines, line.line! ],
110+ ifAbsent: () => [line.line! ],
111+ );
112112 }
113113 }
114+ }
114115
115- return CoverageMetrics (
116- totalFound: current.totalFound + found,
117- totalHits: current.totalHits + hit,
118- uncoveredLines: uncoveredLines,
119- );
120- },
121- );
116+ return CoverageMetrics (
117+ totalFound: current.totalFound + found,
118+ totalHits: current.totalHits + hit,
119+ uncoveredLines: uncoveredLines,
120+ );
121+ });
122122 }
123123
124124 /// Total number of lines hit (covered) across all included files.
0 commit comments