@@ -28,13 +28,13 @@ use crate::{
2828use oxc_linter:: LintIgnoreMatcher ;
2929
3030#[ derive( Debug ) ]
31- pub struct LintRunner {
31+ pub struct CliRunner {
3232 options : LintCommand ,
3333 cwd : PathBuf ,
3434 external_linter : Option < ExternalLinter > ,
3535}
3636
37- impl LintRunner {
37+ impl CliRunner {
3838 pub ( crate ) fn new ( options : LintCommand , external_linter : Option < ExternalLinter > ) -> Self {
3939 Self {
4040 options,
@@ -411,7 +411,7 @@ impl LintRunner {
411411 }
412412}
413413
414- impl LintRunner {
414+ impl CliRunner {
415415 const DEFAULT_OXLINTRC : & ' static str = ".oxlintrc.json" ;
416416
417417 #[ must_use]
@@ -618,7 +618,7 @@ fn render_report(handler: &GraphicalReportHandler, diagnostic: &OxcDiagnostic) -
618618mod test {
619619 use std:: { fs, path:: PathBuf } ;
620620
621- use super :: LintRunner ;
621+ use super :: CliRunner ;
622622 use crate :: tester:: Tester ;
623623
624624 // lints the full directory of fixtures,
@@ -988,14 +988,14 @@ mod test {
988988
989989 #[ test]
990990 fn test_init_config ( ) {
991- assert ! ( !fs:: exists( LintRunner :: DEFAULT_OXLINTRC ) . unwrap( ) ) ;
991+ assert ! ( !fs:: exists( CliRunner :: DEFAULT_OXLINTRC ) . unwrap( ) ) ;
992992
993993 let args = & [ "--init" ] ;
994994 Tester :: new ( ) . with_cwd ( "fixtures" . into ( ) ) . test ( args) ;
995995
996- assert ! ( fs:: exists( LintRunner :: DEFAULT_OXLINTRC ) . unwrap( ) ) ;
996+ assert ! ( fs:: exists( CliRunner :: DEFAULT_OXLINTRC ) . unwrap( ) ) ;
997997
998- fs:: remove_file ( LintRunner :: DEFAULT_OXLINTRC ) . unwrap ( ) ;
998+ fs:: remove_file ( CliRunner :: DEFAULT_OXLINTRC ) . unwrap ( ) ;
999999 }
10001000
10011001 #[ test]
@@ -1190,17 +1190,17 @@ mod test {
11901190
11911191 // Test case 1: Invalid path that should fail
11921192 let invalid_config = PathBuf :: from ( "child/../../fixtures/linter/eslintrc.json" ) ;
1193- let result = LintRunner :: find_oxlint_config ( & cwd, Some ( & invalid_config) ) ;
1193+ let result = CliRunner :: find_oxlint_config ( & cwd, Some ( & invalid_config) ) ;
11941194 assert ! ( result. is_err( ) , "Expected config lookup to fail with invalid path" ) ;
11951195
11961196 // Test case 2: Valid path that should pass
11971197 let valid_config = PathBuf :: from ( "fixtures/linter/eslintrc.json" ) ;
1198- let result = LintRunner :: find_oxlint_config ( & cwd, Some ( & valid_config) ) ;
1198+ let result = CliRunner :: find_oxlint_config ( & cwd, Some ( & valid_config) ) ;
11991199 assert ! ( result. is_ok( ) , "Expected config lookup to succeed with valid path" ) ;
12001200
12011201 // Test case 3: Valid path using parent directory (..) syntax that should pass
12021202 let valid_parent_config = PathBuf :: from ( "fixtures/linter/../linter/eslintrc.json" ) ;
1203- let result = LintRunner :: find_oxlint_config ( & cwd, Some ( & valid_parent_config) ) ;
1203+ let result = CliRunner :: find_oxlint_config ( & cwd, Some ( & valid_parent_config) ) ;
12041204 assert ! ( result. is_ok( ) , "Expected config lookup to succeed with parent directory syntax" ) ;
12051205
12061206 // Verify the resolved path is correct
0 commit comments