summaryrefslogtreecommitdiff
path: root/ale_linters/python/ruff.vim
diff options
context:
space:
mode:
authorAdam Blackwater <adam@bwtr.net>2023-11-08 21:44:11 +0000
committerGitHub <noreply@github.com>2023-11-08 21:44:11 +0000
commit50e237facda4b9c3761c3f3e9df185cfdf3d91e8 (patch)
treeadf6543d1e9c662e7ac064b196a1b5c764bcd1b2 /ale_linters/python/ruff.vim
parent901d3ff8dd77c03662bc1105ba9964cff063178a (diff)
downloadale-50e237facda4b9c3761c3f3e9df185cfdf3d91e8.zip
Fix: Ruff output option (#4632)
* fix --output-format option * Add conditionally changing flag based on Ruff version
Diffstat (limited to 'ale_linters/python/ruff.vim')
-rw-r--r--ale_linters/python/ruff.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/ale_linters/python/ruff.vim b/ale_linters/python/ruff.vim
index 34db0899..617ef5b7 100644
--- a/ale_linters/python/ruff.vim
+++ b/ale_linters/python/ruff.vim
@@ -46,10 +46,11 @@ function! ale_linters#python#ruff#GetCommand(buffer, version) abort
\ : ''
" NOTE: ruff version `0.0.69` supports liniting input from stdin
+ " NOTE: ruff version `0.1.0` deprecates `--format text`
return ale#Escape(l:executable) . l:exec_args
\ . ale#Pad(ale#Var(a:buffer, 'python_ruff_options'))
- \ . ' --format text'
- \ . (ale#semver#GTE(a:version, [0, 0, 69]) ? ' --stdin-filename %s -' : ' %s')
+ \ . (ale#semver#GTE(a:version, [0, 1, 0]) ? ' --output-format text' : ' --format text')
+ \ . (ale#semver#GTE(a:version, [0, 0, 69]) ? ' --stdin-filename %s -' : ' %s')
endfunction
function! ale_linters#python#ruff#Handle(buffer, lines) abort