From 24b848a4ea09b5bd3faca3580a0907711c1c1bbd Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Mon, 11 Sep 2023 14:09:33 -0500 Subject: [PATCH] Enable preview mode during benchmarks (#7208) Split out of https://github.com/astral-sh/ruff/pull/7195 so benchmark changes from enabling additional rules can be reviewed separately. --- crates/ruff_benchmark/benches/linter.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/ruff_benchmark/benches/linter.rs b/crates/ruff_benchmark/benches/linter.rs index d20f21b72b0ca..91e77850e46dd 100644 --- a/crates/ruff_benchmark/benches/linter.rs +++ b/crates/ruff_benchmark/benches/linter.rs @@ -1,6 +1,5 @@ use ruff::linter::lint_only; use ruff::settings::rule_table::RuleTable; -use ruff::settings::types::PreviewMode; use ruff::settings::{flags, Settings}; use ruff::source_kind::SourceKind; use ruff::{registry::Rule, RuleSelector}; @@ -80,7 +79,7 @@ fn benchmark_default_rules(criterion: &mut Criterion) { } fn benchmark_all_rules(criterion: &mut Criterion) { - let mut rules: RuleTable = RuleSelector::All.rules(PreviewMode::Disabled).collect(); + let mut rules: RuleTable = RuleSelector::All.all_rules().collect(); // Disable IO based rules because it is a source of flakiness rules.disable(Rule::ShebangMissingExecutableFile);