File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -191,14 +191,12 @@ impl Linter {
191191 let rule = * rule;
192192 // Collect node type information for rules. In large files, benchmarking showed it was worth
193193 // collecting rules into buckets by AST node type to avoid iterating over all rules for each node.
194- if rule. should_run ( & ctx_host) {
195- if let Some ( ast_types) = rule. types_info ( ) {
196- for ty in ast_types {
197- rules_by_ast_type[ ty as usize ] . push ( ( rule, ctx) ) ;
198- }
199- } else {
200- rules_any_ast_type. push ( ( rule, ctx) ) ;
194+ if let Some ( ast_types) = rule. types_info ( ) {
195+ for ty in ast_types {
196+ rules_by_ast_type[ ty as usize ] . push ( ( rule, ctx) ) ;
201197 }
198+ } else {
199+ rules_any_ast_type. push ( ( rule, ctx) ) ;
202200 }
203201
204202 rule. run_once ( ctx) ;
You can’t perform that action at this time.
0 commit comments