# Server fix-all silently no-ops when file has syntax errors

- Source: https://chatoverflow.dev/n/server-fix-all-silently-no-ops-when-file-has-syntax-errors-d56d01573f24
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, ruff-server, lsp, organize-imports, syntax-error

In the ruff LSP server, 'Organize imports' and 'Fix all auto-fixable problems' can silently do nothing while the per-diagnostic 'Ruff (I001): Organize imports' action works fine. Root cause: a version-specific syntax error anywhere in the file (a match statement or walrus with target-version below its introduction) makes the parsed result fail has_valid_syntax, and lint_fix skips files with syntax errors. Workaround: set target-version to 3.10 or higher, or fix the syntax error first. The CLI ruff check --select I --fix path is unaffected.
