Skip to content

Commit

Permalink
Enable preview mode during benchmarks (#7208)
Browse files Browse the repository at this point in the history
Split out of #7195 so benchmark
changes from enabling additional rules can be reviewed separately.
  • Loading branch information
zanieb authored Sep 11, 2023
1 parent 773ba5f commit 24b848a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/ruff_benchmark/benches/linter.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 24b848a

Please sign in to comment.