File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ export interface PreviousExecution {
6161export interface Interpretation {
6262 sourceLocationPrefix : string ;
6363 numTruncatedResults : number ;
64+ numTotalResults : number ;
6465 /**
6566 * sortState being undefined means don't sort, just present results in the order
6667 * they appear in the sarif file.
Original file line number Diff line number Diff line change @@ -494,10 +494,18 @@ export class InterfaceManager extends DisposableObject {
494494 if ( run . results !== undefined )
495495 sortInterpretedResults ( run . results , sortState ) ;
496496 } ) ;
497+
498+ const numTotalResults = ( ( ) => {
499+ if ( sarif . runs . length === 0 ) return 0 ;
500+ if ( sarif . runs [ 0 ] . results === undefined ) return 0 ;
501+ return sarif . runs [ 0 ] . results . length ;
502+ } ) ( ) ;
503+
497504 const interpretation : Interpretation = {
498505 sarif,
499506 sourceLocationPrefix,
500507 numTruncatedResults : 0 ,
508+ numTotalResults,
501509 sortState,
502510 } ;
503511 this . _interpretation = interpretation ;
Original file line number Diff line number Diff line change @@ -50,9 +50,7 @@ function getResultCount(resultSet: ResultSet): number {
5050 case 'RawResultSet' :
5151 return resultSet . schema . tupleCount ;
5252 case 'SarifResultSet' :
53- if ( resultSet . sarif . runs . length === 0 ) return 0 ;
54- if ( resultSet . sarif . runs [ 0 ] . results === undefined ) return 0 ;
55- return resultSet . sarif . runs [ 0 ] . results . length + resultSet . numTruncatedResults ;
53+ return resultSet . numTotalResults ;
5654 }
5755}
5856
You can’t perform that action at this time.
0 commit comments