-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed Ruff runs should be displayed as errors, not raised as IDE exception #294
Comments
@lensvol
I agree with your observation. It would be great if you could create a PR to address this. However, before that, I have one concern. How would the plugin behave if the user is in the middle of editing the toml file and ruff gets executed, resulting in an error? Would it not become a nuisance alert for the user? |
I do not see how that specific scenario is possible when editing TOML in the IDE, honestly. As far as I can see, Ruff binary will only get called in the following situations:
Cases 2 and 3 have safeguards in the form of Speaking more broadly, Ruff execution errors could also be reported via notification balloon instead of a modal pop-up. |
@lensvol
I prefer a notificaiton ballon :) |
This would actually be highly based if the plugin could run on [tool.ruff]
target-version = "py312"
asdf = true
So we could show the error in the toml file: [tool.ruff] # ruff failed: unknown field `asdf`
target-version = "py312"
asdf = true
|
Could I suggest a file level banner error over a balloon notification, I fell it would be better suited. |
Describe the bug
When the plugin calls ruff binary and it exits with an unexpected error (e.g. there is a typo in
ruff.toml
), the user will not get notified about that, but instead, an IDE exception is being raised. Since those are not easy to find (small red icon in the right corner) and require you to parse Kotlin traceback message with your eyes it is difficult to debug the exact cause of an error.To Reproduce
Steps to reproduce the behavior:
ruff.toml
with the following contents:Expected behavior
A pop-up that relays the exact error message produced by failed ruff run.
Environments (please complete the following information):
If you agree that this is a valid issue but don't have time to work on it, I can make a PR for that.
The text was updated successfully, but these errors were encountered: