mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
When ruff version is >=0.5.0 use 'ruff check <path>' instead of 'ruff <path>' (#4802)
This commit is contained in:
@@ -50,6 +50,11 @@ function! ale#fixers#ruff#FixForVersion(buffer, version) abort
|
||||
call extend(l:cmd, ['run', 'ruff'])
|
||||
endif
|
||||
|
||||
" NOTE: ruff 0.5.0 removes `ruff <path>` in favor of `ruff check <path>`
|
||||
if ale#semver#GTE(a:version, [0, 5, 0])
|
||||
call extend(l:cmd, ['check'])
|
||||
endif
|
||||
|
||||
let l:options = ale#Var(a:buffer, 'python_ruff_options')
|
||||
|
||||
if !empty(l:options)
|
||||
|
||||
Reference in New Issue
Block a user