mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
Rename format
option to output-format
(#7514)
This commit is contained in:
parent
0a167dd20b
commit
bb4f7c681a
10 changed files with 83 additions and 44 deletions
|
@ -13,9 +13,9 @@ use log::debug;
|
|||
use path_absolutize::path_dedot;
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
|
||||
use ruff_linter::fs;
|
||||
use ruff_linter::packaging::is_package;
|
||||
use ruff_linter::settings::{AllSettings, Settings};
|
||||
use ruff_linter::{fs, warn_user_once};
|
||||
|
||||
use crate::configuration::Configuration;
|
||||
use crate::pyproject;
|
||||
|
@ -221,6 +221,11 @@ fn resolve_configuration(
|
|||
// Resolve the current path.
|
||||
let options = pyproject::load_options(&path)
|
||||
.map_err(|err| anyhow!("Failed to parse `{}`: {}", path.display(), err))?;
|
||||
|
||||
if options.format.is_some() {
|
||||
warn_user_once!("The option `format` has been deprecated to avoid ambiguity with Ruff's upcoming formatter. Use `format-output` instead.");
|
||||
}
|
||||
|
||||
let project_root = relativity.resolve(&path);
|
||||
let configuration = Configuration::from_options(options, &project_root)?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue