mirror of
https://github.com/astral-sh/ruff.git
synced 2025-12-02 08:55:47 +00:00
refactor: Replace Vec in options metadata with static array (#3433)
This commit is contained in:
parent
1e081cf9a6
commit
cc8b13d3a7
7 changed files with 204 additions and 81 deletions
|
|
@ -10,7 +10,6 @@ use strum::IntoEnumIterator;
|
|||
|
||||
use ruff::registry::{Linter, Rule, RuleNamespace};
|
||||
use ruff::settings::options::Options;
|
||||
use ruff::settings::options_base::ConfigurationOptions;
|
||||
use ruff_diagnostics::Availability;
|
||||
|
||||
use crate::ROOT_DIR;
|
||||
|
|
@ -92,7 +91,7 @@ fn process_documentation(documentation: &str, out: &mut String) {
|
|||
let option = rest.trim_end().trim_end_matches('`');
|
||||
|
||||
assert!(
|
||||
Options::get(Some(option)).is_some(),
|
||||
Options::metadata().get(option).is_some(),
|
||||
"unknown option {option}"
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue