koxudaxi / ruff-pycharm-plugin

PyCharm plugin for ruff. This plugin provides reformat code using ruff.
MIT License
184 stars 7 forks source link

ruff-lsp is run with unknown arguments #339

Closed elmuz closed 3 months ago

elmuz commented 7 months ago

Describe the bug IDE reports a bad usage of ruff-lsp. In particular it says:

ruff-lsp: error: unrecognized arguments: --exit-zero --no-cache --force-exclude --fix --stdin-filename tests/utils/test_evaluation.py --config /home/alessio/.local/share/ruff/ruff.toml -

This is the stack trace

Error Running Ruff
    at com.koxudaxi.ruff.RuffKt.runCommand(Ruff.kt:257)
    at com.koxudaxi.ruff.RuffKt.runCommand(Ruff.kt:196)
    at com.koxudaxi.ruff.RuffKt.runRuff(Ruff.kt:335)
    at com.koxudaxi.ruff.RuffKt.runRuff(Ruff.kt:282)
    at com.koxudaxi.ruff.RuffApplyService.apply$lambda$2(RuffApplyService.kt:48)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:249)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:840)

Environments (please complete the following information):

koxudaxi commented 7 months ago

@elmuz I'm sorry for my late reply. I guess the plugin detects ruff-lsp command as ruff command 🤔 Could you please share the configuration of the ruff-pycharm settings?

koxudaxi commented 3 months ago

@elmuz the problem has been resolved in v0.0.32 https://github.com/koxudaxi/ruff-pycharm-plugin/pull/409