File tree Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Original file line number Diff line number Diff line change 110
110
left : auto;
111
111
}
112
112
113
+ <!- - TODO - - >
113
114
# version-filter-count {
114
115
display : none;
115
116
}
291
292
border : 1px solid var (--theme-popup-border );
292
293
}
293
294
294
- # version-filter-selector .item {
295
+ # version-filter-selector .checkbox {
295
296
display : flex;
296
297
}
297
298
@@ -440,14 +441,14 @@ <h1>Clippy Lints</h1>
440
441
< span class ="caret "> </ span >
441
442
</ button >
442
443
< ul id ="version-filter-selector " class ="dropdown-menu ">
443
- < li class ="item ">
444
+ < li class ="checkbox ">
444
445
< label ng-click ="clearVersionFilters() ">
445
446
< input type ="checkbox " class ="invisible " />
446
447
Clear filters
447
448
</ label >
448
449
</ li >
449
450
< li role ="separator " class ="divider "> </ li >
450
- < li class ="item " ng-repeat ="(filter, vars) in versionFilters ">
451
+ < li class ="checkbox " ng-repeat ="(filter, vars) in versionFilters ">
451
452
< label ng-attr-for ="filter-{filter} "> {{filter}}</ label >
452
453
< span > 1.</ span >
453
454
< input type ="number "
Original file line number Diff line number Diff line change 185
185
// 1.29.0 and greater
186
186
if ( minorVersion && minorVersion > 28 ) {
187
187
$scope . versionFilters [ filter ] . enabled = true ;
188
+ continue ;
188
189
}
189
190
190
191
$scope . versionFilters [ filter ] . enabled = false ;
201
202
let lintVersion = lint . version . startsWith ( "pre " ) ? lint . version . substring ( 4 , lint . version . length ) : lint . version ;
202
203
let lintMinorVersion = lintVersion . substring ( 2 , 4 ) ;
203
204
204
- let result ;
205
205
switch ( filter ) {
206
+ // "=" gets the highest priority, since all filters are inclusive
207
+ case "=" :
208
+ return ( lintMinorVersion == minorVersion ) ;
206
209
case "≥" :
207
- result = ( lintMinorVersion >= minorVersion ) ;
210
+ if ( lintMinorVersion < minorVersion ) { return false ; }
208
211
break ;
209
212
case "≤" :
210
- result = ( lintMinorVersion <= minorVersion ) ;
213
+ if ( lintMinorVersion > minorVersion ) { return false ; }
211
214
break ;
212
- // "=" gets the highest priority, since all filters are inclusive
213
- case "=" :
214
- return ( lintMinorVersion == minorVersion ) ;
215
215
default :
216
216
return true
217
217
}
218
218
219
- if ( ! result ) {
220
- return false ;
221
- }
222
-
223
219
let cmpFilter ;
224
220
if ( filter === "≥" ) {
225
221
cmpFilter = "≤" ;
229
225
230
226
if ( filters [ cmpFilter ] . enabled ) {
231
227
let cmpMinorVersion = filters [ cmpFilter ] . minorVersion ;
232
- result = ( cmpFilter === "≥" ) ? ( lintMinorVersion >= cmpMinorVersion ) : ( lintMinorVersion <= cmpMinorVersion ) ;
228
+ return ( cmpFilter === "≥" ) ? ( lintMinorVersion >= cmpMinorVersion ) : ( lintMinorVersion <= cmpMinorVersion ) ;
233
229
}
234
230
235
- return result ;
231
+ return true ;
236
232
}
237
233
}
238
234
You can’t perform that action at this time.
0 commit comments