-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Summary
I found this while helping on #19550. When running check in watch mode with a non-full output-format, this error:
warning: `--output-format full` is always used in watch mode.
Does not get displayed due to the terminal being cleared directly after. Here's the contents of out.txt I get when running uvx ruff check --watch . --output-format json 2>&1 > out.txt:
warning: `--output-format full` is always used in watch mode.
�[H�[2J�[3J[23:04:31 PM] Starting linter in watch mode...
[23:04:31 PM] Found 7 errors. Watching for file changes.
... normal error output here
I assume �[H�[2J�[3J is the magic characters that cause a terminal clear in PowerShell, which shows that it's erasing the warning. This should be fixable by clearing the terminal prior to warnings being output, though I haven't looked at the code to see how easy it would be.
Also just a side tangent thought, but it might be better if the error said concise instead of full, since it definitely does not give the same output as non-watch check on full.
Version
ruff 0.12.5 (d13228a 2025-07-24)