File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1597,6 +1597,27 @@ fn main() {
15971597 if let Err ( err) = add_rules_entry ( & context, rule_kind) {
15981598 eprintln ! ( "failed to add {rule_name} to rules file: {err}" ) ;
15991599 }
1600+
1601+ if let Err ( err) = generate_rule_runner_impl ( ) {
1602+ eprintln ! ( "failed to generate RuleRunner impl for {rule_name}: {err}" ) ;
1603+ }
1604+ }
1605+
1606+ fn generate_rule_runner_impl ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
1607+ use std:: process:: { Command , Stdio } ;
1608+
1609+ println ! ( "Generating RuleRunner impl..." ) ;
1610+ let output = Command :: new ( "cargo" )
1611+ . args ( [ "run" , "-p" , "oxc_linter_codegen" ] )
1612+ . stdout ( Stdio :: inherit ( ) )
1613+ . stderr ( Stdio :: inherit ( ) )
1614+ . output ( ) ?;
1615+
1616+ if !output. status . success ( ) {
1617+ return Err ( "Failed to run oxc_linter_codegen" . into ( ) ) ;
1618+ }
1619+
1620+ Ok ( ( ) )
16001621}
16011622
16021623fn get_mod_name ( rule_kind : RuleKind ) -> String {
You can’t perform that action at this time.
0 commit comments