mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-30 00:01:50 +00:00
## Summary This PR fixes a silent failure that manifested itself in https://github.com/astral-sh/ruff-vscode/issues/238. In short, if the user provided invalid arguments to Ruff in the VS Code extension (like `"ruff.args": ["a"]`), then we generated something like the following command: ```console /path/to/ruff --force-exclude --no-cache --no-fix --format json - --fix a --stdin-filename /path/to/file.py ``` Since this contains both `-` and `a` as the "input files", Ruff would treat this as if we're linting the files names `-` and `a`, rather than linting standard input. This PR modifies out standard input detection to force standard input when `--stdin-filename` is present, or at least one file is `-`. (We then warn and ignore the others.) |
||
|---|---|---|
| .. | ||
| resources/test/fixtures | ||
| src | ||
| tests | ||
| Cargo.toml | ||