File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -62,21 +62,16 @@ predicate extractorDiagnostics(string key, int value) {
62
62
*/
63
63
64
64
predicate extractorTotalDiagnostics ( string key , int value ) {
65
- exists ( string extractor |
65
+ exists ( string extractor , string limitRegex |
66
+ limitRegex = "Total of ([0-9]+) diagnostics \\(reached limit of ([0-9]+)\\).*" and
66
67
key = "Total number of diagnostics from " + extractor and
67
68
value =
68
69
strictcount ( Diagnostic d | d .getGeneratedBy ( ) = extractor ) +
69
70
sum ( Diagnostic d |
70
71
d .getGeneratedBy ( ) = extractor
71
72
|
72
- d .getMessage ( )
73
- .regexpCapture ( "Total of ([0-9]+) diagnostics \\(reached limit of ([0-9]+)\\).*" ,
74
- 1 )
75
- .toInt ( ) -
76
- d .getMessage ( )
77
- .regexpCapture ( "Total of ([0-9]+) diagnostics \\(reached limit of ([0-9]+)\\).*" ,
78
- 2 )
79
- .toInt ( ) - 1
73
+ d .getMessage ( ) .regexpCapture ( limitRegex , 1 ) .toInt ( ) -
74
+ d .getMessage ( ) .regexpCapture ( limitRegex , 2 ) .toInt ( ) - 1
80
75
)
81
76
)
82
77
}
You can’t perform that action at this time.
0 commit comments