File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ fn lint_inner(
155
155
if let Some ( lint_root_type) = lint. root_type {
156
156
if lint_root_type != root_type {
157
157
skipped += 1 ;
158
+ continue ;
158
159
}
159
160
}
160
161
@@ -546,14 +547,15 @@ mod tests {
546
547
let mut out = Vec :: new ( ) ;
547
548
let root_type = RootType :: Running ;
548
549
let r = lint_inner ( root, root_type, & mut out) . unwrap ( ) ;
549
- assert_eq ! ( r. passed, LINTS . len( ) ) ;
550
+ let allbut_one = LINTS . len ( ) . checked_sub ( 1 ) . unwrap ( ) ;
551
+ assert_eq ! ( r. passed, allbut_one) ;
550
552
assert_eq ! ( r. fatal, 0 ) ;
551
553
assert_eq ! ( r. skipped, 1 ) ;
552
554
assert_eq ! ( r. warnings, 0 ) ;
553
555
root. create_dir_all ( "var/run/foo" ) ?;
554
556
let mut out = Vec :: new ( ) ;
555
557
let r = lint_inner ( root, root_type, & mut out) . unwrap ( ) ;
556
- assert_eq ! ( r. passed, LINTS . len ( ) . checked_sub( 1 ) . unwrap( ) ) ;
558
+ assert_eq ! ( r. passed, allbut_one . checked_sub( 1 ) . unwrap( ) ) ;
557
559
assert_eq ! ( r. fatal, 1 ) ;
558
560
assert_eq ! ( r. skipped, 1 ) ;
559
561
assert_eq ! ( r. warnings, 0 ) ;
You can’t perform that action at this time.
0 commit comments