Flymake plugin to run a linter for python buffers using ruff
Make sure you have at least
ruff
0.1.0
version because there is a breaking change in the output format flag
Clone this repo somewhere, and add this to your config:
(add-to-list 'load-path "path where the repo was cloned")
(require 'flymake-ruff)
(add-hook 'python-mode-hook #'flymake-ruff-load)
(use-package flymake-ruff
:ensure t
:hook (python-mode . flymake-ruff-load))
(use-package flymake-ruff
:straight (flymake-ruff
:type git
:host github
:repo "erickgnavar/flymake-ruff"))
To use flymake-ruff together with eglot, you should add flymake-ruff-load
to
eglot-managed-mode-hook
instead. For example:
(add-hook 'eglot-managed-mode-hook 'flymake-ruff-load)
Or, if you use use-package:
(use-package flymake-ruff
:ensure t
:hook (eglot-managed-mode . flymake-ruff-load))