Skip to content

Commit f90d3e1

Browse files
committed
refactor(linter): feature gate load_external_plugin by both oxlint2 and disable_oxlint2 features (#12141)
Follow-on after #11980. Prevent this function being compiled in `oxc_linter` tests. It should be unreachable anyway.
1 parent 407429a commit f90d3e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/oxc_linter/src/config/config_builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ impl ConfigStoreBuilder {
385385
serde_json::to_string_pretty(&oxlintrc).unwrap()
386386
}
387387

388-
#[cfg(not(feature = "oxlint2"))]
388+
#[cfg(any(not(feature = "oxlint2"), feature = "disable_oxlint2"))]
389389
fn load_external_plugin(
390390
_oxlintrc_path: &Path,
391391
_plugin_name: &str,
@@ -395,7 +395,7 @@ impl ConfigStoreBuilder {
395395
Err(ConfigBuilderError::NoExternalLinterConfigured)
396396
}
397397

398-
#[cfg(feature = "oxlint2")]
398+
#[cfg(all(feature = "oxlint2", not(feature = "disable_oxlint2")))]
399399
fn load_external_plugin(
400400
oxlintrc_path: &Path,
401401
plugin_name: &str,

0 commit comments

Comments
 (0)