@@ -10,9 +10,9 @@ use tower_lsp_server::{UriExt, lsp_types::Uri};
1010
1111use oxc_allocator:: Allocator ;
1212use oxc_linter:: {
13- AllowWarnDeny , ConfigStore , DisableDirectives , Fix , FixKind , LINTABLE_EXTENSIONS , LintOptions ,
14- LintRunner , LintRunnerBuilder , LintServiceOptions , Linter , Message , PossibleFixes ,
15- RuleCommentType , RuntimeFileSystem , read_to_arena_str, read_to_string,
13+ AllowWarnDeny , ConfigStore , DisableDirectives , ExternalLinter , Fix , FixKind ,
14+ LINTABLE_EXTENSIONS , LintOptions , LintRunner , LintRunnerBuilder , LintServiceOptions , Linter ,
15+ Message , PossibleFixes , RuleCommentType , RuntimeFileSystem , read_to_arena_str, read_to_string,
1616} ;
1717
1818use super :: error_with_position:: {
@@ -68,12 +68,13 @@ impl IsolatedLintHandler {
6868 cwd : & Path ,
6969 lint_options : LintOptions ,
7070 config_store : ConfigStore ,
71+ external_linter : Option < ExternalLinter > ,
7172 options : & IsolatedLintHandlerOptions ,
7273 ) -> Self {
7374 let config_store_clone = config_store. clone ( ) ;
7475 let cwd = cwd. to_string_lossy ( ) . to_string ( ) ;
7576
76- let linter = Linter :: new ( cwd. clone ( ) , lint_options, config_store, None ) ;
77+ let linter = Linter :: new ( cwd. clone ( ) , lint_options, config_store, external_linter ) ;
7778 let mut lint_service_options = LintServiceOptions :: new ( options. root_path . clone ( ) )
7879 . with_cross_module ( options. use_cross_module ) ;
7980
@@ -123,6 +124,7 @@ impl IsolatedLintHandler {
123124 debug ! ( "lint {}" , path. display( ) ) ;
124125 let rope = & Rope :: from_str ( source_text) ;
125126
127+ // ToDO: with external linter, we need a new FS (raw) system
126128 let fs = IsolatedLintHandlerFileSystem :: new ( path. to_path_buf ( ) , Arc :: from ( source_text) ) ;
127129
128130 let mut messages: Vec < DiagnosticReport > = self
0 commit comments