File tree Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"dependencies" : {
3
- "@hint/formatter-html" : " ^4.1.12 " ,
4
- "@hint/utils" : " ^7.0.0 " ,
3
+ "@hint/formatter-html" : " ^4.1.13 " ,
4
+ "@hint/utils" : " ^7.0.1 " ,
5
5
"@hint/utils-i18n" : " ^1.0.0" ,
6
6
"algoliasearch" : " ^3.35.1" ,
7
7
"applicationinsights" : " ^1.6.0" ,
20
20
},
21
21
"devDependencies" : {
22
22
"@hint/artwork" : " ^2.2.1" ,
23
- "@hint/configuration-all" : " ^2.0.2 " ,
23
+ "@hint/configuration-all" : " ^2.0.3 " ,
24
24
"cross-env" : " ^6.0.3" ,
25
25
"eslint" : " ^6.7.2" ,
26
26
"gulp" : " ^4.0.2" ,
Original file line number Diff line number Diff line change @@ -105,9 +105,6 @@ const processHintResults = async (scanResult) => {
105
105
version : scanResult . webhintVersion
106
106
} ) ;
107
107
108
- result . removeCategory ( 'other' ) ;
109
- result . removeCategory ( 'development' ) ;
110
-
111
108
result . showError = hints . every ( ( hint ) => {
112
109
return hint . messages . length === 1 && hint . messages [ 0 ] . message === 'Error in webhint analyzing this hint' ;
113
110
} ) ;
@@ -125,6 +122,25 @@ const processHintResults = async (scanResult) => {
125
122
}
126
123
} ) ;
127
124
125
+ const categoriesToRemove = [ ] ;
126
+
127
+ for ( const category of result . categories ) {
128
+ const passedCount = category . passed ? category . passed . length : 0 ;
129
+ const hintsCount = category . hints ? category . hints . length : 0 ;
130
+
131
+ /*
132
+ * If there is no hints in the category, add the category
133
+ * to the list of categories to remove.
134
+ */
135
+ if ( passedCount + hintsCount === 0 ) {
136
+ categoriesToRemove . push ( category . name . toLowerCase ( ) ) ;
137
+ }
138
+ }
139
+
140
+ for ( const category of categoriesToRemove ) {
141
+ result . removeCategory ( category ) ;
142
+ }
143
+
128
144
result . id = scanResult . id ;
129
145
result . permalink = `${ webhintUrl } scanner/${ scanResult . id } ` ;
130
146
Original file line number Diff line number Diff line change 205
205
updateAsPass ( category ) ;
206
206
}
207
207
208
- filterNewUpdates ( category ) ;
209
-
210
208
category . hintsToUpdate = filterNewUpdates ( category ) ;
211
209
212
210
updateErrorItems ( category ) ;
You can’t perform that action at this time.
0 commit comments