Skip to content

Commit 0132248

Browse files
CodeMan62ntBre
authored andcommitted
Remove deprecated macOS config file discovery (#19210)
## Summary In #11115 we moved from defaulting to $HOME/Library/Application Support to $XDG_HOME on macOS and added a deprecation warning if we find files in the old location. So this PR removes the warning closes #19145 ## Test Plan Ran `cargo test`
1 parent 079089c commit 0132248

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

crates/ruff_workspace/src/pyproject.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ pub fn find_fallback_target_version<P: AsRef<Path>>(path: P) -> Option<PythonVer
114114
#[cfg(not(target_arch = "wasm32"))]
115115
pub fn find_user_settings_toml() -> Option<PathBuf> {
116116
use etcetera::BaseStrategy;
117-
use ruff_linter::warn_user_once;
118117

119118
let strategy = etcetera::base_strategy::choose_base_strategy().ok()?;
120119
let config_dir = strategy.config_dir().join("ruff");
@@ -127,23 +126,6 @@ pub fn find_user_settings_toml() -> Option<PathBuf> {
127126
}
128127
}
129128

130-
// On macOS, we used to support reading from `/Users/Alice/Library/Application Support`.
131-
if cfg!(target_os = "macos") {
132-
let strategy = etcetera::base_strategy::Apple::new().ok()?;
133-
let deprecated_config_dir = strategy.data_dir().join("ruff");
134-
135-
for file in [".ruff.toml", "ruff.toml", "pyproject.toml"] {
136-
let path = deprecated_config_dir.join(file);
137-
if path.is_file() {
138-
warn_user_once!(
139-
"Reading configuration from `~/Library/Application Support` is deprecated. Please move your configuration to `{}/{file}`.",
140-
config_dir.display(),
141-
);
142-
return Some(path);
143-
}
144-
}
145-
}
146-
147129
None
148130
}
149131

0 commit comments

Comments
 (0)