mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
Remove IO based lints from linter benchmark (#7240)
This commit is contained in:
parent
0a07a2ca62
commit
9cb5ce750e
1 changed files with 9 additions and 2 deletions
|
@ -1,7 +1,8 @@
|
|||
use ruff::linter::lint_only;
|
||||
use ruff::settings::rule_table::RuleTable;
|
||||
use ruff::settings::{flags, Settings};
|
||||
use ruff::source_kind::SourceKind;
|
||||
use ruff::RuleSelector;
|
||||
use ruff::{registry::Rule, RuleSelector};
|
||||
use ruff_benchmark::criterion::{
|
||||
criterion_group, criterion_main, BenchmarkGroup, BenchmarkId, Criterion, Throughput,
|
||||
};
|
||||
|
@ -78,8 +79,14 @@ fn benchmark_default_rules(criterion: &mut Criterion) {
|
|||
}
|
||||
|
||||
fn benchmark_all_rules(criterion: &mut Criterion) {
|
||||
let mut rules: RuleTable = RuleSelector::All.into_iter().collect();
|
||||
|
||||
// Disable IO based rules because it is a source of flakiness
|
||||
rules.disable(Rule::ShebangMissingExecutableFile);
|
||||
rules.disable(Rule::ShebangNotExecutable);
|
||||
|
||||
let settings = Settings {
|
||||
rules: RuleSelector::All.into_iter().collect(),
|
||||
rules,
|
||||
..Settings::default()
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue