mirror of
https://github.com/dense-analysis/ale.git
synced 2026-07-29 11:16:46 +08:00
CI / Build (push) Canceled after 0s
CI / Neovim 0.10 Windows (push) Canceled after 0s
CI / Neovim 0.12 Windows (push) Canceled after 0s
CI / Vim 8.2 Windows (push) Canceled after 0s
CI / Vim 9.2 Windows (push) Canceled after 0s
CI / Lint (push) Canceled after 0s
CI / Lua (push) Canceled after 0s
CI / Neovim 0.10 Linux (push) Canceled after 0s
CI / Neovim 0.12 Linux (push) Canceled after 0s
CI / Vim 8.2 Linux (push) Canceled after 0s
CI / Vim 9.2 Linux (push) Canceled after 0s
* astgrep: support its LSP Fixes: #4974 * astgrep: add a fixer
28 lines
699 B
Plaintext
28 lines
699 B
Plaintext
Before:
|
|
Save g:ale_astgrep_executable
|
|
Save g:ale_astgrep_scan_options
|
|
|
|
After:
|
|
Restore
|
|
|
|
Execute(The ast-grep callback should return the correct default values):
|
|
AssertEqual
|
|
\ {
|
|
\ 'command': ale#Escape('ast-grep') . ' scan --update-all %t',
|
|
\ 'read_temporary_file': 1,
|
|
\ },
|
|
\ ale#fixers#astgrep#Fix(bufnr(''))
|
|
|
|
Execute(The astgrep executable and options should be configurable):
|
|
let g:ale_astgrep_executable = '/path/to/ast-grep'
|
|
let g:ale_astgrep_scan_options = '--interactive'
|
|
|
|
AssertEqual
|
|
\ {
|
|
\ 'command': ale#Escape('/path/to/ast-grep')
|
|
\ . ' scan'
|
|
\ . ' --interactive %t',
|
|
\ 'read_temporary_file': 1,
|
|
\ },
|
|
\ ale#fixers#astgrep#Fix(bufnr(''))
|