Commit 744aaee
authored
Reset
## Summary
fixes: #741
## Test Plan
`settings.json`:
```json
{
"ruff.configuration": "${workspaceFolder}/formatter/ruff.toml"
}
```
"Ruff" output channel:
> [!NOTE]
>
> I've only kept the necessary settings here but the actual log output
includes everything
```
2025-05-01 10:38:43.029 [info] Workspace settings for /Users/dhruv/playground/ruff: {
"nativeServer": "on",
"cwd": "/Users/dhruv/playground/ruff",
"workspace": "file:///Users/dhruv/playground/ruff",
"path": [
"/Users/dhruv/work/astral/ruff/target/debug/ruff"
],
"configuration": "/Users/dhruv/playground/ruff/formatter/ruff.toml",
}
2025-05-01 10:38:43.030 [info] Resetting 'ruff.configuration' to null in global settings because it contains workspace specific variables
2025-05-01 10:38:43.030 [info] Global settings: {
"nativeServer": "on",
"cwd": "/",
"workspace": "/",
"path": [
"/Users/dhruv/work/astral/ruff/target/debug/ruff"
],
"configuration": null,
}
```
`settings.json`:
```json
{
"ruff.configuration": "${workspaceFolder:root}/formatter/ruff.toml"
}
```
"Ruff" output channel:
```
2025-05-01 10:40:42.200 [info] Workspace settings for /Users/dhruv/playground/ruff: {
"nativeServer": "on",
"cwd": "/Users/dhruv/playground/ruff",
"workspace": "file:///Users/dhruv/playground/ruff",
"path": [
"/Users/dhruv/work/astral/ruff/target/debug/ruff"
],
"configuration": "${workspaceFolder:root}/formatter/ruff.toml",
}
2025-05-01 10:40:42.200 [info] Resetting 'ruff.configuration' to null in global settings because it contains workspace specific variables
2025-05-01 10:40:42.200 [info] Global settings: {
"nativeServer": "on",
"cwd": "/",
"workspace": "/",
"path": [
"/Users/dhruv/work/astral/ruff/target/debug/ruff"
],
"configuration": null,
}
```
For this specific test case, you can see that the workspace settings
also includes the `${workspaceFolder:root}` because it doesn't exists.
That would also create an error:
```
2025-05-01 10:42:14.245925000 ERROR Failed to load settings from `configuration`: error looking key 'workspaceFolder:root' up: environment variable not found
```
I think we should handle that as well.ruff.configuration if it contains VS Code variables (#746)1 parent ec180ab commit 744aaee
1 file changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
199 | 210 | | |
200 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
201 | 221 | | |
202 | 222 | | |
203 | 223 | | |
204 | 224 | | |
205 | 225 | | |
206 | 226 | | |
207 | 227 | | |
208 | | - | |
| 228 | + | |
209 | 229 | | |
210 | 230 | | |
211 | 231 | | |
| |||
0 commit comments