@@ -39,7 +39,7 @@ pub struct CliLinterOptions {
39
39
pub configured_rules : ConfiguredRules ,
40
40
pub fix : bool ,
41
41
pub deno_lint_config : DenoLintConfig ,
42
- pub maybe_plugin_runner : Option < Arc < Mutex < PluginHostProxy > > > ,
42
+ pub maybe_plugin_runner : Option < Arc < PluginHostProxy > > ,
43
43
}
44
44
45
45
#[ derive( Debug ) ]
@@ -48,7 +48,7 @@ pub struct CliLinter {
48
48
package_rules : Vec < Box < dyn PackageLintRule > > ,
49
49
linter : DenoLintLinter ,
50
50
deno_lint_config : DenoLintConfig ,
51
- maybe_plugin_runner : Option < Arc < Mutex < PluginHostProxy > > > ,
51
+ maybe_plugin_runner : Option < Arc < PluginHostProxy > > ,
52
52
}
53
53
54
54
impl CliLinter {
@@ -368,28 +368,25 @@ fn apply_lint_fixes(
368
368
}
369
369
370
370
fn run_plugins (
371
- plugin_runner : Arc < Mutex < PluginHostProxy > > ,
371
+ plugin_runner : Arc < PluginHostProxy > ,
372
372
parsed_source : ParsedSource ,
373
373
file_path : PathBuf ,
374
374
maybe_token : Option < CancellationToken > ,
375
375
) -> Result < ExternalLinterResult , AnyError > {
376
376
let source_text_info = parsed_source. text_info_lazy ( ) . clone ( ) ;
377
377
let plugin_info = plugin_runner
378
- . lock ( )
379
378
. get_plugin_rules ( )
380
379
. into_iter ( )
381
380
. map ( Cow :: from)
382
381
. collect ( ) ;
383
382
384
- #[ allow( clippy:: await_holding_lock) ]
385
383
let fut = async move {
386
- let mut plugin_runner = plugin_runner. lock ( ) ;
387
384
let utf16_map = Utf16Map :: new ( parsed_source. text ( ) . as_ref ( ) ) ;
388
385
let serialized_ast =
389
386
plugin_runner. serialize_ast ( & parsed_source, & utf16_map) ?;
390
387
391
388
plugins:: run_rules_for_ast (
392
- & mut plugin_runner,
389
+ & plugin_runner,
393
390
& file_path,
394
391
serialized_ast,
395
392
source_text_info,
@@ -415,7 +412,7 @@ struct ExternalLinterContainer {
415
412
416
413
impl ExternalLinterContainer {
417
414
pub fn new (
418
- maybe_plugin_runner : Option < Arc < Mutex < PluginHostProxy > > > ,
415
+ maybe_plugin_runner : Option < Arc < PluginHostProxy > > ,
419
416
maybe_token : Option < CancellationToken > ,
420
417
) -> Self {
421
418
let mut s = Self {
0 commit comments