File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export class HarAnalyzer {
9494 'url' : url ,
9595 'group' : group ,
9696 'issues' : [ ] ,
97- 'resolved' : [ ]
97+ 'resolved-rules ' : [ ]
9898 } ;
9999
100100 if ( analyzedData === undefined ) {
@@ -130,11 +130,10 @@ export class HarAnalyzer {
130130 const lintResults = await Promise . all ( lintPromises ) ;
131131 knowledgeData . issues = lintResults . flat ( ) ;
132132
133- // Sort the warnings by severity: "error" first, then "warning"
134- // const severityOrder = { error: 1, warning: 2 };
135- // knowledgeData.issues.sort((a, b) => {
136- // return severityOrder[a.warning.severity] - severityOrder[b.warning.severity];
137- // });
133+ // Populate "resolved-rules" with rules not mentioned in "issues"
134+ const allRules = Object . keys ( this . config . rules ) ;
135+ const mentionedRules = new Set ( knowledgeData . issues . map ( issue => issue . rule ) ) ;
136+ knowledgeData [ 'resolved-rules' ] = allRules . filter ( rule => ! mentionedRules . has ( rule ) ) ;
138137 } catch ( err ) {
139138 }
140139
You can’t perform that action at this time.
0 commit comments