From 901d3ff8dd77c03662bc1105ba9964cff063178a Mon Sep 17 00:00:00 2001 From: Julian Gong Date: Sun, 5 Nov 2023 12:22:41 -0600 Subject: [PATCH 1/2] Fix a typo in README.md (#4647) Co-authored-by: Julian Gong --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a9d111ab68..683cbc66be 100644 --- a/README.md +++ b/README.md @@ -233,7 +233,7 @@ See `:help ale-symbol-search` for more information. ### Refactoring: Rename, Actions -ALE supports renaming symbols in symbols in code such as variables or class +ALE supports renaming symbols in code such as variables or class names with the `ALERename` command. `ALEFileRename` will rename file and fix import paths (tsserver From 50e237facda4b9c3761c3f3e9df185cfdf3d91e8 Mon Sep 17 00:00:00 2001 From: Adam Blackwater Date: Wed, 8 Nov 2023 21:44:11 +0000 Subject: [PATCH 2/2] Fix: Ruff output option (#4632) * fix --output-format option * Add conditionally changing flag based on Ruff version --- ale_linters/python/ruff.vim | 5 +++-- test/linter/test_ruff.vader | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ale_linters/python/ruff.vim b/ale_linters/python/ruff.vim index 34db089953..617ef5b702 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 diff --git a/test/linter/test_ruff.vader b/test/linter/test_ruff.vader index efc9d86957..049f04faf2 100644 --- a/test/linter/test_ruff.vader +++ b/test/linter/test_ruff.vader @@ -28,6 +28,12 @@ Execute(ruff should run with the file path of buffer in old versions): AssertLinterCwd expand('%:p:h') AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail[:-23] . ' %s' +Execute(ruff should run with the --output-format flag in new versions): + GivenCommandOutput ['ruff 0.1.0'] + + AssertLinterCwd expand('%:p:h') + AssertLinter 'ruff', ale#Escape('ruff') . ' --output-format text --stdin-filename %s -' + Execute(ruff should run with the stdin in new enough versions): GivenCommandOutput ['ruff 0.0.83']