mohkale / flymake-collection

Collection of checkers for flymake
MIT License
68 stars 13 forks source link

Update `flymake-collection-ruff.el` for `ruff` 0.1.2 #29

Closed ed9w2in6 closed 11 months ago

ed9w2in6 commented 1 year ago

It seems that ruff version 0.1.2 has changed the cli interface.

The correct command should be:

ruff check --output-format=json --stdin-filename=your_file_name < your_file_name.py

That is to change flymake-collection-ruff.el near lines 51 to "check" "--output-format" "json" instead.

  :command `(,ruff-exec
             "check" "--output-format" "json"
             ,@flymake-collection-ruff-args
             ,@(when-let ((file (buffer-file-name flymake-collection-source)))
                 (list "--stdin-filename" file))
             "-")

It works for me.

FYR: https://github.com/mohkale/flymake-collection/blob/fec8be1c53e630b45136ab8714184bf85850c64e/src/checkers/flymake-collection-ruff.el#L50-L55