mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:18 +00:00
Switch to Rust 2024 edition (#18129)
This commit is contained in:
parent
e67b35743a
commit
9ae698fe30
1082 changed files with 4211 additions and 3300 deletions
|
@ -13,11 +13,11 @@ pub(crate) use ruff_settings::RuffSettings;
|
|||
use crate::edit::LanguageId;
|
||||
use crate::workspace::{Workspace, Workspaces};
|
||||
use crate::{
|
||||
edit::{DocumentKey, DocumentVersion, NotebookDocument},
|
||||
PositionEncoding, TextDocument,
|
||||
edit::{DocumentKey, DocumentVersion, NotebookDocument},
|
||||
};
|
||||
|
||||
use super::{settings::ResolvedClientSettings, ClientSettings};
|
||||
use super::{ClientSettings, settings::ResolvedClientSettings};
|
||||
|
||||
mod ruff_settings;
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
use std::collections::BTreeMap;
|
||||
use std::ops::Deref;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
|
||||
use anyhow::Context;
|
||||
use ignore::{WalkBuilder, WalkState};
|
||||
|
||||
use ruff_linter::settings::types::GlobPath;
|
||||
use ruff_linter::{settings::types::FilePattern, settings::types::PreviewMode};
|
||||
use ruff_workspace::Settings;
|
||||
use ruff_workspace::pyproject::find_fallback_target_version;
|
||||
use ruff_workspace::resolver::match_exclusion;
|
||||
use ruff_workspace::Settings;
|
||||
use ruff_workspace::{
|
||||
configuration::{Configuration, FormatConfiguration, LintConfiguration, RuleSelection},
|
||||
pyproject::{find_user_settings_toml, settings_toml},
|
||||
|
|
|
@ -6,9 +6,9 @@ use serde::Deserialize;
|
|||
use serde_json::{Map, Value};
|
||||
use thiserror::Error;
|
||||
|
||||
use ruff_linter::RuleSelector;
|
||||
use ruff_linter::line_width::LineLength;
|
||||
use ruff_linter::rule_selector::ParseError;
|
||||
use ruff_linter::RuleSelector;
|
||||
use ruff_workspace::options::Options;
|
||||
|
||||
/// Maps a workspace URI to its associated client settings. Used during server initialization.
|
||||
|
@ -441,11 +441,7 @@ impl ResolvedClientSettings {
|
|||
*contains_invalid_settings = true;
|
||||
tracing::error!("Unknown rule selectors found in `{key}`: {unknown:?}");
|
||||
}
|
||||
if known.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(known)
|
||||
}
|
||||
if known.is_empty() { None } else { Some(known) }
|
||||
}
|
||||
|
||||
/// Attempts to resolve a setting using a list of available client settings as sources.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue