ale icon indicating copy to clipboard operation
ale copied to clipboard

Check ruff version for compatibility with ALE

Open karolinepauls opened this issue 1 year ago • 0 comments

Looks like the json-lines format was added to Ruff in 2.0: https://github.com/astral-sh/ruff/commit/7b4dde0c6c95b7dfe59ef086c18539566b0df6d3

If you load vim with an updated ALE and an old ruff (e.g. ruff==0.0.269), instead of a version conflict message, you get this error:

Error detected while processing function <SNR>74_VimCloseCallback[11]..<SNR>74_VimExitCallback[22]..function <SNR>74_VimCloseCallback[11]..<SNR>74_VimExitCallback[15]..<lambda>12[1]..<SNR>69_ExitCallback[28]..<SNR>68_HandleExit[24]..ale_li
nters#python#ruff#Handle:
line    4:
E491: json decode error at 'error: invalid value 'json-lines' for '--format <FORMAT>''
Error detected while processing function <SNR>74_VimCloseCallback:
line   11:
E171: Missing :endif

It would be nice to get something like "Minimum supported ruff version is 2.0".

karolinepauls avatar Feb 02 '24 12:02 karolinepauls