diff --git a/vim-config/configs.vim b/vim-config/configs.vim index 2d85a814..22c52ba5 100644 --- a/vim-config/configs.vim +++ b/vim-config/configs.vim @@ -231,6 +231,10 @@ augroup END "********************" "** Plugin Configs **" "********************" +" Zig.vim +" ------- +let g:zig_fmt_autosave = 0 + " Ctags " ----- " Vim supports ctags natively, but some of the keybindings are awkward by diff --git a/vim-config/plugins/ale/Dockerfile b/vim-config/plugins/ale/Dockerfile index 2b626701..2985ecc5 100644 --- a/vim-config/plugins/ale/Dockerfile +++ b/vim-config/plugins/ale/Dockerfile @@ -1,10 +1,9 @@ -FROM testbed/vim:20 +FROM testbed/vim:24 RUN install_vim -tag v8.0.0027 -build \ - -tag v8.2.2401 -build \ + -tag v9.0.0297 -build \ -tag neovim:v0.2.0 -build \ - -tag neovim:v0.4.4 -build \ - -tag neovim:v0.5.0 -build + -tag neovim:v0.8.0 -build ENV PACKAGES="\ bash \ @@ -25,4 +24,4 @@ RUN git clone https://github.com/junegunn/vader.vim vader && \ ARG GIT_VERSION LABEL Version=${GIT_VERSION} -LABEL Name=w0rp/ale +LABEL Name=denseanalysis/ale diff --git a/vim-config/plugins/ale/LICENSE b/vim-config/plugins/ale/LICENSE index 471776e4..584cc5b5 100644 --- a/vim-config/plugins/ale/LICENSE +++ b/vim-config/plugins/ale/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016-2020, w0rp +Copyright (c) 2016-2023, Dense Analysis All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vim-config/plugins/ale/README.md b/vim-config/plugins/ale/README.md index 697f2d87..0236944b 100644 --- a/vim-config/plugins/ale/README.md +++ b/vim-config/plugins/ale/README.md @@ -1,4 +1,4 @@ -# Asynchronous Lint Engine [![GitHub Build Status](https://github.com/dense-analysis/ale/workflows/CI/badge.svg)](https://github.com/dense-analysis/ale/actions?query=event%3Apush+workflow%3ACI+branch%3Amaster++) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/r0ef1xu8xjmik58d/branch/master?svg=true)](https://ci.appveyor.com/project/dense-analysis/ale) [![Join the chat at https://gitter.im/vim-ale/Lobby](https://badges.gitter.im/vim-ale/Lobby.svg)](https://gitter.im/vim-ale/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +# Asynchronous Lint Engine [![GitHub Build Status](https://github.com/dense-analysis/ale/workflows/CI/badge.svg)](https://github.com/dense-analysis/ale/actions?query=event%3Apush+workflow%3ACI+branch%3Amaster++) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/r0ef1xu8xjmik58d/branch/master?svg=true)](https://ci.appveyor.com/project/dense-analysis/ale) [![Join the Dense Analysis Discord server](https://img.shields.io/badge/chat-Discord-5865F2)](https://discord.gg/5zFD6pQxDk) ![ALE Logo by Mark Grealish - https://www.bhalash.com/](https://user-images.githubusercontent.com/3518142/59195920-2c339500-8b85-11e9-9c22-f6b7f69637b8.jpg) @@ -7,7 +7,7 @@ ALE (Asynchronous Lint Engine) is a plugin providing linting (syntax checking and semantic errors) in NeoVim 0.2.0+ and Vim 8 while you edit your text files, and acts as a Vim [Language Server Protocol](https://langserver.org/) client. -A linting example with the darkspectrum color scheme in GVim. + ALE makes use of NeoVim and Vim 8 job control functions and timers to run linters on the contents of text buffers and return errors as @@ -198,14 +198,15 @@ completion manually with ``. set omnifunc=ale#completion#OmniFunc ``` -ALE supports automatic imports from external modules. This behavior is disabled -by default and can be enabled by setting: +ALE supports automatic imports from external modules. This behavior is enabled +by default and can be disabled by setting: ```vim -let g:ale_completion_autoimport = 1 +let g:ale_completion_autoimport = 0 ``` -See `:help ale-completion` for more information. +Note that disabling auto import can result in missing completion items from some +LSP servers (e.g. eclipselsp). See `:help ale-completion` for more information. @@ -263,6 +264,9 @@ See `:help ale-symbol-search` for more information. ALE supports renaming symbols in symbols in code such as variables or class names with the `ALERename` command. +`ALEFileRename` will rename file and fix import paths (tsserver +only). + `ALECodeAction` will execute actions on the cursor or applied to a visual range selection, such as automatically fixing errors. @@ -355,7 +359,7 @@ See the Vundle documentation for more information. -### 3.iiii. Installation with Vim-Plug +### 3.iv. Installation with Vim-Plug You can install this plugin using [Vim-Plug](https://github.com/junegunn/vim-plug) by adding the GitHub path for this repository to your `~/.vimrc`: @@ -382,8 +386,8 @@ If you are interested in the general direction of the project, check out the [wiki home page](https://github.com/dense-analysis/ale/wiki). The wiki includes a Roadmap for the future, and more. -If you'd liked to discuss the project more directly, check out the `#vim-ale` channel -on Freenode. Web chat is available [here](https://webchat.freenode.net/?channels=vim-ale). +If you'd liked to discuss ALE and more check out the Dense Analysis Discord +server here: https://discord.gg/5zFD6pQxDk @@ -927,14 +931,14 @@ If the terminal supports Unicode, you might try setting the value like below, to make it look nicer. ```vim -let g:ale_floating_window_border = ['│', '─', '╭', '╮', '╯', '╰'] +let g:ale_floating_window_border = ['│', '─', '╭', '╮', '╯', '╰', '│', '─'] ``` Since vim's default uses nice unicode characters when possible, you can trick ale into using that default with ```vim -let g:ale_floating_window_border = repeat([''], 6) +let g:ale_floating_window_border = repeat([''], 8) ``` diff --git a/vim-config/plugins/ale/ale_linters/ada/cspell.vim b/vim-config/plugins/ale/ale_linters/ada/cspell.vim new file mode 100644 index 00000000..7342d2b6 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/ada/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Ada files. + +call ale#handlers#cspell#DefineLinter('ada') diff --git a/vim-config/plugins/ale/ale_linters/ansible/ansible_language_server.vim b/vim-config/plugins/ale/ale_linters/ansible/ansible_language_server.vim new file mode 100644 index 00000000..d1f3fb7d --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/ansible/ansible_language_server.vim @@ -0,0 +1,46 @@ +" Author: Horacio Sanson +" Description: Support ansible language server https://github.com/ansible/ansible-language-server/ + +call ale#Set('ansible_language_server_executable', 'ansible-language-server') +call ale#Set('ansible_language_server_config', {}) + +function! ale_linters#ansible#ansible_language_server#Executable(buffer) abort + return ale#Var(a:buffer, 'ansible_language_server_executable') +endfunction + +function! ale_linters#ansible#ansible_language_server#GetCommand(buffer) abort + let l:executable = ale_linters#ansible#ansible_language_server#Executable(a:buffer) + + return ale#Escape(l:executable) . ' --stdio' +endfunction + +function! ale_linters#ansible#ansible_language_server#FindProjectRoot(buffer) abort + let l:dir = fnamemodify( + \ ale#path#FindNearestFile(a:buffer, 'ansible.cfg'), + \ ':h' + \) + + if l:dir isnot# '.' && isdirectory(l:dir) + return l:dir + endif + + let l:dir = fnamemodify( + \ ale#path#FindNearestDirectory(a:buffer, '.git'), + \ ':h:h' + \) + + if l:dir isnot# '.' && isdirectory(l:dir) + return l:dir + endif + + return '' +endfunction + +call ale#linter#Define('ansible', { +\ 'name': 'ansible-language-server', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#ansible#ansible_language_server#Executable'), +\ 'command': function('ale_linters#ansible#ansible_language_server#GetCommand'), +\ 'project_root': function('ale_linters#ansible#ansible_language_server#FindProjectRoot'), +\ 'lsp_config': {b -> ale#Var(b, 'ansible_language_server_config')} +\}) diff --git a/vim-config/plugins/ale/ale_linters/ansible/ansible_lint.vim b/vim-config/plugins/ale/ale_linters/ansible/ansible_lint.vim index 3b443369..bdfbee3c 100644 --- a/vim-config/plugins/ale/ale_linters/ansible/ansible_lint.vim +++ b/vim-config/plugins/ale/ale_linters/ansible/ansible_lint.vim @@ -18,9 +18,30 @@ function! ale_linters#ansible#ansible_lint#Handle(buffer, version, lines) abort endif endfor - let l:version_group = ale#semver#GTE(a:version, [5, 0, 0]) ? '>=5.0.0' : '<5.0.0' + let l:version_group = ale#semver#GTE(a:version, [6, 0, 0]) ? '>=6.0.0' : + \ ale#semver#GTE(a:version, [5, 0, 0]) ? '>=5.0.0' : + \ '<5.0.0' let l:output = [] + if '>=6.0.0' is# l:version_group + let l:error_codes = { 'blocker': 'E', 'critical': 'E', 'major': 'W', 'minor': 'W', 'info': 'I' } + let l:linter_issues = ale#util#FuzzyJSONDecode(a:lines, []) + + for l:issue in l:linter_issues + if ale#path#IsBufferPath(a:buffer, l:issue.location.path) + call add(l:output, { + \ 'lnum': exists('l:issue.location.lines.begin.column') ? l:issue.location.lines.begin.line : + \ l:issue.location.lines.begin, + \ 'col': exists('l:issue.location.lines.begin.column') ? l:issue.location.lines.begin.column : 0, + \ 'text': l:issue.check_name, + \ 'detail': l:issue.description, + \ 'code': l:issue.severity, + \ 'type': l:error_codes[l:issue.severity], + \}) + endif + endfor + endif + if '>=5.0.0' is# l:version_group " Matches patterns line the following: " test.yml:3:148: syntax-check 'var' is not a valid attribute for a Play @@ -73,10 +94,13 @@ endfunction function! ale_linters#ansible#ansible_lint#GetCommand(buffer, version) abort let l:commands = { + \ '>=6.0.0': '%e --nocolor -f json -x yaml %s', \ '>=5.0.0': '%e --nocolor --parseable-severity -x yaml %s', \ '<5.0.0': '%e --nocolor -p %t' \} - let l:command = ale#semver#GTE(a:version, [5, 0]) ? l:commands['>=5.0.0'] : l:commands['<5.0.0'] + let l:command = ale#semver#GTE(a:version, [6, 0]) ? l:commands['>=6.0.0'] : + \ ale#semver#GTE(a:version, [5, 0]) ? l:commands['>=5.0.0'] : + \ l:commands['<5.0.0'] return l:command endfunction diff --git a/vim-config/plugins/ale/ale_linters/asciidoc/cspell.vim b/vim-config/plugins/ale/ale_linters/asciidoc/cspell.vim new file mode 100644 index 00000000..b228b2e8 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/asciidoc/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for ASCIIDoc files. + +call ale#handlers#cspell#DefineLinter('asciidoc') diff --git a/vim-config/plugins/ale/ale_linters/avra/avra.vim b/vim-config/plugins/ale/ale_linters/avra/avra.vim new file mode 100644 index 00000000..edf15c09 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/avra/avra.vim @@ -0,0 +1,36 @@ +" Author: Utkarsh Verma +" Description: AVRA linter for avra syntax. + +call ale#Set('avra_avra_executable', 'avra') +call ale#Set('avra_avra_options', '') + +function! ale_linters#avra#avra#GetCommand(buffer) abort + return '%e' + \ . ' %t' + \ . ale#Pad(ale#Var(a:buffer, 'avra_avra_options')) + \ . ' -o ' . g:ale#util#nul_file +endfunction + +function! ale_linters#avra#avra#Handle(buffer, lines) abort + " Note that we treat 'fatal' as errors. + let l:pattern = '^\S\+(\(\d\+\))\s\+:\s\+\(\S\+\)\s\+:\s\+\(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'type': l:match[2] =~? 'Error' ? 'E' : 'W', + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('avra', { +\ 'name': 'avra', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'avra_avra_executable')}, +\ 'command': function('ale_linters#avra#avra#GetCommand'), +\ 'callback': 'ale_linters#avra#avra#Handle', +\}) diff --git a/vim-config/plugins/ale/ale_linters/awk/gawk.vim b/vim-config/plugins/ale/ale_linters/awk/gawk.vim index f795c57d..0c3212fd 100644 --- a/vim-config/plugins/ale/ale_linters/awk/gawk.vim +++ b/vim-config/plugins/ale/ale_linters/awk/gawk.vim @@ -1,5 +1,5 @@ " Author: kmarc -" Description: This file adds support for using GNU awk with sripts. +" Description: This file adds support for using GNU awk with scripts. call ale#Set('awk_gawk_executable', 'gawk') call ale#Set('awk_gawk_options', '') @@ -9,8 +9,9 @@ function! ale_linters#awk#gawk#GetCommand(buffer) abort " gawk from attempting to execute the body of the script " it is linting. return '%e --source ' . ale#Escape('BEGIN { exit } END { exit 1 }') + \ . ' --lint' \ . ale#Pad(ale#Var(a:buffer, 'awk_gawk_options')) - \ . ' -f %t --lint /dev/null' + \ . ' -f %t /dev/null' endfunction call ale#linter#Define('awk', { diff --git a/vim-config/plugins/ale/ale_linters/bicep/bicep.vim b/vim-config/plugins/ale/ale_linters/bicep/bicep.vim new file mode 100644 index 00000000..91cc1986 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/bicep/bicep.vim @@ -0,0 +1,64 @@ +" Author: Carl Smedstad +" Description: bicep for bicep files + +let g:ale_bicep_bicep_executable = +\ get(g:, 'ale_bicep_bicep_executable', 'bicep') + +let g:ale_bicep_bicep_options = +\ get(g:, 'ale_bicep_bicep_options', '') + +function! ale_linters#bicep#bicep#Executable(buffer) abort + return ale#Var(a:buffer, 'bicep_bicep_executable') +endfunction + +function! ale_linters#bicep#bicep#Command(buffer) abort + let l:executable = ale_linters#bicep#bicep#Executable(a:buffer) + let l:options = ale#Var(a:buffer, 'bicep_bicep_options') + + if has('win32') + let l:nullfile = 'NUL' + else + let l:nullfile = '/dev/null' + endif + + return ale#Escape(l:executable) + \ . ' build --outfile ' + \ . l:nullfile + \ . ' ' + \ . l:options + \ . ' %s' +endfunction + +function! ale_linters#bicep#bicep#Handle(buffer, lines) abort + let l:pattern = '\v^.*\((\d+),(\d+)\)\s:\s([a-zA-Z]*)\s([-a-zA-Z0-9]*):\s(.*)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + if l:match[3] is# 'Error' + let l:type = 'E' + elseif l:match[3] is# 'Warning' + let l:type = 'W' + else + let l:type = 'I' + endif + + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:type, + \ 'code': l:match[4], + \ 'text': l:match[5], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('bicep', { +\ 'name': 'bicep', +\ 'executable': function('ale_linters#bicep#bicep#Executable'), +\ 'command': function('ale_linters#bicep#bicep#Command'), +\ 'callback': 'ale_linters#bicep#bicep#Handle', +\ 'output_stream': 'both', +\ 'lint_file': 1, +\}) diff --git a/vim-config/plugins/ale/ale_linters/bitbake/oelint_adv.vim b/vim-config/plugins/ale/ale_linters/bitbake/oelint_adv.vim new file mode 100644 index 00000000..fb85a9b9 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/bitbake/oelint_adv.vim @@ -0,0 +1,47 @@ +" Author: offa +" Description: oelint-adv for BitBake files + +call ale#Set('bitbake_oelint_adv_executable', 'oelint-adv') +call ale#Set('bitbake_oelint_adv_options', '') +call ale#Set('bitbake_oelint_adv_config', '.oelint.cfg') + +function! ale_linters#bitbake#oelint_adv#Command(buffer) abort + let l:config_file = ale#path#FindNearestFile(a:buffer, + \ ale#Var(a:buffer, 'bitbake_oelint_adv_config')) + + return ((!empty(l:config_file)) + \ ? 'OELINT_CONFIG=' . ale#Escape(l:config_file) . ' ' + \ : '') + \ . '%e --quiet ' + \ . ale#Pad(ale#Var(a:buffer, 'bitbake_oelint_adv_options')) . '%s' +endfunction + +function! ale_linters#bitbake#oelint_adv#Handle(buffer, lines) abort + let l:pattern = '\v^(.+):(.+):(.+):(.+):(.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': str2nr(l:match[2]), + \ 'type': l:match[3] is# 'error' + \ ? 'E' : (l:match[3] is# 'warning' ? 'W' : 'I'), + \ 'text': StripAnsiCodes(l:match[5]), + \ 'code': l:match[4] + \ }) + endfor + + return l:output +endfunction + +function! StripAnsiCodes(line) abort + return substitute(a:line, '\e\[[0-9;]\+[mK]', '', 'g') +endfunction + +call ale#linter#Define('bitbake', { +\ 'name': 'oelint_adv', +\ 'output_stream': 'both', +\ 'executable': {b -> ale#Var(b, 'bitbake_oelint_adv_executable')}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#bitbake#oelint_adv#Command'), +\ 'callback': 'ale_linters#bitbake#oelint_adv#Handle', +\ }) diff --git a/vim-config/plugins/ale/ale_linters/c/cc.vim b/vim-config/plugins/ale/ale_linters/c/cc.vim index 5655fbf7..35125f2f 100644 --- a/vim-config/plugins/ale/ale_linters/c/cc.vim +++ b/vim-config/plugins/ale/ale_linters/c/cc.vim @@ -3,6 +3,8 @@ call ale#Set('c_cc_executable', '') call ale#Set('c_cc_options', '-std=c11 -Wall') +call ale#Set('c_cc_use_header_lang_flag', -1) +call ale#Set('c_cc_header_exts', ['h']) function! ale_linters#c#cc#GetExecutable(buffer) abort let l:executable = ale#Var(a:buffer, 'c_cc_executable') @@ -31,12 +33,24 @@ function! ale_linters#c#cc#GetCommand(buffer, output) abort \ 'g') endif + " Select the correct language flag depending on the executable, options + " and file extension + let l:executable = ale_linters#c#cc#GetExecutable(a:buffer) + let l:use_header_lang_flag = ale#Var(a:buffer, 'c_cc_use_header_lang_flag') + let l:header_exts = ale#Var(a:buffer, 'c_cc_header_exts') + let l:lang_flag = ale#c#GetLanguageFlag( + \ a:buffer, + \ l:executable, + \ l:use_header_lang_flag, + \ l:header_exts, + \ 'c') + " -iquote with the directory the file is in makes #include work for " headers in the same directory. " " `-o /dev/null` or `-o null` is needed to catch all errors, " -fsyntax-only doesn't catch everything. - return '%e -S -x c' + return '%e -S -x ' . l:lang_flag \ . ' -o ' . g:ale#util#nul_file \ . ' -iquote %s:h' \ . ale#Pad(l:cflags) diff --git a/vim-config/plugins/ale/ale_linters/c/cpplint.vim b/vim-config/plugins/ale/ale_linters/c/cpplint.vim new file mode 100644 index 00000000..4b997941 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/c/cpplint.vim @@ -0,0 +1,20 @@ +" Author: Justin Huang +" Description: cpplint for c files + +call ale#Set('c_cpplint_executable', 'cpplint') +call ale#Set('c_cpplint_options', '') + +function! ale_linters#c#cpplint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'c_cpplint_options') + + return '%e' . ale#Pad(l:options) . ' %s' +endfunction + +call ale#linter#Define('c', { +\ 'name': 'cpplint', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'c_cpplint_executable')}, +\ 'command': function('ale_linters#c#cpplint#GetCommand'), +\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat', +\ 'lint_file': 1, +\}) diff --git a/vim-config/plugins/ale/ale_linters/c/cspell.vim b/vim-config/plugins/ale/ale_linters/c/cspell.vim new file mode 100644 index 00000000..5f016548 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/c/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for C files. + +call ale#handlers#cspell#DefineLinter('c') diff --git a/vim-config/plugins/ale/ale_linters/cairo/starknet.vim b/vim-config/plugins/ale/ale_linters/cairo/starknet.vim new file mode 100644 index 00000000..990bda6d --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/cairo/starknet.vim @@ -0,0 +1,37 @@ +" Author: 0xHyoga <0xHyoga@gmx.com> +" Description: Report starknet-compile errors in cairo code + +call ale#Set('cairo_starknet_executable', 'starknet-compile') +call ale#Set('cairo_starknet_options', '') + +function! ale_linters#cairo#starknet#Handle(buffer, lines) abort + " Error always on the first line + " e.g ex01.cairo:20:6: Could not find module 'contracts.utils.ex00_base'. Searched in the following paths: + let l:pattern = '\v\.cairo:(\d+):(\d+):+ (.*)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': str2nr(l:match[1]), + \ 'col': str2nr(l:match[2]), + \ 'type': 'E', + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +function! ale_linters#cairo#starknet#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'cairo_starknet_executable') + + return l:executable . ale#Pad(ale#Var(a:buffer, 'cairo_starknet_options')) . ' %s' +endfunction + +call ale#linter#Define('cairo', { +\ 'name': 'starknet', +\ 'executable': {b -> ale#Var(b, 'cairo_starknet_executable')}, +\ 'command': function('ale_linters#cairo#starknet#GetCommand'), +\ 'callback': 'ale_linters#cairo#starknet#Handle', +\ 'output_stream': 'stderr', +\}) diff --git a/vim-config/plugins/ale/ale_linters/clojure/clj_kondo.vim b/vim-config/plugins/ale/ale_linters/clojure/clj_kondo.vim index a023f8b6..b470cf0c 100644 --- a/vim-config/plugins/ale/ale_linters/clojure/clj_kondo.vim +++ b/vim-config/plugins/ale/ale_linters/clojure/clj_kondo.vim @@ -8,7 +8,8 @@ function! ale_linters#clojure#clj_kondo#GetCommand(buffer) abort let l:command = 'clj-kondo' \ . ale#Pad(l:options) - \ . ' --lint %t' + \ . ' --lint -' + \ . ' --filename %s' return l:command endfunction diff --git a/vim-config/plugins/ale/ale_linters/cmake/cmake_lint.vim b/vim-config/plugins/ale/ale_linters/cmake/cmake_lint.vim new file mode 100644 index 00000000..3c44c92f --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/cmake/cmake_lint.vim @@ -0,0 +1,43 @@ +" Author: Carl Smedstad +" Description: cmake-lint for cmake files + +let g:ale_cmake_cmake_lint_executable = +\ get(g:, 'ale_cmake_cmake_lint_executable', 'cmake-lint') + +let g:ale_cmake_cmake_lint_options = +\ get(g:, 'ale_cmake_cmake_lint_options', '') + +function! ale_linters#cmake#cmake_lint#Executable(buffer) abort + return ale#Var(a:buffer, 'cmake_cmake_lint_executable') +endfunction + +function! ale_linters#cmake#cmake_lint#Command(buffer) abort + let l:executable = ale_linters#cmake#cmake_lint#Executable(a:buffer) + let l:options = ale#Var(a:buffer, 'cmake_cmake_lint_options') + + return ale#Escape(l:executable) . ' ' . l:options . ' %t' +endfunction + +function! ale_linters#cmake#cmake_lint#Handle(buffer, lines) abort + let l:pattern = '\v^[^:]+:(\d+),?(\d+)?:\s\[([A-Z]\d+)\]\s(.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': 'W', + \ 'code': l:match[3], + \ 'text': l:match[4], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('cmake', { +\ 'name': 'cmake_lint', +\ 'executable': function('ale_linters#cmake#cmake_lint#Executable'), +\ 'command': function('ale_linters#cmake#cmake_lint#Command'), +\ 'callback': 'ale_linters#cmake#cmake_lint#Handle', +\}) diff --git a/vim-config/plugins/ale/ale_linters/cpp/cc.vim b/vim-config/plugins/ale/ale_linters/cpp/cc.vim index ffb8f068..1d35bb67 100644 --- a/vim-config/plugins/ale/ale_linters/cpp/cc.vim +++ b/vim-config/plugins/ale/ale_linters/cpp/cc.vim @@ -3,6 +3,8 @@ call ale#Set('cpp_cc_executable', '') call ale#Set('cpp_cc_options', '-std=c++14 -Wall') +call ale#Set('cpp_cc_use_header_lang_flag', -1) +call ale#Set('cpp_cc_header_exts', ['h', 'hpp']) function! ale_linters#cpp#cc#GetExecutable(buffer) abort let l:executable = ale#Var(a:buffer, 'cpp_cc_executable') @@ -31,12 +33,24 @@ function! ale_linters#cpp#cc#GetCommand(buffer, output) abort \ 'g') endif + " Select the correct language flag depending on the executable, options + " and file extension + let l:executable = ale_linters#cpp#cc#GetExecutable(a:buffer) + let l:use_header_lang_flag = ale#Var(a:buffer, 'cpp_cc_use_header_lang_flag') + let l:header_exts = ale#Var(a:buffer, 'cpp_cc_header_exts') + let l:lang_flag = ale#c#GetLanguageFlag( + \ a:buffer, + \ l:executable, + \ l:use_header_lang_flag, + \ l:header_exts, + \ 'c++') + " -iquote with the directory the file is in makes #include work for " headers in the same directory. " " `-o /dev/null` or `-o null` is needed to catch all errors, " -fsyntax-only doesn't catch everything. - return '%e -S -x c++' + return '%e -S -x ' . l:lang_flag \ . ' -o ' . g:ale#util#nul_file \ . ' -iquote %s:h' \ . ale#Pad(l:cflags) diff --git a/vim-config/plugins/ale/ale_linters/cpp/clangtidy.vim b/vim-config/plugins/ale/ale_linters/cpp/clangtidy.vim index d6944aae..fa9f8e31 100644 --- a/vim-config/plugins/ale/ale_linters/cpp/clangtidy.vim +++ b/vim-config/plugins/ale/ale_linters/cpp/clangtidy.vim @@ -26,7 +26,7 @@ function! ale_linters#cpp#clangtidy#GetCommand(buffer, output) abort " Tell clang-tidy a .h header with a C++ filetype in Vim is a C++ file " only when compile-commands.json file is not there. Adding these - " flags makes clang-tidy completely ignore compile commmands. + " flags makes clang-tidy completely ignore compile commands. if expand('#' . a:buffer) =~# '\.h$' let l:options .= !empty(l:options) ? ' -x c++' : '-x c++' endif diff --git a/vim-config/plugins/ale/ale_linters/cpp/cspell.vim b/vim-config/plugins/ale/ale_linters/cpp/cspell.vim new file mode 100644 index 00000000..ace4c3b2 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/cpp/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for C++ files. + +call ale#handlers#cspell#DefineLinter('cpp') diff --git a/vim-config/plugins/ale/ale_linters/cs/cspell.vim b/vim-config/plugins/ale/ale_linters/cs/cspell.vim new file mode 100644 index 00000000..c62dd11b --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/cs/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for C# files. + +call ale#handlers#cspell#DefineLinter('cs') diff --git a/vim-config/plugins/ale/ale_linters/css/cspell.vim b/vim-config/plugins/ale/ale_linters/css/cspell.vim new file mode 100644 index 00000000..d42375b4 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/css/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for CSS files. + +call ale#handlers#cspell#DefineLinter('css') diff --git a/vim-config/plugins/ale/ale_linters/css/vscodecss.vim b/vim-config/plugins/ale/ale_linters/css/vscodecss.vim new file mode 100644 index 00000000..2d59adf0 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/css/vscodecss.vim @@ -0,0 +1,16 @@ +" Author: Dalius Dobravolskas +" Description: VSCode css language server + +function! ale_linters#css#vscodecss#GetProjectRoot(buffer) abort + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +call ale#linter#Define('css', { +\ 'name': 'vscodecss', +\ 'lsp': 'stdio', +\ 'executable': 'vscode-css-language-server', +\ 'command': '%e --stdio', +\ 'project_root': function('ale_linters#css#vscodecss#GetProjectRoot'), +\}) diff --git a/vim-config/plugins/ale/ale_linters/dart/dart_analyze.vim b/vim-config/plugins/ale/ale_linters/dart/dart_analyze.vim index a00162d8..7d67c31c 100644 --- a/vim-config/plugins/ale/ale_linters/dart/dart_analyze.vim +++ b/vim-config/plugins/ale/ale_linters/dart/dart_analyze.vim @@ -4,15 +4,16 @@ call ale#Set('dart_analyze_executable', 'dart') function! ale_linters#dart#dart_analyze#Handle(buffer, lines) abort - let l:pattern = '\v^ ([a-z]+) - (.+):(\d+):(\d+) - (.+) - (.+)$' + let l:pattern = '\v([a-z]+) - (.+):(\d+):(\d+) - (.+) - (.+)$' let l:output = [] for l:match in ale#util#GetMatches(a:lines, l:pattern) + let [l:type, l:filename, l:lnum, l:col, l:message, l:code] = l:match[1:6] call add(l:output, { - \ 'type': l:match[1] is# 'error' ? 'E' : 'W', - \ 'text': l:match[6] . ': ' . l:match[5], - \ 'lnum': str2nr(l:match[3]), - \ 'col': str2nr(l:match[4]), + \ 'type': l:type is# 'error' ? 'E' : l:type is# 'info' ? 'I' : 'W', + \ 'text': l:code . ': ' . l:message, + \ 'lnum': str2nr(l:lnum), + \ 'col': str2nr(l:col), \}) endfor @@ -22,7 +23,7 @@ endfunction call ale#linter#Define('dart', { \ 'name': 'dart_analyze', \ 'executable': {b -> ale#Var(b, 'dart_analyze_executable')}, -\ 'command': '%e analyze %s', +\ 'command': '%e analyze --fatal-infos %s', \ 'callback': 'ale_linters#dart#dart_analyze#Handle', \ 'lint_file': 1, \}) diff --git a/vim-config/plugins/ale/ale_linters/dart/dartanalyzer.vim b/vim-config/plugins/ale/ale_linters/dart/dartanalyzer.vim deleted file mode 100644 index 0a4d9742..00000000 --- a/vim-config/plugins/ale/ale_linters/dart/dartanalyzer.vim +++ /dev/null @@ -1,36 +0,0 @@ -" Author: w0rp -" Description: Check Dart files with dartanalyzer - -call ale#Set('dart_dartanalyzer_executable', 'dartanalyzer') - -function! ale_linters#dart#dartanalyzer#GetCommand(buffer) abort - let l:path = ale#path#FindNearestFile(a:buffer, '.packages') - - return '%e' - \ . (!empty(l:path) ? ' --packages ' . ale#Escape(l:path) : '') - \ . ' %s' -endfunction - -function! ale_linters#dart#dartanalyzer#Handle(buffer, lines) abort - let l:pattern = '\v^ ([a-z]+) . (.+) at (.+):(\d+):(\d+) . (.+)$' - let l:output = [] - - for l:match in ale#util#GetMatches(a:lines, l:pattern) - call add(l:output, { - \ 'type': l:match[1] is# 'error' ? 'E' : 'W', - \ 'text': l:match[6] . ': ' . l:match[2], - \ 'lnum': str2nr(l:match[4]), - \ 'col': str2nr(l:match[5]), - \}) - endfor - - return l:output -endfunction - -call ale#linter#Define('dart', { -\ 'name': 'dartanalyzer', -\ 'executable': {b -> ale#Var(b, 'dart_dartanalyzer_executable')}, -\ 'command': function('ale_linters#dart#dartanalyzer#GetCommand'), -\ 'callback': 'ale_linters#dart#dartanalyzer#Handle', -\ 'lint_file': 1, -\}) diff --git a/vim-config/plugins/ale/ale_linters/dockerfile/hadolint.vim b/vim-config/plugins/ale/ale_linters/dockerfile/hadolint.vim index 278e9466..9a6a6258 100644 --- a/vim-config/plugins/ale/ale_linters/dockerfile/hadolint.vim +++ b/vim-config/plugins/ale/ale_linters/dockerfile/hadolint.vim @@ -3,6 +3,7 @@ " always, yes, never call ale#Set('dockerfile_hadolint_use_docker', 'never') call ale#Set('dockerfile_hadolint_docker_image', 'hadolint/hadolint') +call ale#Set('dockerfile_hadolint_options', '') function! ale_linters#dockerfile#hadolint#Handle(buffer, lines) abort " Matches patterns line the following: @@ -102,7 +103,7 @@ endfunction function! ale_linters#dockerfile#hadolint#GetCommand(buffer) abort let l:command = ale_linters#dockerfile#hadolint#GetExecutable(a:buffer) - let l:opts = '--no-color -' + let l:opts = ale#Var(a:buffer, 'dockerfile_hadolint_options') . ' --no-color -' if l:command is# 'docker' return printf('docker run --rm -i %s hadolint %s', diff --git a/vim-config/plugins/ale/ale_linters/elixir/cspell.vim b/vim-config/plugins/ale/ale_linters/elixir/cspell.vim new file mode 100644 index 00000000..12dc271f --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/elixir/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Elixir files. + +call ale#handlers#cspell#DefineLinter('elixir') diff --git a/vim-config/plugins/ale/ale_linters/erlang/elvis.vim b/vim-config/plugins/ale/ale_linters/erlang/elvis.vim index 31dea3dd..0fb85c07 100644 --- a/vim-config/plugins/ale/ale_linters/erlang/elvis.vim +++ b/vim-config/plugins/ale/ale_linters/erlang/elvis.vim @@ -12,6 +12,7 @@ function! ale_linters#erlang#elvis#Handle(buffer, lines) abort \ 'lnum': str2nr(l:match[1]), \ 'text': s:AbbreviateMessage(l:match[2]), \ 'type': 'W', + \ 'sub_type': 'style', \}) endfor diff --git a/vim-config/plugins/ale/ale_linters/erlang/erlang_ls.vim b/vim-config/plugins/ale/ale_linters/erlang/erlang_ls.vim new file mode 100644 index 00000000..b747e454 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/erlang/erlang_ls.vim @@ -0,0 +1,49 @@ +" Author: Dmitri Vereshchagin +" Description: LSP linter for Erlang files + +call ale#Set('erlang_erlang_ls_executable', 'erlang_ls') +call ale#Set('erlang_erlang_ls_log_dir', '') +call ale#Set('erlang_erlang_ls_log_level', 'info') + +function! s:GetCommand(buffer) abort + let l:log_dir = ale#Var(a:buffer, 'erlang_erlang_ls_log_dir') + let l:log_level = ale#Var(a:buffer, 'erlang_erlang_ls_log_level') + + let l:command = '%e' + + if !empty(l:log_dir) + let l:command .= ' --log-dir=' . ale#Escape(l:log_dir) + endif + + let l:command .= ' --log-level=' . ale#Escape(l:log_level) + + return l:command +endfunction + +function! s:FindProjectRoot(buffer) abort + let l:markers = ['_build/', 'erlang_ls.config', 'rebar.lock'] + + " This is a way to find Erlang/OTP root (the one that is managed + " by kerl or asdf). Useful if :ALEGoToDefinition takes us there. + let l:markers += ['.kerl_config'] + + for l:marker in l:markers + let l:path = l:marker[-1:] is# '/' + \ ? ale#path#FindNearestDirectory(a:buffer, l:marker) + \ : ale#path#FindNearestFile(a:buffer, l:marker) + + if !empty(l:path) + return ale#path#Dirname(l:path) + endif + endfor + + return '' +endfunction + +call ale#linter#Define('erlang', { +\ 'name': 'erlang_ls', +\ 'executable': {b -> ale#Var(b, 'erlang_erlang_ls_executable')}, +\ 'command': function('s:GetCommand'), +\ 'lsp': 'stdio', +\ 'project_root': function('s:FindProjectRoot'), +\}) diff --git a/vim-config/plugins/ale/ale_linters/go/cspell.vim b/vim-config/plugins/ale/ale_linters/go/cspell.vim new file mode 100644 index 00000000..f986a31a --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/go/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Go files. + +call ale#handlers#cspell#DefineLinter('go') diff --git a/vim-config/plugins/ale/ale_linters/go/golangci_lint.vim b/vim-config/plugins/ale/ale_linters/go/golangci_lint.vim index 2c4b1a4f..80431b99 100644 --- a/vim-config/plugins/ale/ale_linters/go/golangci_lint.vim +++ b/vim-config/plugins/ale/ale_linters/go/golangci_lint.vim @@ -24,7 +24,7 @@ function! ale_linters#go#golangci_lint#GetCommand(buffer) abort endfunction function! ale_linters#go#golangci_lint#GetMatches(lines) abort - let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?:?:?:?\s\*?(.+)$' + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?:?:?:?\s\*?(.+)\s+\((.+)\)$' return ale#util#GetMatches(a:lines, l:pattern) endfunction @@ -34,14 +34,20 @@ function! ale_linters#go#golangci_lint#Handler(buffer, lines) abort let l:output = [] for l:match in ale_linters#go#golangci_lint#GetMatches(a:lines) + if l:match[5] is# 'typecheck' + let l:msg_type = 'E' + else + let l:msg_type = 'W' + endif + " l:match[1] will already be an absolute path, output from " golangci_lint call add(l:output, { \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), \ 'lnum': l:match[2] + 0, \ 'col': l:match[3] + 0, - \ 'type': 'E', - \ 'text': l:match[4], + \ 'type': l:msg_type, + \ 'text': l:match[4] . ' (' . l:match[5] . ')', \}) endfor diff --git a/vim-config/plugins/ale/ale_linters/handlebars/embertemplatelint.vim b/vim-config/plugins/ale/ale_linters/handlebars/embertemplatelint.vim index 8362bb1c..17c4d08e 100644 --- a/vim-config/plugins/ale/ale_linters/handlebars/embertemplatelint.vim +++ b/vim-config/plugins/ale/ale_linters/handlebars/embertemplatelint.vim @@ -11,10 +11,17 @@ function! ale_linters#handlebars#embertemplatelint#GetExecutable(buffer) abort endfunction function! ale_linters#handlebars#embertemplatelint#GetCommand(buffer, version) abort - " Reading from stdin was introduced in ember-template-lint@1.6.0 - return ale#semver#GTE(a:version, [1, 6, 0]) - \ ? '%e --json --filename %s' - \ : '%e --json %t' + if ale#semver#GTE(a:version, [4, 0, 0]) + " --json was removed in favor of --format=json in ember-template-lint@4.0.0 + return '%e --format=json --filename %s' + endif + + if ale#semver#GTE(a:version, [1, 6, 0]) + " Reading from stdin was introduced in ember-template-lint@1.6.0 + return '%e --json --filename %s' + endif + + return '%e --json %t' endfunction function! ale_linters#handlebars#embertemplatelint#GetCommandWithVersionCheck(buffer) abort diff --git a/vim-config/plugins/ale/ale_linters/haskell/cspell.vim b/vim-config/plugins/ale/ale_linters/haskell/cspell.vim new file mode 100644 index 00000000..b0971a9e --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/haskell/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Haskell files. + +call ale#handlers#cspell#DefineLinter('haskell') diff --git a/vim-config/plugins/ale/ale_linters/haskell/hls.vim b/vim-config/plugins/ale/ale_linters/haskell/hls.vim index ae0556a4..7f9efc38 100644 --- a/vim-config/plugins/ale/ale_linters/haskell/hls.vim +++ b/vim-config/plugins/ale/ale_linters/haskell/hls.vim @@ -4,6 +4,7 @@ " ). It search more project root files. " call ale#Set('haskell_hls_executable', 'haskell-language-server-wrapper') +call ale#Set('haskell_hls_config', {}) function! ale_linters#haskell#hls#FindRootFile(buffer) abort let l:serach_root_files = [ @@ -60,4 +61,5 @@ call ale#linter#Define('haskell', { \ 'command': function('ale_linters#haskell#hls#GetCommand'), \ 'executable': {b -> ale#Var(b, 'haskell_hls_executable')}, \ 'project_root': function('ale_linters#haskell#hls#GetProjectRoot'), +\ 'lsp_config': {b -> ale#Var(b, 'haskell_hls_config')}, \}) diff --git a/vim-config/plugins/ale/ale_linters/help/cspell.vim b/vim-config/plugins/ale/ale_linters/help/cspell.vim new file mode 100644 index 00000000..92eb9501 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/help/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for help files. + +call ale#handlers#cspell#DefineLinter('help') diff --git a/vim-config/plugins/ale/ale_linters/html/angular.vim b/vim-config/plugins/ale/ale_linters/html/angular.vim index 17c0a751..4f368fb4 100644 --- a/vim-config/plugins/ale/ale_linters/html/angular.vim +++ b/vim-config/plugins/ale/ale_linters/html/angular.vim @@ -11,10 +11,7 @@ function! ale_linters#html#angular#GetProjectRoot(buffer) abort endfunction function! ale_linters#html#angular#GetExecutable(buffer) abort - return ale#path#FindExecutable(a:buffer, 'html_angular', [ - \ 'node_modules/@angular/language-server/bin/ngserver', - \ 'node_modules/@angular/language-server/index.js', - \]) + return 'node' endfunction function! ale_linters#html#angular#GetCommand(buffer) abort @@ -34,9 +31,16 @@ function! ale_linters#html#angular#GetCommand(buffer) abort \ fnamemodify(l:language_service_dir, ':h:h') \ . '/typescript' \) - let l:executable = ale_linters#html#angular#GetExecutable(a:buffer) + let l:script = ale#path#FindExecutable(a:buffer, 'html_angular', [ + \ 'node_modules/@angular/language-server/bin/ngserver', + \ 'node_modules/@angular/language-server/index.js', + \]) + + if !filereadable(l:script) + return '' + endif - return ale#node#Executable(a:buffer, l:executable) + return ale#Escape('node') . ' ' . ale#Escape(l:script) \ . ' --ngProbeLocations ' . ale#Escape(l:language_service_dir) \ . ' --tsProbeLocations ' . ale#Escape(l:typescript_dir) \ . ' --stdio' diff --git a/vim-config/plugins/ale/ale_linters/html/cspell.vim b/vim-config/plugins/ale/ale_linters/html/cspell.vim new file mode 100644 index 00000000..743350ea --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/html/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for HTML files. + +call ale#handlers#cspell#DefineLinter('html') diff --git a/vim-config/plugins/ale/ale_linters/html/vscodehtml.vim b/vim-config/plugins/ale/ale_linters/html/vscodehtml.vim new file mode 100644 index 00000000..46814a0b --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/html/vscodehtml.vim @@ -0,0 +1,16 @@ +" Author: Dalius Dobravolskas +" Description: VSCode html language server + +function! ale_linters#html#vscodehtml#GetProjectRoot(buffer) abort + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +call ale#linter#Define('html', { +\ 'name': 'vscodehtml', +\ 'lsp': 'stdio', +\ 'executable': 'vscode-html-language-server', +\ 'command': '%e --stdio', +\ 'project_root': function('ale_linters#html#vscodehtml#GetProjectRoot'), +\}) diff --git a/vim-config/plugins/ale/ale_linters/java/cspell.vim b/vim-config/plugins/ale/ale_linters/java/cspell.vim new file mode 100644 index 00000000..a6eecc0b --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/java/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Java files. + +call ale#handlers#cspell#DefineLinter('java') diff --git a/vim-config/plugins/ale/ale_linters/java/eclipselsp.vim b/vim-config/plugins/ale/ale_linters/java/eclipselsp.vim index adfd1b09..ad7cbeb4 100644 --- a/vim-config/plugins/ale/ale_linters/java/eclipselsp.vim +++ b/vim-config/plugins/ale/ale_linters/java/eclipselsp.vim @@ -192,4 +192,9 @@ call ale#linter#Define('java', { \ 'command': function('ale_linters#java#eclipselsp#RunWithVersionCheck'), \ 'language': 'java', \ 'project_root': function('ale#java#FindProjectRoot'), +\ 'initialization_options': { +\ 'extendedClientCapabilities': { +\ 'classFileContentsSupport': v:true +\ } +\ } \}) diff --git a/vim-config/plugins/ale/ale_linters/javascript/cspell.vim b/vim-config/plugins/ale/ale_linters/javascript/cspell.vim new file mode 100644 index 00000000..5a496779 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/javascript/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for JavaScript files. + +call ale#handlers#cspell#DefineLinter('javascript') diff --git a/vim-config/plugins/ale/ale_linters/json/cspell.vim b/vim-config/plugins/ale/ale_linters/json/cspell.vim new file mode 100644 index 00000000..0d7314a4 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/json/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for JSON files. + +call ale#handlers#cspell#DefineLinter('json') diff --git a/vim-config/plugins/ale/ale_linters/json/vscodejson.vim b/vim-config/plugins/ale/ale_linters/json/vscodejson.vim new file mode 100644 index 00000000..dcaee010 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/json/vscodejson.vim @@ -0,0 +1,16 @@ +" Author: Dalius Dobravolskas +" Description: VSCode json language server + +function! ale_linters#json#vscodejson#GetProjectRoot(buffer) abort + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +call ale#linter#Define('json', { +\ 'name': 'vscodejson', +\ 'lsp': 'stdio', +\ 'executable': 'vscode-json-language-server', +\ 'command': '%e --stdio', +\ 'project_root': function('ale_linters#json#vscodejson#GetProjectRoot'), +\}) diff --git a/vim-config/plugins/ale/ale_linters/lua/cspell.vim b/vim-config/plugins/ale/ale_linters/lua/cspell.vim new file mode 100644 index 00000000..215b82f8 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/lua/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Lua files. + +call ale#handlers#cspell#DefineLinter('lua') diff --git a/vim-config/plugins/ale/ale_linters/lua/selene.vim b/vim-config/plugins/ale/ale_linters/lua/selene.vim new file mode 100644 index 00000000..6b33cbfd --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/lua/selene.vim @@ -0,0 +1,46 @@ +call ale#Set('lua_selene_executable', 'selene') +call ale#Set('lua_selene_options', '') + +function! ale_linters#lua#selene#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'lua_selene_options')) + \ . ' --display-style=json -' +endfunction + +function! ale_linters#lua#selene#Handle(buffer, lines) abort + let l:output = [] + + for l:line in a:lines + " as of version 0.17.0, selene has no way to suppress summary + " information when outputting json, so stop processing when we hit it + " (PR for this here: https://github.com/Kampfkarren/selene/pull/356) + if l:line is# 'Results:' + break + endif + + let l:json = json_decode(l:line) + let l:lint = { + \ 'lnum': l:json.primary_label.span.start_line + 1, + \ 'end_lnum': l:json.primary_label.span.end_line + 1, + \ 'col': l:json.primary_label.span.start_column + 1, + \ 'end_col': l:json.primary_label.span.end_column, + \ 'text': l:json.message, + \ 'code': l:json.code, + \ 'type': l:json.severity is# 'Warning' ? 'W' : 'E', + \} + + if has_key(l:json, 'notes') && len(l:json.notes) > 0 + let l:lint.detail = l:lint.text . "\n\n" . join(l:json.notes, "\n") + endif + + call add(l:output, l:lint) + endfor + + return l:output +endfunction + +call ale#linter#Define('lua', { +\ 'name': 'selene', +\ 'executable': {b -> ale#Var(b, 'lua_selene_executable')}, +\ 'command': function('ale_linters#lua#selene#GetCommand'), +\ 'callback': 'ale_linters#lua#selene#Handle', +\}) diff --git a/vim-config/plugins/ale/ale_linters/make/checkmake.vim b/vim-config/plugins/ale/ale_linters/make/checkmake.vim index 5ebdf91e..fed01b5f 100644 --- a/vim-config/plugins/ale/ale_linters/make/checkmake.vim +++ b/vim-config/plugins/ale/ale_linters/make/checkmake.vim @@ -1,5 +1,7 @@ " Author: aurieh - https://github.com/aurieh +call ale#Set('make_checkmake_config', '') + function! ale_linters#make#checkmake#Handle(buffer, lines) abort let l:pattern = '\v^(\d+):(.+):(.+)$' let l:output = [] @@ -17,9 +19,19 @@ function! ale_linters#make#checkmake#Handle(buffer, lines) abort return l:output endfunction +function! ale_linters#make#checkmake#GetCommand(buffer) abort + let l:config = ale#Var(a:buffer, 'make_checkmake_config') + let l:cmd = 'checkmake' + \ . ' --format="{{.LineNumber}}:{{.Rule}}:{{.Violation}}{{\"\r\n\"}}"' + \ . (!empty(l:config) ? ' --config="' . l:config . '"' : '') + \ . ' %s' + + return l:cmd +endfunction + call ale#linter#Define('make', { \ 'name': 'checkmake', \ 'executable': 'checkmake', -\ 'command': 'checkmake %s --format="{{.LineNumber}}:{{.Rule}}:{{.Violation}}"', +\ 'command': function('ale_linters#make#checkmake#GetCommand'), \ 'callback': 'ale_linters#make#checkmake#Handle', \}) diff --git a/vim-config/plugins/ale/ale_linters/markdown/cspell.vim b/vim-config/plugins/ale/ale_linters/markdown/cspell.vim new file mode 100644 index 00000000..45c586cc --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/markdown/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Markdown files. + +call ale#handlers#cspell#DefineLinter('markdown') diff --git a/vim-config/plugins/ale/ale_linters/markdown/markdownlint.vim b/vim-config/plugins/ale/ale_linters/markdown/markdownlint.vim index 7a293938..424c9f24 100644 --- a/vim-config/plugins/ale/ale_linters/markdown/markdownlint.vim +++ b/vim-config/plugins/ale/ale_linters/markdown/markdownlint.vim @@ -1,10 +1,15 @@ " Author: Ty-Lucas Kelley " Description: Adds support for markdownlint +call ale#Set('markdown_markdownlint_executable', 'markdownlint') call ale#Set('markdown_markdownlint_options', '') +function! ale_linters#markdown#markdownlint#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'markdown_markdownlint_executable') +endfunction + function! ale_linters#markdown#markdownlint#GetCommand(buffer) abort - let l:executable = 'markdownlint' + let l:executable = ale_linters#markdown#markdownlint#GetExecutable(a:buffer) let l:options = ale#Var(a:buffer, 'markdown_markdownlint_options') @@ -14,7 +19,7 @@ endfunction call ale#linter#Define('markdown', { \ 'name': 'markdownlint', -\ 'executable': 'markdownlint', +\ 'executable': function('ale_linters#markdown#markdownlint#GetExecutable'), \ 'lint_file': 1, \ 'output_stream': 'both', \ 'command': function('ale_linters#markdown#markdownlint#GetCommand'), diff --git a/vim-config/plugins/ale/ale_linters/matlab/mlint.vim b/vim-config/plugins/ale/ale_linters/matlab/mlint.vim index f58f8b6d..e7daf37e 100644 --- a/vim-config/plugins/ale/ale_linters/matlab/mlint.vim +++ b/vim-config/plugins/ale/ale_linters/matlab/mlint.vim @@ -17,7 +17,7 @@ function! ale_linters#matlab#mlint#Handle(buffer, lines) abort let l:code = l:match[3] let l:text = l:match[4] - " Suppress erroneous waring about filename + " Suppress erroneous warning about filename " TODO: Enable this error when copying filename is supported if l:code is# 'FNDEF' continue diff --git a/vim-config/plugins/ale/ale_linters/nix/nix.vim b/vim-config/plugins/ale/ale_linters/nix/nix.vim index 3d91a9ec..5d80f652 100644 --- a/vim-config/plugins/ale/ale_linters/nix/nix.vim +++ b/vim-config/plugins/ale/ale_linters/nix/nix.vim @@ -5,10 +5,10 @@ function! ale_linters#nix#nix#Command(buffer, output, meta) abort let l:version = a:output[0][22:] - if l:version =~# '^\(2.4\|3\).*' - return 'nix-instantiate --log-format internal-json --parse -' - else + if l:version =~# '^\(1\|2.[0-3]\.\).*' return 'nix-instantiate --parse -' + else + return 'nix-instantiate --log-format internal-json --parse -' endif endfunction diff --git a/vim-config/plugins/ale/ale_linters/nix/statix.vim b/vim-config/plugins/ale/ale_linters/nix/statix.vim new file mode 100644 index 00000000..a90a68a6 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/nix/statix.vim @@ -0,0 +1,18 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: statix analysis and suggestions for Nix files + +call ale#Set('nix_statix_check_executable', 'statix') +call ale#Set('nix_statix_check_options', '') + +function! ale_linters#nix#statix#GetCommand(buffer) abort + return '%e check -o errfmt --stdin' + \ . ale#Pad(ale#Var(a:buffer, 'nix_statix_check_options')) +endfunction + +call ale#linter#Define('nix', { +\ 'name': 'statix', +\ 'executable': {b -> ale#Var(b, 'nix_statix_check_executable')}, +\ 'command': function('ale_linters#nix#statix#GetCommand'), +\ 'callback': 'ale#handlers#statix#Handle', +\}) diff --git a/vim-config/plugins/ale/ale_linters/openscad/sca2d.vim b/vim-config/plugins/ale/ale_linters/openscad/sca2d.vim new file mode 100644 index 00000000..60804a13 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/openscad/sca2d.vim @@ -0,0 +1,24 @@ +" Description: SCA2D linter for OpenSCAD files + +call ale#Set('openscad_sca2d_executable', 'sca2d') +call ale#Set('openscad_sca2d_options', '') + +function! ale_linters#openscad#sca2d#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'openscad_sca2d_executable') +endfunction + +function! ale_linters#openscad#sca2d#GetCommand(buffer) abort + let l:executable = ale_linters#openscad#sca2d#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'openscad_sca2d_options') + + return ale#Escape(l:executable) . ale#Pad(l:options) . ' %s' +endfunction + +call ale#linter#Define('openscad', { +\ 'name': 'SCA2D', +\ 'aliases': ['sca2d'], +\ 'executable': function('ale_linters#openscad#sca2d#GetExecutable'), +\ 'command': function('ale_linters#openscad#sca2d#GetCommand'), +\ 'callback': 'ale#handlers#openscad#SCA2D_callback', +\ 'lint_file': 1, +\ }) diff --git a/vim-config/plugins/ale/ale_linters/php/cspell.vim b/vim-config/plugins/ale/ale_linters/php/cspell.vim new file mode 100644 index 00000000..574df575 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/php/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for PHP files. + +call ale#handlers#cspell#DefineLinter('php') diff --git a/vim-config/plugins/ale/ale_linters/php/phpactor.vim b/vim-config/plugins/ale/ale_linters/php/phpactor.vim new file mode 100644 index 00000000..b137eaf1 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/php/phpactor.vim @@ -0,0 +1,23 @@ +" Author: Arizard +" Description: PHPactor integration for ALE + +" Copied from langserver.vim +function! ale_linters#php#phpactor#GetProjectRoot(buffer) abort + let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json') + + if (!empty(l:composer_path)) + return fnamemodify(l:composer_path, ':h') + endif + + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +call ale#linter#Define('php', { +\ 'name': 'phpactor', +\ 'lsp': 'stdio', +\ 'executable': 'phpactor', +\ 'command': '%e language-server', +\ 'project_root': function('ale_linters#php#phpactor#GetProjectRoot'), +\}) diff --git a/vim-config/plugins/ale/ale_linters/php/phpstan.vim b/vim-config/plugins/ale/ale_linters/php/phpstan.vim index 58d4dce2..4dce5d5f 100644 --- a/vim-config/plugins/ale/ale_linters/php/phpstan.vim +++ b/vim-config/plugins/ale/ale_linters/php/phpstan.vim @@ -1,4 +1,4 @@ -" Author: medains , ardis +" Author: medains , ardis , Arizard " Description: phpstan for PHP files " Set to change the ruleset @@ -6,6 +6,7 @@ let g:ale_php_phpstan_executable = get(g:, 'ale_php_phpstan_executable', 'phpsta let g:ale_php_phpstan_level = get(g:, 'ale_php_phpstan_level', '') let g:ale_php_phpstan_configuration = get(g:, 'ale_php_phpstan_configuration', '') let g:ale_php_phpstan_autoload = get(g:, 'ale_php_phpstan_autoload', '') +let g:ale_php_phpstan_memory_limit = get(g:, 'ale_php_phpstan_memory_limit', '') call ale#Set('php_phpstan_use_global', get(g:, 'ale_use_global_executables', 0)) function! ale_linters#php#phpstan#GetCommand(buffer, version) abort @@ -19,6 +20,11 @@ function! ale_linters#php#phpstan#GetCommand(buffer, version) abort \ ? ' -a ' . ale#Escape(l:autoload) \ : '' + let l:memory_limit = ale#Var(a:buffer, 'php_phpstan_memory_limit') + let l:memory_limit_option = !empty(l:memory_limit) + \ ? ' --memory-limit ' . ale#Escape(l:memory_limit) + \ : '' + let l:level = ale#Var(a:buffer, 'php_phpstan_level') let l:config_file_exists = ale#path#FindNearestFile(a:buffer, 'phpstan.neon') let l:dist_config_file_exists = ale#path#FindNearestFile(a:buffer, 'phpstan.neon.dist') @@ -41,6 +47,7 @@ function! ale_linters#php#phpstan#GetCommand(buffer, version) abort \ . l:configuration_option \ . l:autoload_option \ . l:level_option + \ . l:memory_limit_option \ . ' %s' endfunction diff --git a/vim-config/plugins/ale/ale_linters/php/psalm.vim b/vim-config/plugins/ale/ale_linters/php/psalm.vim index dbbe9453..f1280057 100644 --- a/vim-config/plugins/ale/ale_linters/php/psalm.vim +++ b/vim-config/plugins/ale/ale_linters/php/psalm.vim @@ -6,6 +6,12 @@ call ale#Set('php_psalm_options', '') call ale#Set('php_psalm_use_global', get(g:, 'ale_use_global_executables', 0)) function! ale_linters#php#psalm#GetProjectRoot(buffer) abort + let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json') + + if (!empty(l:composer_path)) + return fnamemodify(l:composer_path, ':h') + endif + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' diff --git a/vim-config/plugins/ale/ale_linters/powershell/cspell.vim b/vim-config/plugins/ale/ale_linters/powershell/cspell.vim new file mode 100644 index 00000000..4a66dbaa --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/powershell/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for PowerShell files. + +call ale#handlers#cspell#DefineLinter('powershell') diff --git a/vim-config/plugins/ale/ale_linters/powershell/psscriptanalyzer.vim b/vim-config/plugins/ale/ale_linters/powershell/psscriptanalyzer.vim index 4794d9d8..8a8b4b45 100644 --- a/vim-config/plugins/ale/ale_linters/powershell/psscriptanalyzer.vim +++ b/vim-config/plugins/ale/ale_linters/powershell/psscriptanalyzer.vim @@ -13,7 +13,7 @@ function! ale_linters#powershell#psscriptanalyzer#GetExecutable(buffer) abort return ale#Var(a:buffer, 'powershell_psscriptanalyzer_executable') endfunction -" Run Invoke-ScriptAnalyzer and output each linting message as 4 seperate lines +" Run Invoke-ScriptAnalyzer and output each linting message as 4 separate lines " for each parsing function! ale_linters#powershell#psscriptanalyzer#GetCommand(buffer) abort let l:exclude_option = ale#Var( diff --git a/vim-config/plugins/ale/ale_linters/proto/buf_lint.vim b/vim-config/plugins/ale/ale_linters/proto/buf_lint.vim new file mode 100644 index 00000000..a22f8e53 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/proto/buf_lint.vim @@ -0,0 +1,26 @@ +" Author: Alex McKinney +" Description: Run buf lint. + +call ale#Set('proto_buf_lint_executable', 'buf') +call ale#Set('proto_buf_lint_config', '') +call ale#Set('proto_buf_lint_options', '') + +function! ale_linters#proto#buf_lint#GetCommand(buffer) abort + let l:config = ale#Var(a:buffer, 'proto_buf_lint_config') + let l:options = ale#Var(a:buffer, 'proto_buf_lint_options') + + return '%e lint' + \ . (!empty(l:config) ? ' --config=' . ale#Escape(l:config) : '') + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %s#include_package_files=true' +endfunction + +call ale#linter#Define('proto', { +\ 'name': 'buf_lint', +\ 'aliases': ['buf-lint'], +\ 'lint_file': 1, +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'proto_buf_lint_executable')}, +\ 'command': function('ale_linters#proto#buf_lint#GetCommand'), +\ 'callback': 'ale#handlers#go#Handler', +\}) diff --git a/vim-config/plugins/ale/ale_linters/python/cspell.vim b/vim-config/plugins/ale/ale_linters/python/cspell.vim new file mode 100644 index 00000000..a2325311 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/python/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Python files. + +call ale#handlers#cspell#DefineLinter('python') diff --git a/vim-config/plugins/ale/ale_linters/python/pydocstyle.vim b/vim-config/plugins/ale/ale_linters/python/pydocstyle.vim index aa0e8b20..ef0d818c 100644 --- a/vim-config/plugins/ale/ale_linters/python/pydocstyle.vim +++ b/vim-config/plugins/ale/ale_linters/python/pydocstyle.vim @@ -29,7 +29,7 @@ function! ale_linters#python#pydocstyle#GetCommand(buffer) abort return ale#Escape(l:executable) . l:exec_args \ . ale#Pad(ale#Var(a:buffer, 'python_pydocstyle_options')) - \ . ' %s:t' + \ . ' %s' endfunction function! ale_linters#python#pydocstyle#Handle(buffer, lines) abort diff --git a/vim-config/plugins/ale/ale_linters/python/pylama.vim b/vim-config/plugins/ale/ale_linters/python/pylama.vim index 73b59b07..14f8071a 100644 --- a/vim-config/plugins/ale/ale_linters/python/pylama.vim +++ b/vim-config/plugins/ale/ale_linters/python/pylama.vim @@ -22,6 +22,22 @@ function! ale_linters#python#pylama#GetExecutable(buffer) abort return ale#python#FindExecutable(a:buffer, 'python_pylama', ['pylama']) endfunction +function! ale_linters#python#pylama#RunWithVersionCheck(buffer) abort + let l:executable = ale_linters#python#pylama#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run pylama' + \ : '' + + let l:command = ale#Escape(l:executable) . l:exec_args . ' --version' + + return ale#semver#RunWithVersionCheck( + \ a:buffer, + \ l:executable, + \ l:command, + \ function('ale_linters#python#pylama#GetCommand'), + \) +endfunction + function! ale_linters#python#pylama#GetCwd(buffer) abort if ale#Var(a:buffer, 'python_pylama_change_directory') " Pylama loads its configuration from the current directory only, and @@ -35,27 +51,33 @@ function! ale_linters#python#pylama#GetCwd(buffer) abort return '' endfunction -function! ale_linters#python#pylama#GetCommand(buffer) abort +function! ale_linters#python#pylama#GetCommand(buffer, version) abort let l:executable = ale_linters#python#pylama#GetExecutable(a:buffer) let l:exec_args = l:executable =~? 'pipenv\|poetry$' \ ? ' run pylama' \ : '' + " json format is added in version 8.1.4 + " https://github.com/klen/pylama/blob/develop/Changelog + let l:format_json_args = ale#semver#GTE(a:version, [8, 1, 4]) + \ ? ' --format json' + \ : '' + " Note: Using %t to lint changes would be preferable, but many pylama " checks use surrounding paths (e.g. C0103 module name, E0402 relative " import beyond top, etc.). Neither is ideal. return ale#Escape(l:executable) . l:exec_args \ . ale#Pad(ale#Var(a:buffer, 'python_pylama_options')) + \ . l:format_json_args \ . ' %s' endfunction -function! ale_linters#python#pylama#Handle(buffer, lines) abort +function! ale_linters#python#pylama#Handle(buffer, version, lines) abort if empty(a:lines) return [] endif let l:output = ale#python#HandleTraceback(a:lines, 1) - let l:pattern = '\v^.{-}:([0-9]+):([0-9]+): +%(([A-Z][0-9]+):? +)?(.*)$' " First letter of error code is a pylint-compatible message type " http://pylint.pycqa.org/en/latest/user_guide/output.html#source-code-analysis-section @@ -75,16 +97,41 @@ function! ale_linters#python#pylama#Handle(buffer, lines) abort \ 'D': 'style', \} - for l:match in ale#util#GetMatches(a:lines, l:pattern) - call add(l:output, { - \ 'lnum': str2nr(l:match[1]), - \ 'col': str2nr(l:match[2]), - \ 'code': l:match[3], - \ 'type': get(l:pylint_type_to_ale_type, l:match[3][0], 'W'), - \ 'sub_type': get(l:pylint_type_to_ale_sub_type, l:match[3][0], ''), - \ 'text': l:match[4], - \}) - endfor + if ale#semver#GTE(a:version, [8, 1, 4]) + try + let l:errors = json_decode(join(a:lines, '')) + catch + return l:output + endtry + + if empty(l:errors) + return l:output + endif + + for l:error in l:errors + call add(l:output, { + \ 'lnum': l:error['lnum'], + \ 'col': l:error['col'], + \ 'code': l:error['number'], + \ 'type': get(l:pylint_type_to_ale_type, l:error['etype'], 'W'), + \ 'sub_type': get(l:pylint_type_to_ale_sub_type, l:error['etype'], ''), + \ 'text': printf('%s [%s]', l:error['message'], l:error['source']), + \}) + endfor + else + let l:pattern = '\v^.{-}:([0-9]+):([0-9]+): +%(([A-Z][0-9]+):? +)?(.*)$' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': str2nr(l:match[1]), + \ 'col': str2nr(l:match[2]), + \ 'code': l:match[3], + \ 'type': get(l:pylint_type_to_ale_type, l:match[3][0], 'W'), + \ 'sub_type': get(l:pylint_type_to_ale_sub_type, l:match[3][0], ''), + \ 'text': l:match[4], + \}) + endfor + endif return l:output endfunction @@ -93,7 +140,15 @@ call ale#linter#Define('python', { \ 'name': 'pylama', \ 'executable': function('ale_linters#python#pylama#GetExecutable'), \ 'cwd': function('ale_linters#python#pylama#GetCwd'), -\ 'command': function('ale_linters#python#pylama#GetCommand'), -\ 'callback': 'ale_linters#python#pylama#Handle', +\ 'command': function('ale_linters#python#pylama#RunWithVersionCheck'), +\ 'callback': {buffer, lines -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale_linters#python#pylama#GetExecutable(buffer), +\ '%e --version', +\ {buffer, version -> ale_linters#python#pylama#Handle( +\ buffer, +\ l:version, +\ lines)}, +\ )}, \ 'lint_file': 1, \}) diff --git a/vim-config/plugins/ale/ale_linters/python/pylsp.vim b/vim-config/plugins/ale/ale_linters/python/pylsp.vim index 537d1e74..a699e4f6 100644 --- a/vim-config/plugins/ale/ale_linters/python/pylsp.vim +++ b/vim-config/plugins/ale/ale_linters/python/pylsp.vim @@ -22,6 +22,19 @@ function! ale_linters#python#pylsp#GetExecutable(buffer) abort return ale#python#FindExecutable(a:buffer, 'python_pylsp', ['pylsp']) endfunction +" Force the cwd of the server to be the same as the project root to +" fix issues with treating local files matching first or third party library +" names being imported incorrectly. +function! ale_linters#python#pylsp#GetCwd(buffer) abort + let l:fake_linter = { + \ 'name': 'pylsp', + \ 'project_root': function('ale#python#FindProjectRoot'), + \} + let l:root = ale#lsp_linter#FindProjectRoot(a:buffer, l:fake_linter) + + return !empty(l:root) ? l:root : v:null +endfunction + function! ale_linters#python#pylsp#GetCommand(buffer) abort let l:executable = ale_linters#python#pylsp#GetExecutable(a:buffer) @@ -36,6 +49,7 @@ call ale#linter#Define('python', { \ 'name': 'pylsp', \ 'lsp': 'stdio', \ 'executable': function('ale_linters#python#pylsp#GetExecutable'), +\ 'cwd': function('ale_linters#python#pylsp#GetCwd'), \ 'command': function('ale_linters#python#pylsp#GetCommand'), \ 'project_root': function('ale#python#FindProjectRoot'), \ 'completion_filter': 'ale#completion#python#CompletionItemFilter', diff --git a/vim-config/plugins/ale/ale_linters/python/pyright.vim b/vim-config/plugins/ale/ale_linters/python/pyright.vim index 422ecd61..5ce46600 100644 --- a/vim-config/plugins/ale/ale_linters/python/pyright.vim +++ b/vim-config/plugins/ale/ale_linters/python/pyright.vim @@ -32,10 +32,24 @@ function! ale_linters#python#pyright#GetConfig(buffer) abort return l:config endfunction +" Force the cwd of the server to be the same as the project root to +" fix issues with treating local files matching first or third party library +" names being imported incorrectly. +function! ale_linters#python#pyright#GetCwd(buffer) abort + let l:fake_linter = { + \ 'name': 'pyright', + \ 'project_root': function('ale#python#FindProjectRoot'), + \} + let l:root = ale#lsp_linter#FindProjectRoot(a:buffer, l:fake_linter) + + return !empty(l:root) ? l:root : v:null +endfunction + call ale#linter#Define('python', { \ 'name': 'pyright', \ 'lsp': 'stdio', \ 'executable': {b -> ale#Var(b, 'python_pyright_executable')}, +\ 'cwd': function('ale_linters#python#pyright#GetCwd'), \ 'command': '%e --stdio', \ 'project_root': function('ale#python#FindProjectRoot'), \ 'completion_filter': 'ale#completion#python#CompletionItemFilter', diff --git a/vim-config/plugins/ale/ale_linters/python/refurb.vim b/vim-config/plugins/ale/ale_linters/python/refurb.vim new file mode 100644 index 00000000..1ae77b77 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/python/refurb.vim @@ -0,0 +1,73 @@ +" Author: Yining +" Description: refurb as linter for python files + +call ale#Set('python_refurb_executable', 'refurb') +call ale#Set('python_refurb_options', '') +call ale#Set('python_refurb_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_refurb_change_directory', 1) +call ale#Set('python_refurb_auto_pipenv', 0) +call ale#Set('python_refurb_auto_poetry', 0) + +function! ale_linters#python#refurb#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_refurb_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_refurb_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_refurb', ['refurb']) +endfunction + +function! ale_linters#python#refurb#GetCwd(buffer) abort + if ale#Var(a:buffer, 'python_refurb_change_directory') + " Run from project root if found, else from buffer dir. + let l:project_root = ale#python#FindProjectRoot(a:buffer) + + return !empty(l:project_root) ? l:project_root : '%s:h' + endif + + return '' +endfunction + +function! ale_linters#python#refurb#GetCommand(buffer) abort + let l:executable = ale_linters#python#refurb#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run refurb' + \ : '' + + return ale#Escape(l:executable) . l:exec_args + \ . ale#Pad(ale#Var(a:buffer, 'python_refurb_options')) + \ . ' %s' +endfunction + +function! ale_linters#python#refurb#Handle(buffer, lines) abort + "Example: path/to/file.py:3:17 [FURB109]: Replace `in [x, y, z]` with `in (x, y, z)` + let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+)?:?\s*\[FURB(\d+)\]:\s*(.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'code': l:match[3] + 0, + \ 'text': l:match[4], + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'refurb', +\ 'executable': function('ale_linters#python#refurb#GetExecutable'), +\ 'cwd': function('ale_linters#python#refurb#GetCwd'), +\ 'command': function('ale_linters#python#refurb#GetCommand'), +\ 'callback': 'ale_linters#python#refurb#Handle', +\ 'output_stream': 'both', +\ 'read_buffer': 0, +\}) diff --git a/vim-config/plugins/ale/ale_linters/python/ruff.vim b/vim-config/plugins/ale/ale_linters/python/ruff.vim new file mode 100644 index 00000000..67595fe3 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/python/ruff.vim @@ -0,0 +1,84 @@ +" Author: Yining +" Description: ruff as linter for python files + +call ale#Set('python_ruff_executable', 'ruff') +call ale#Set('python_ruff_options', '') +call ale#Set('python_ruff_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_ruff_change_directory', 1) +call ale#Set('python_ruff_auto_pipenv', 0) +call ale#Set('python_ruff_auto_poetry', 0) + +call ale#fix#registry#Add('ruff', +\ 'ale#fixers#ruff#Fix', +\ ['python'], +\ 'A python linter/fixer for Python written in Rust' +\) + +function! ale_linters#python#ruff#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_ruff_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_ruff_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_ruff', ['ruff']) +endfunction + +function! ale_linters#python#ruff#GetCwd(buffer) abort + if ale#Var(a:buffer, 'python_ruff_change_directory') + " Run from project root if found, else from buffer dir. + let l:project_root = ale#python#FindProjectRoot(a:buffer) + + return !empty(l:project_root) ? l:project_root : '%s:h' + endif + + return '' +endfunction + +function! ale_linters#python#ruff#GetCommand(buffer, version) abort + let l:executable = ale_linters#python#ruff#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run ruff' + \ : '' + + " NOTE: ruff version `0.0.69` supports liniting input from stdin + 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]) ? ' -' : ' %s') +endfunction + +function! ale_linters#python#ruff#Handle(buffer, lines) abort + "Example: path/to/file.py:10:5: E999 SyntaxError: unexpected indent + let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+)?:? (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'ruff', +\ 'executable': function('ale_linters#python#ruff#GetExecutable'), +\ 'cwd': function('ale_linters#python#ruff#GetCwd'), +\ 'command': {buffer -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale_linters#python#ruff#GetExecutable(buffer), +\ '%e --version', +\ function('ale_linters#python#ruff#GetCommand'), +\ )}, +\ 'callback': 'ale_linters#python#ruff#Handle', +\ 'output_stream': 'both', +\ 'read_buffer': 1, +\}) diff --git a/vim-config/plugins/ale/ale_linters/python/unimport.vim b/vim-config/plugins/ale/ale_linters/python/unimport.vim new file mode 100644 index 00000000..71fd80f0 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/python/unimport.vim @@ -0,0 +1,75 @@ +" Author: Author: Jon Parise + +call ale#Set('python_unimport_executable', 'unimport') +call ale#Set('python_unimport_options', '') +call ale#Set('python_unimport_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_unimport_auto_pipenv', 0) +call ale#Set('python_unimport_auto_poetry', 0) + +function! ale_linters#python#unimport#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_unimport_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_unimport_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_unimport', ['unimport']) +endfunction + +function! ale_linters#python#unimport#GetCommand(buffer) abort + let l:executable = ale_linters#python#unimport#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run unimport' + \ : '' + + return '%e' . l:exec_args + \ . ale#Pad(ale#Var(a:buffer, 'python_unimport_options')) + \ . ' --check' + \ . ' %t' +endfunction + + +function! ale_linters#python#unimport#GetCwd(buffer) abort + let l:project_root = ale#python#FindProjectRoot(a:buffer) + + return !empty(l:project_root) + \ ? l:project_root + \ : expand('#' . a:buffer . ':p:h') +endfunction + + +function! ale_linters#python#unimport#Handle(buffer, lines) abort + let l:output = ale#python#HandleTraceback(a:lines, 10) + + if !empty(l:output) + return l:output + endif + + " Matches lines like: + " + " urllib.parse at path/to/file.py:9 + let l:pattern = '\v(.+) at [^:]+:(\d+)$' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[2] + 0, + \ 'type': 'W', + \ 'text': 'unused: ' . l:match[1], + \}) + endfor + + return l:output +endfunction + + +call ale#linter#Define('python', { +\ 'name': 'unimport', +\ 'executable': function('ale_linters#python#unimport#GetExecutable'), +\ 'cwd': function('ale_linters#python#unimport#GetCwd'), +\ 'command': function('ale_linters#python#unimport#GetCommand'), +\ 'callback': 'ale_linters#python#unimport#Handle', +\}) diff --git a/vim-config/plugins/ale/ale_linters/rego/cspell.vim b/vim-config/plugins/ale/ale_linters/rego/cspell.vim new file mode 100644 index 00000000..a54a5379 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/rego/cspell.vim @@ -0,0 +1,4 @@ +scriptencoding utf-8 +" Description: cspell support for rego files. + +call ale#handlers#cspell#DefineLinter('rego') diff --git a/vim-config/plugins/ale/ale_linters/rego/opacheck.vim b/vim-config/plugins/ale/ale_linters/rego/opacheck.vim new file mode 100644 index 00000000..77d8c93a --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/rego/opacheck.vim @@ -0,0 +1,56 @@ +" Description: opa check for rego files + +call ale#Set('rego_opacheck_executable', 'opa') +call ale#Set('rego_opacheck_options', '') + +function! ale_linters#rego#opacheck#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'rego_opacheck_executable') +endfunction + +function! ale_linters#rego#opacheck#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'rego_opacheck_options') + + return ale#Escape(ale_linters#rego#opacheck#GetExecutable(a:buffer)) + \ . ' check %s --format json ' + \ . (!empty(l:options) ? ' ' . l:options : '') +endfunction + +function! ale_linters#rego#opacheck#Handle(buffer, lines) abort + let l:output = [] + + let l:errors = ale#util#FuzzyJSONDecode(a:lines, {'errors': []}) + let l:dir = expand('#' . a:buffer . ':p:h') + let l:file = expand('#' . a:buffer . ':p') + + for l:error in l:errors['errors'] + if has_key(l:error, 'location') + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:error['location']['file']), + \ 'lnum': l:error['location']['row'], + \ 'col': l:error['location']['col'], + \ 'text': l:error['message'], + \ 'code': l:error['code'], + \ 'type': 'E', + \}) + else + call add(l:output, { + \ 'filename': l:file, + \ 'lnum': 0, + \ 'col': 0, + \ 'text': l:error['message'], + \ 'code': l:error['code'], + \ 'type': 'E', + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('rego', { +\ 'name': 'opacheck', +\ 'output_stream': 'both', +\ 'executable': function('ale_linters#rego#opacheck#GetExecutable'), +\ 'command': function('ale_linters#rego#opacheck#GetCommand'), +\ 'callback': 'ale_linters#rego#opacheck#Handle', +\}) diff --git a/vim-config/plugins/ale/ale_linters/rst/cspell.vim b/vim-config/plugins/ale/ale_linters/rst/cspell.vim new file mode 100644 index 00000000..14cfb42e --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/rst/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for ReStructuredText files. + +call ale#handlers#cspell#DefineLinter('rst') diff --git a/vim-config/plugins/ale/ale_linters/ruby/cspell.vim b/vim-config/plugins/ale/ale_linters/ruby/cspell.vim new file mode 100644 index 00000000..780356b1 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/ruby/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Ruby files. + +call ale#handlers#cspell#DefineLinter('ruby') diff --git a/vim-config/plugins/ale/ale_linters/ruby/reek.vim b/vim-config/plugins/ale/ale_linters/ruby/reek.vim index 226b452e..b6fa9d76 100644 --- a/vim-config/plugins/ale/ale_linters/ruby/reek.vim +++ b/vim-config/plugins/ale/ale_linters/ruby/reek.vim @@ -19,6 +19,10 @@ function! ale_linters#ruby#reek#GetCommand(buffer, version) abort \ . l:display_name_args endfunction +function! s:GetDocumentationLink(error) abort + return get(a:error, 'documentation_link', get(a:error, 'wiki_link', '')) +endfunction + function! s:BuildText(buffer, error) abort let l:parts = [] @@ -29,7 +33,7 @@ function! s:BuildText(buffer, error) abort call add(l:parts, a:error.message) if ale#Var(a:buffer, 'ruby_reek_show_wiki_link') - call add(l:parts, '[' . a:error.wiki_link . ']') + call add(l:parts, '[' . s:GetDocumentationLink(a:error) . ']') endif return join(l:parts, ' ') diff --git a/vim-config/plugins/ale/ale_linters/rust/analyzer.vim b/vim-config/plugins/ale/ale_linters/rust/analyzer.vim index 77d946f7..3ead3871 100644 --- a/vim-config/plugins/ale/ale_linters/rust/analyzer.vim +++ b/vim-config/plugins/ale/ale_linters/rust/analyzer.vim @@ -9,9 +9,21 @@ function! ale_linters#rust#analyzer#GetCommand(buffer) abort endfunction function! ale_linters#rust#analyzer#GetProjectRoot(buffer) abort + " Try to find nearest Cargo.toml for cargo projects let l:cargo_file = ale#path#FindNearestFile(a:buffer, 'Cargo.toml') - return !empty(l:cargo_file) ? fnamemodify(l:cargo_file, ':h') : '' + if !empty(l:cargo_file) + return fnamemodify(l:cargo_file, ':h') + endif + + " Try to find nearest rust-project.json for non-cargo projects + let l:rust_project = ale#path#FindNearestFile(a:buffer, 'rust-project.json') + + if !empty(l:rust_project) + return fnamemodify(l:rust_project, ':h') + endif + + return '' endfunction call ale#linter#Define('rust', { diff --git a/vim-config/plugins/ale/ale_linters/rust/cspell.vim b/vim-config/plugins/ale/ale_linters/rust/cspell.vim new file mode 100644 index 00000000..d2523c7d --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/rust/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Rust files. + +call ale#handlers#cspell#DefineLinter('rust') diff --git a/vim-config/plugins/ale/ale_linters/rust/rustc.vim b/vim-config/plugins/ale/ale_linters/rust/rustc.vim index f140b58b..bc6431ba 100644 --- a/vim-config/plugins/ale/ale_linters/rust/rustc.vim +++ b/vim-config/plugins/ale/ale_linters/rust/rustc.vim @@ -1,7 +1,7 @@ " Author: Daniel Schemala " Description: rustc for rust files -call ale#Set('rust_rustc_options', '-Z no-codegen') +call ale#Set('rust_rustc_options', '--emit=mir -o /dev/null') function! ale_linters#rust#rustc#RustcCommand(buffer) abort " Try to guess the library search path. If the project is managed by cargo, diff --git a/vim-config/plugins/ale/ale_linters/scala/cspell.vim b/vim-config/plugins/ale/ale_linters/scala/cspell.vim new file mode 100644 index 00000000..fa09d420 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/scala/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Scala files. + +call ale#handlers#cspell#DefineLinter('scala') diff --git a/vim-config/plugins/ale/ale_linters/sh/cspell.vim b/vim-config/plugins/ale/ale_linters/sh/cspell.vim new file mode 100644 index 00000000..e3c5a6f0 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/sh/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for shell scripts. + +call ale#handlers#cspell#DefineLinter('sh') diff --git a/vim-config/plugins/ale/ale_linters/sql/sqlfluff.vim b/vim-config/plugins/ale/ale_linters/sql/sqlfluff.vim new file mode 100644 index 00000000..0ec062bd --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/sql/sqlfluff.vim @@ -0,0 +1,72 @@ +" Author: Carl Smedstad +" Description: sqlfluff for SQL files + +let g:ale_sql_sqlfluff_executable = +\ get(g:, 'ale_sql_sqlfluff_executable', 'sqlfluff') + +let g:ale_sql_sqlfluff_options = +\ get(g:, 'ale_sql_sqlfluff_options', '') + +function! ale_linters#sql#sqlfluff#Executable(buffer) abort + return ale#Var(a:buffer, 'sql_sqlfluff_executable') +endfunction + +function! ale_linters#sql#sqlfluff#Command(buffer) abort + let l:executable = ale_linters#sql#sqlfluff#Executable(a:buffer) + let l:options = ale#Var(a:buffer, 'sql_sqlfluff_options') + + let l:cmd = + \ ale#Escape(l:executable) + \ . ' lint' + + let l:config_file = ale#path#FindNearestFile(a:buffer, '.sqlfluff') + + if !empty(l:config_file) + let l:cmd .= ' --config ' . ale#Escape(l:config_file) + else + let l:cmd .= ' --dialect ansi' + endif + + let l:cmd .= + \ ' --format json ' + \ . l:options + \ . ' %t' + + return l:cmd +endfunction + +function! ale_linters#sql#sqlfluff#Handle(buffer, lines) abort + let l:output = [] + let l:json_lines = ale#util#FuzzyJSONDecode(a:lines, []) + + if empty(l:json_lines) + return l:output + endif + + let l:json = l:json_lines[0] + + " if there's no warning, 'result' is `null`. + if empty(get(l:json, 'violations')) + return l:output + endif + + for l:violation in get(l:json, 'violations', []) + call add(l:output, { + \ 'filename': l:json.filepath, + \ 'lnum': l:violation.line_no, + \ 'col': l:violation.line_pos, + \ 'text': l:violation.description, + \ 'code': l:violation.code, + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('sql', { +\ 'name': 'sqlfluff', +\ 'executable': function('ale_linters#sql#sqlfluff#Executable'), +\ 'command': function('ale_linters#sql#sqlfluff#Command'), +\ 'callback': 'ale_linters#sql#sqlfluff#Handle', +\}) diff --git a/vim-config/plugins/ale/ale_linters/swift/cspell.vim b/vim-config/plugins/ale/ale_linters/swift/cspell.vim new file mode 100644 index 00000000..25451e9d --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/swift/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Swift files. + +call ale#handlers#cspell#DefineLinter('swift') diff --git a/vim-config/plugins/ale/ale_linters/terraform/checkov.vim b/vim-config/plugins/ale/ale_linters/terraform/checkov.vim new file mode 100644 index 00000000..568b46e1 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/terraform/checkov.vim @@ -0,0 +1,41 @@ +" Author: Thyme-87 +" Description: use checkov for providing warnings via ale + +call ale#Set('terraform_checkov_executable', 'checkov') +call ale#Set('terraform_checkov_options', '') + +function! ale_linters#terraform#checkov#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'terraform_checkov_executable') +endfunction + +function! ale_linters#terraform#checkov#GetCommand(buffer) abort + return '%e ' . '-f %t -o json --quiet ' . ale#Var(a:buffer, 'terraform_checkov_options') +endfunction + +function! ale_linters#terraform#checkov#Handle(buffer, lines) abort + let l:output = [] + + let l:results = get(get(ale#util#FuzzyJSONDecode(a:lines, {}), 'results', []), 'failed_checks', []) + + for l:violation in l:results + call add(l:output, { + \ 'filename': l:violation['file_path'], + \ 'lnum': l:violation['file_line_range'][0], + \ 'end_lnum': l:violation['file_line_range'][1], + \ 'text': l:violation['check_name'] . ' [' . l:violation['check_id'] . ']', + \ 'detail': l:violation['check_id'] . ': ' . l:violation['check_name'] . "\n" . + \ 'For more information, see: '. l:violation['guideline'], + \ 'type': 'W', + \ }) + endfor + + return l:output +endfunction + +call ale#linter#Define('terraform', { +\ 'name': 'checkov', +\ 'output_stream': 'stdout', +\ 'executable': function('ale_linters#terraform#checkov#GetExecutable'), +\ 'command': function('ale_linters#terraform#checkov#GetCommand'), +\ 'callback': 'ale_linters#terraform#checkov#Handle', +\}) diff --git a/vim-config/plugins/ale/ale_linters/terraform/terraform.vim b/vim-config/plugins/ale/ale_linters/terraform/terraform.vim index cf134460..1beb8501 100644 --- a/vim-config/plugins/ale/ale_linters/terraform/terraform.vim +++ b/vim-config/plugins/ale/ale_linters/terraform/terraform.vim @@ -21,7 +21,13 @@ function! ale_linters#terraform#terraform#GetType(severity) abort endfunction function! ale_linters#terraform#terraform#GetDetail(error) abort - return get(a:error, 'detail', get(a:error, 'summary', '')) + let l:detail = get(a:error, 'detail', '') + + if strlen(l:detail) > 0 + return l:detail + else + return get(a:error, 'summary', '') + endif endfunction function! ale_linters#terraform#terraform#Handle(buffer, lines) abort diff --git a/vim-config/plugins/ale/ale_linters/terraform/tfsec.vim b/vim-config/plugins/ale/ale_linters/terraform/tfsec.vim new file mode 100644 index 00000000..d29cdd13 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/terraform/tfsec.vim @@ -0,0 +1,87 @@ +" Description: tfsec for Terraform files +" +" See: https://www.terraform.io/ +" https://github.com/aquasecurity/tfsec + +call ale#Set('terraform_tfsec_options', '') +call ale#Set('terraform_tfsec_executable', 'tfsec') + +let s:separator = has('win32') ? '\' : '/' + +function! ale_linters#terraform#tfsec#Handle(buffer, lines) abort + let l:output = [] + let l:json = ale#util#FuzzyJSONDecode(a:lines, {}) + + " if there's no warning, 'result' is `null`. + if empty(get(l:json, 'results')) + return l:output + endif + + for l:result in get(l:json, 'results', []) + if l:result.severity is# 'LOW' + let l:type = 'I' + elseif l:result.severity is# 'CRITICAL' + let l:type = 'E' + else + let l:type = 'W' + endif + + call add(l:output, { + \ 'filename': l:result.location.filename, + \ 'lnum': l:result.location.start_line, + \ 'end_lnum': l:result.location.end_line, + \ 'text': l:result.description, + \ 'code': l:result.long_id, + \ 'type': l:type, + \}) + endfor + + return l:output +endfunction + +" Construct command arguments to tfsec with `terraform_tfsec_options`. +function! ale_linters#terraform#tfsec#GetCommand(buffer) abort + let l:cmd = '%e' + + let l:config = ale_linters#terraform#tfsec#FindConfig(a:buffer) + + if !empty(l:config) + let l:cmd .= ' --config-file ' . l:config + endif + + let l:opts = ale#Var(a:buffer, 'terraform_tfsec_options') + + if !empty(l:opts) + let l:cmd .= ' ' . l:opts + endif + + let l:cmd .= ' --format json' + + return l:cmd +endfunction + +" Find the nearest configuration file of tfsec. +function! ale_linters#terraform#tfsec#FindConfig(buffer) abort + let l:config_dir = ale#path#FindNearestDirectory(a:buffer, '.tfsec') + + if !empty(l:config_dir) + " https://aquasecurity.github.io/tfsec/v1.28.0/guides/configuration/config/ + for l:basename in ['config.yml', 'config.json'] + let l:config = ale#path#Simplify(join([l:config_dir, l:basename], s:separator)) + + if filereadable(l:config) + return ale#Escape(l:config) + endif + endfor + endif + + return '' +endfunction + +call ale#linter#Define('terraform', { +\ 'name': 'tfsec', +\ 'executable': {b -> ale#Var(b, 'terraform_tfsec_executable')}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#terraform#tfsec#GetCommand'), +\ 'callback': 'ale_linters#terraform#tfsec#Handle', +\}) diff --git a/vim-config/plugins/ale/ale_linters/tex/cspell.vim b/vim-config/plugins/ale/ale_linters/tex/cspell.vim new file mode 100644 index 00000000..4cf2b08e --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/tex/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for TeX files. + +call ale#handlers#cspell#DefineLinter('tex') diff --git a/vim-config/plugins/ale/ale_linters/tex/lacheck.vim b/vim-config/plugins/ale/ale_linters/tex/lacheck.vim index 19d69403..35aad083 100644 --- a/vim-config/plugins/ale/ale_linters/tex/lacheck.vim +++ b/vim-config/plugins/ale/ale_linters/tex/lacheck.vim @@ -13,7 +13,7 @@ function! ale_linters#tex#lacheck#Handle(buffer, lines) abort for l:match in ale#util#GetMatches(a:lines, l:pattern) " lacheck follows `\input{}` commands. If the cwd is not the same as the - " file in the buffer then it will fail to find the inputed items. We do not + " file in the buffer then it will fail to find the inputted items. We do not " want warnings from those items anyway if !empty(matchstr(l:match[3], '^Could not open ".\+"$')) continue diff --git a/vim-config/plugins/ale/ale_linters/tex/texlab.vim b/vim-config/plugins/ale/ale_linters/tex/texlab.vim index 0794bf51..8e96b80b 100644 --- a/vim-config/plugins/ale/ale_linters/tex/texlab.vim +++ b/vim-config/plugins/ale/ale_linters/tex/texlab.vim @@ -4,6 +4,7 @@ call ale#Set('tex_texlab_executable', 'texlab') call ale#Set('tex_texlab_options', '') +call ale#Set('tex_texlab_config', {}) function! ale_linters#tex#texlab#GetProjectRoot(buffer) abort let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') @@ -21,4 +22,5 @@ call ale#linter#Define('tex', { \ 'executable': {b -> ale#Var(b, 'tex_texlab_executable')}, \ 'command': function('ale_linters#tex#texlab#GetCommand'), \ 'project_root': function('ale_linters#tex#texlab#GetProjectRoot'), +\ 'lsp_config': {b -> ale#Var(b, 'tex_texlab_config')}, \}) diff --git a/vim-config/plugins/ale/ale_linters/texinfo/cspell.vim b/vim-config/plugins/ale/ale_linters/texinfo/cspell.vim new file mode 100644 index 00000000..d691b3a7 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/texinfo/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for TeXInfo files. + +call ale#handlers#cspell#DefineLinter('texinfo') diff --git a/vim-config/plugins/ale/ale_linters/text/cspell.vim b/vim-config/plugins/ale/ale_linters/text/cspell.vim new file mode 100644 index 00000000..813ef3b8 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/text/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for general text files. + +call ale#handlers#cspell#DefineLinter('text') diff --git a/vim-config/plugins/ale/ale_linters/typescript/cspell.vim b/vim-config/plugins/ale/ale_linters/typescript/cspell.vim new file mode 100644 index 00000000..6061b75c --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/typescript/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for TypeScript files. + +call ale#handlers#cspell#DefineLinter('typescript') diff --git a/vim-config/plugins/ale/ale_linters/vue/cspell.vim b/vim-config/plugins/ale/ale_linters/vue/cspell.vim new file mode 100644 index 00000000..2d8bfdc3 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/vue/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Vue files. + +call ale#handlers#cspell#DefineLinter('vue') diff --git a/vim-config/plugins/ale/ale_linters/vue/volar.vim b/vim-config/plugins/ale/ale_linters/vue/volar.vim new file mode 100644 index 00000000..bb41b883 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/vue/volar.vim @@ -0,0 +1,80 @@ +" Author: Arnold Chand +" Description: Volar Language Server integration for ALE adopted from +" nvim-lspconfig and volar/packages/shared/src/types.ts + +call ale#Set('vue_volar_executable', 'vue-language-server') +call ale#Set('vue_volar_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('vue_volar_init_options', { +\ 'documentFeatures': { +\ 'documentColor': v:false, +\ 'documentFormatting': { +\ 'defaultPrintWidth': 100, +\ }, +\ 'documentSymbol': v:true, +\ 'foldingRange': v:true, +\ 'linkedEditingRange': v:true, +\ 'selectionRange': v:true, +\ }, +\ 'languageFeatures': { +\ 'callHierarchy': v:true, +\ 'codeAction': v:true, +\ 'codeLens': v:true, +\ 'completion': { +\ 'defaultAttrNameCase': 'kebabCase', +\ 'defaultTagNameCase': 'both', +\ 'getDocumentNameCaseRequest': v:false, +\ 'getDocumentSelectionRequest': v:false, +\ }, +\ 'definition': v:true, +\ 'diagnostics': v:true, +\ 'documentHighlight': v:true, +\ 'documentLink': v:true, +\ 'hover': v:true, +\ 'references': v:true, +\ 'rename': v:true, +\ 'renameFileRefactoring': v:true, +\ 'schemaRequestService': v:true, +\ 'semanticTokens': v:false, +\ 'signatureHelp': v:true, +\ 'typeDefinition': v:true, +\ 'workspaceSymbol': v:false, +\ }, +\ 'typescript': { +\ 'serverPath': '', +\ 'localizedPath': v:null, +\ }, +\}) + +function! ale_linters#vue#volar#GetProjectRoot(buffer) abort + let l:project_roots = ['package.json', 'vite.config.js', '.git', bufname(a:buffer)] + + for l:project_root in l:project_roots + let l:nearest_filepath = ale#path#FindNearestFile(a:buffer, l:project_root) + + if !empty(l:nearest_filepath) + return fnamemodify(l:nearest_filepath, ':h') + endif + endfor + + return '' +endfunction + +function! ale_linters#vue#volar#GetInitializationOptions(buffer) abort + let l:tsserver_path = ale#path#FindNearestExecutable(a:buffer, [ + \ 'node_modules/typescript/lib/tsserverlibrary.js' + \ ]) + let l:init_options = ale#Var(a:buffer, 'vue_volar_init_options') + let l:init_options.typescript.serverPath = l:tsserver_path + + return l:init_options +endfunction + +call ale#linter#Define('vue', { +\ 'name': 'volar', +\ 'language': 'vue', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#path#FindExecutable(b, 'vue_volar', ['node_modules/.bin/vue-language-server'])}, +\ 'command': '%e --stdio', +\ 'project_root': function('ale_linters#vue#volar#GetProjectRoot'), +\ 'initialization_options': function('ale_linters#vue#volar#GetInitializationOptions'), +\}) diff --git a/vim-config/plugins/ale/ale_linters/wgsl/naga.vim b/vim-config/plugins/ale/ale_linters/wgsl/naga.vim new file mode 100644 index 00000000..2816751b --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/wgsl/naga.vim @@ -0,0 +1,12 @@ +" Author: rhysd +" Description: naga-cli linter for WGSL syntax. + +call ale#Set('wgsl_naga_executable', 'naga') + +call ale#linter#Define('wgsl', { +\ 'name': 'naga', +\ 'executable': {b -> ale#Var(b, 'wgsl_naga_executable')}, +\ 'output_stream': 'stderr', +\ 'command': {b -> '%e --stdin-file-path %s'}, +\ 'callback': 'ale#handlers#naga#Handle', +\}) diff --git a/vim-config/plugins/ale/ale_linters/xhtml/cspell.vim b/vim-config/plugins/ale/ale_linters/xhtml/cspell.vim new file mode 100644 index 00000000..c465b41b --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/xhtml/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for XHTML files. + +call ale#handlers#cspell#DefineLinter('xhtml') diff --git a/vim-config/plugins/ale/ale_linters/yaml/actionlint.vim b/vim-config/plugins/ale/ale_linters/yaml/actionlint.vim new file mode 100644 index 00000000..1e2fda49 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/yaml/actionlint.vim @@ -0,0 +1,11 @@ +" Author: bretello + +call ale#Set('yaml_actionlint_executable', 'actionlint') +call ale#Set('yaml_actionlint_options', '') + +call ale#linter#Define('yaml', { +\ 'name': 'actionlint', +\ 'executable': {b -> ale#Var(b, 'yaml_actionlint_executable')}, +\ 'command': function('ale#handlers#actionlint#GetCommand'), +\ 'callback': 'ale#handlers#actionlint#Handle', +\}) diff --git a/vim-config/plugins/ale/ale_linters/yaml/gitlablint.vim b/vim-config/plugins/ale/ale_linters/yaml/gitlablint.vim new file mode 100644 index 00000000..ec48115a --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/yaml/gitlablint.vim @@ -0,0 +1,49 @@ +call ale#Set('yaml_gitlablint_executable', 'gll') +call ale#Set('yaml_gitlablint_options', '') + +function! ale_linters#yaml#gitlablint#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'yaml_gitlablint_options')) + \ . ' -p %t' +endfunction + +function! ale_linters#yaml#gitlablint#Handle(buffer, lines) abort + " Matches patterns line the following: + " (): mapping values are not allowed in this context at line 68 column 8 + " jobs:build:dev config contains unknown keys: ony + let l:pattern = '^\(.*\) at line \(\d\+\) column \(\d\+\)$' + let l:output = [] + + for l:line in a:lines + let l:match = matchlist(l:line, l:pattern) + + if !empty(l:match) + let l:item = { + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[1], + \ 'type': 'E', + \} + call add(l:output, l:item) + else + if l:line isnot# 'GitLab CI configuration is invalid' + let l:item = { + \ 'lnum': 0, + \ 'col': 0, + \ 'text': l:line, + \ 'type': 'E', + \} + call add(l:output, l:item) + endif + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('yaml', { +\ 'name': 'gitlablint', +\ 'executable': {b -> ale#Var(b, 'yaml_gitlablint_executable')}, +\ 'command': function('ale_linters#yaml#gitlablint#GetCommand'), +\ 'callback': 'ale_linters#yaml#gitlablint#Handle', +\ 'output_stream': 'stderr', +\}) diff --git a/vim-config/plugins/ale/ale_linters/yaml/ls.vim b/vim-config/plugins/ale/ale_linters/yaml/ls.vim new file mode 100644 index 00000000..8e3f6d00 --- /dev/null +++ b/vim-config/plugins/ale/ale_linters/yaml/ls.vim @@ -0,0 +1,34 @@ +" Author: Jeffrey Lau - https://github.com/zoonfafer +" Description: YAML Language Server https://github.com/redhat-developer/yaml-language-server + +call ale#Set('yaml_ls_executable', 'yaml-language-server') +call ale#Set('yaml_ls_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('yaml_ls_config', {}) + +function! ale_linters#yaml#ls#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'yaml_ls', [ + \ 'node_modules/.bin/yaml-language-server', + \]) +endfunction + +function! ale_linters#yaml#ls#GetCommand(buffer) abort + let l:executable = ale_linters#yaml#ls#GetExecutable(a:buffer) + + return ale#Escape(l:executable) . ' --stdio' +endfunction + +" Just use the current file +function! ale_linters#yaml#ls#FindProjectRoot(buffer) abort + let l:project_file = expand('#' . a:buffer . ':p') + + return fnamemodify(l:project_file, ':h') +endfunction + +call ale#linter#Define('yaml', { +\ 'name': 'yaml-language-server', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#yaml#ls#GetExecutable'), +\ 'command': function('ale_linters#yaml#ls#GetCommand'), +\ 'project_root': function('ale_linters#yaml#ls#FindProjectRoot'), +\ 'lsp_config': {b -> ale#Var(b, 'yaml_ls_config')}, +\}) diff --git a/vim-config/plugins/ale/autoload/ale.vim b/vim-config/plugins/ale/autoload/ale.vim index 97483b45..23315913 100644 --- a/vim-config/plugins/ale/autoload/ale.vim +++ b/vim-config/plugins/ale/autoload/ale.vim @@ -157,7 +157,7 @@ function! ale#Queue(delay, ...) abort endif endfunction -let s:current_ale_version = [3, 1, 0] +let s:current_ale_version = [3, 3, 0] " A function used to check for ALE features in files outside of the project. function! ale#Has(feature) abort @@ -254,6 +254,7 @@ function! ale#GetLocItemMessage(item, format_string) abort " \=l:variable is used to avoid escaping issues. let l:msg = substitute(l:msg, '\v\%([^\%]*)code([^\%]*)\%', l:code_repl, 'g') let l:msg = substitute(l:msg, '\V%severity%', '\=l:severity', 'g') + let l:msg = substitute(l:msg, '\V%type%', '\=l:type', 'g') let l:msg = substitute(l:msg, '\V%linter%', '\=l:linter_name', 'g') " Replace %s with the text. let l:msg = substitute(l:msg, '\V%s', '\=a:item.text', 'g') diff --git a/vim-config/plugins/ale/autoload/ale/c.vim b/vim-config/plugins/ale/autoload/ale/c.vim index e729aec8..4a22c6fe 100644 --- a/vim-config/plugins/ale/autoload/ale/c.vim +++ b/vim-config/plugins/ale/autoload/ale/c.vim @@ -585,3 +585,38 @@ function! ale#c#IncludeOptions(include_paths) abort return join(l:option_list) endfunction + +" Get the language flag depending on on the executable, options and +" file extension +function! ale#c#GetLanguageFlag( +\ buffer, +\ executable, +\ use_header_lang_flag, +\ header_exts, +\ linter_lang_flag +\) abort + " Use only '-header' if the executable is 'clang' by default + if a:use_header_lang_flag == -1 + let l:use_header_lang_flag = a:executable =~# 'clang' + else + let l:use_header_lang_flag = a:use_header_lang_flag + endif + + " If we don't use the header language flag, return the default linter + " language flag + if !l:use_header_lang_flag + return a:linter_lang_flag + endif + + " Get the buffer file extension + let l:buf_ext = expand('#' . a:buffer . ':e') + + " If the buffer file is an header according to its extension, use + " the linter language flag + '-header', ex: 'c-header' + if index(a:header_exts, l:buf_ext) >= 0 + return a:linter_lang_flag . '-header' + endif + + " Else, use the default linter language flag + return a:linter_lang_flag +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/code_action.vim b/vim-config/plugins/ale/autoload/ale/code_action.vim index 917190be..db31aad5 100644 --- a/vim-config/plugins/ale/autoload/ale/code_action.vim +++ b/vim-config/plugins/ale/autoload/ale/code_action.vim @@ -16,13 +16,12 @@ endfunction function! ale#code_action#HandleCodeAction(code_action, options) abort let l:current_buffer = bufnr('') let l:changes = a:code_action.changes - let l:should_save = get(a:options, 'should_save') for l:file_code_edit in l:changes call ale#code_action#ApplyChanges( \ l:file_code_edit.fileName, \ l:file_code_edit.textChanges, - \ l:should_save, + \ a:options, \) endfor endfunction @@ -63,29 +62,29 @@ function! s:ChangeCmp(left, right) abort return 0 endfunction -function! ale#code_action#ApplyChanges(filename, changes, should_save) abort - let l:current_buffer = bufnr('') +function! ale#code_action#ApplyChanges(filename, changes, options) abort + let l:should_save = get(a:options, 'should_save') + let l:conn_id = get(a:options, 'conn_id') + + let l:orig_buffer = bufnr('') + " The buffer is used to determine the fileformat, if available. let l:buffer = bufnr(a:filename) - let l:is_current_buffer = l:buffer > 0 && l:buffer == l:current_buffer - if l:buffer > 0 - let l:lines = getbufline(l:buffer, 1, '$') - - " Add empty line if there's trailing newline, like readfile() does. - if getbufvar(l:buffer, '&eol') - let l:lines += [''] - endif - else - let l:lines = readfile(a:filename, 'b') + if l:buffer != l:orig_buffer + call ale#util#Execute('silent edit ' . a:filename) + let l:buffer = bufnr('') endif - if l:is_current_buffer - let l:pos = getpos('.')[1:2] - else - let l:pos = [1, 1] + let l:lines = getbufline(l:buffer, 1, '$') + + " Add empty line if there's trailing newline, like readfile() does. + if getbufvar(l:buffer, '&eol') + let l:lines += [''] endif + let l:pos = getpos('.')[1:2] + " Changes have to be sorted so we apply them from bottom-to-top for l:code_edit in reverse(sort(copy(a:changes), function('s:ChangeCmp'))) let l:line = l:code_edit.start.line @@ -155,46 +154,25 @@ function! ale#code_action#ApplyChanges(filename, changes, should_save) abort endif endfor - if l:buffer > 0 - " Make sure ale#util#{Writefile,SetBufferContents} add trailing - " newline if and only if it should be added. - if l:lines[-1] is# '' && getbufvar(l:buffer, '&eol') - call remove(l:lines, -1) - else - call setbufvar(l:buffer, '&eol', 0) - endif - elseif exists('+fixeol') && &fixeol && l:lines[-1] is# '' - " Not in buffer, ale#util#Writefile can't check &eol and always adds - " newline if &fixeol: remove to prevent double trailing newline. + " Make sure to add a trailing newline if and only if it should be added. + if l:lines[-1] is# '' && getbufvar(l:buffer, '&eol') call remove(l:lines, -1) - endif - - if a:should_save || l:buffer < 0 - call ale#util#Writefile(l:buffer, l:lines, a:filename) else - call ale#util#SetBufferContents(l:buffer, l:lines) + call setbufvar(l:buffer, '&eol', 0) endif - if l:is_current_buffer - if a:should_save - call ale#util#Execute(':e!') - endif + call ale#util#SetBufferContents(l:buffer, l:lines) + + call ale#lsp#NotifyForChanges(l:conn_id, l:buffer) - call setpos('.', [0, l:pos[0], l:pos[1], 0]) + if l:should_save + call ale#util#Execute('silent w!') endif - if a:should_save && l:buffer > 0 && !l:is_current_buffer - " Set up a one-time use event that will delete itself to reload the - " buffer next time it's entered to view the changes made to it. - execute 'augroup ALECodeActionReloadGroup' . l:buffer - autocmd! - - execute printf( - \ 'autocmd BufEnter ' - \ . ' call ale#code_action#ReloadBuffer()', - \ l:buffer - \) - augroup END + call setpos('.', [0, l:pos[0], l:pos[1], 0]) + + if l:orig_buffer != l:buffer && bufexists(l:orig_buffer) + call ale#util#Execute('silent buf ' . string(l:orig_buffer)) endif endfunction @@ -238,7 +216,7 @@ function! s:UpdateCursor(cursor, start, end, offset) abort " to the end of the changes let l:cur_line = l:end_line + l:line_offset let l:cur_column = l:end_column + l:column_offset - " else is not necesary, it means modifications are happening + " else is not necessary, it means modifications are happening " after the cursor so no cursor updates need to be done endif endif @@ -300,7 +278,7 @@ function! ale#code_action#BuildChangesList(changes_map) abort endfor call add(l:changes, { - \ 'fileName': ale#path#FromURI(l:file_name), + \ 'fileName': ale#util#ToResource(l:file_name), \ 'textChanges': l:text_changes, \}) endfor diff --git a/vim-config/plugins/ale/autoload/ale/codefix.vim b/vim-config/plugins/ale/autoload/ale/codefix.vim index 853ee4e8..34ce3e15 100644 --- a/vim-config/plugins/ale/autoload/ale/codefix.vim +++ b/vim-config/plugins/ale/autoload/ale/codefix.vim @@ -391,8 +391,8 @@ function! s:OnReady( \ 'character': l:nearest_error.col - 1, \ }, \ 'end': { - \ 'line': l:nearest_error.end_lnum - 1, - \ 'character': l:nearest_error.end_col, + \ 'line': get(l:nearest_error, 'end_lnum', 1) - 1, + \ 'character': get(l:nearest_error, 'end_col', 0) \ }, \ }, \ }, @@ -457,7 +457,7 @@ function! s:ExecuteGetCodeFix(linter, range, MenuCallback) abort let [l:end_line, l:end_column] = getpos("'>")[1:2] endif - let l:column = min([l:column, len(getline(l:line))]) + let l:column = max([min([l:column, len(getline(l:line))]), 1]) let l:end_column = min([l:end_column, len(getline(l:end_line))]) let l:Callback = function( diff --git a/vim-config/plugins/ale/autoload/ale/completion.vim b/vim-config/plugins/ale/autoload/ale/completion.vim index e139feaa..c05ca53d 100644 --- a/vim-config/plugins/ale/autoload/ale/completion.vim +++ b/vim-config/plugins/ale/autoload/ale/completion.vim @@ -16,7 +16,7 @@ onoremap (ale_show_completion_menu) let g:ale_completion_delay = get(g:, 'ale_completion_delay', 100) let g:ale_completion_excluded_words = get(g:, 'ale_completion_excluded_words', []) let g:ale_completion_max_suggestions = get(g:, 'ale_completion_max_suggestions', 50) -let g:ale_completion_autoimport = get(g:, 'ale_completion_autoimport', 0) +let g:ale_completion_autoimport = get(g:, 'ale_completion_autoimport', 1) let g:ale_completion_tsserver_remove_warnings = get(g:, 'ale_completion_tsserver_remove_warnings', 0) let s:timer_id = -1 @@ -130,14 +130,17 @@ let s:should_complete_map = { \ '': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$', \ 'clojure': s:lisp_regex, \ 'lisp': s:lisp_regex, +\ 'racket': '\k\+$', \ 'typescript': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|''$|"$', \ 'rust': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|::$', \ 'cpp': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|::$|-\>$', +\ 'c': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|-\>$', \} " Regular expressions for finding the start column to replace with completion. let s:omni_start_map = { \ '': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$', +\ 'racket': '\k\+$', \} " A map of exact characters for triggering LSP completions. Do not forget to @@ -147,6 +150,7 @@ let s:trigger_character_map = { \ 'typescript': ['.', '''', '"'], \ 'rust': ['.', '::'], \ 'cpp': ['.', '::', '->'], +\ 'c': ['.', '->'], \} function! s:GetFiletypeValue(map, filetype) abort @@ -581,7 +585,7 @@ function! ale#completion#ParseLSPCompletions(response) abort continue endif - if get(l:item, 'insertTextFormat') is s:LSP_INSERT_TEXT_FORMAT_PLAIN + if get(l:item, 'insertTextFormat', s:LSP_INSERT_TEXT_FORMAT_PLAIN) is s:LSP_INSERT_TEXT_FORMAT_PLAIN \&& type(get(l:item, 'textEdit')) is v:t_dict let l:text = l:item.textEdit.newText elseif type(get(l:item, 'insertText')) is v:t_string @@ -776,7 +780,8 @@ function! s:OnReady(linter, lsp_details) abort if a:linter.lsp is# 'tsserver' if get(g:, 'ale_completion_tsserver_autoimport') is 1 - execute 'echom `g:ale_completion_tsserver_autoimport` is deprecated. Use `g:ale_completion_autoimport` instead.''' + " no-custom-checks + echom '`g:ale_completion_tsserver_autoimport` is deprecated. Use `g:ale_completion_autoimport` instead.' endif let l:message = ale#lsp#tsserver_message#Completions( @@ -911,7 +916,8 @@ function! ale#completion#Import() abort endif let [l:line, l:column] = getpos('.')[1:2] - let l:column = searchpos('\V' . escape(l:word, '/\'), 'bn', l:line)[1] + let l:column = searchpos('\V' . escape(l:word, '/\'), 'bnc', l:line)[1] + let l:column = l:column + len(l:word) - 1 if l:column isnot 0 let l:started = ale#completion#GetCompletions('ale-import', { diff --git a/vim-config/plugins/ale/autoload/ale/cursor.vim b/vim-config/plugins/ale/autoload/ale/cursor.vim index e8478e93..c83bbcb6 100644 --- a/vim-config/plugins/ale/autoload/ale/cursor.vim +++ b/vim-config/plugins/ale/autoload/ale/cursor.vim @@ -10,12 +10,21 @@ let g:ale_echo_msg_format = get(g:, 'ale_echo_msg_format', '%code: %%s') let s:cursor_timer = -1 +" A wrapper for echon so we can test messages we echo in Vader tests. +function! ale#cursor#Echom(message) abort + " no-custom-checks + exec "norm! :echom a:message\n" +endfunction + function! ale#cursor#TruncatedEcho(original_message) abort let l:message = a:original_message " Change tabs to spaces. let l:message = substitute(l:message, "\t", ' ', 'g') " Remove any newlines in the message. let l:message = substitute(l:message, "\n", '', 'g') + " Convert indentation groups into single spaces for better legibility when + " put on a single line + let l:message = substitute(l:message, ' \+', ' ', 'g') " We need to remember the setting for shortmess and reset it again. let l:shortmess_options = &l:shortmess @@ -27,7 +36,7 @@ function! ale#cursor#TruncatedEcho(original_message) abort silent! setlocal shortmess+=T try - exec "norm! :echomsg l:message\n" + call ale#cursor#Echom(l:message) catch /^Vim\%((\a\+)\)\=:E523/ " Fallback into manual truncate (#1987) let l:winwidth = winwidth(0) @@ -87,7 +96,9 @@ function! ale#cursor#EchoCursorWarning(...) abort elseif get(l:info, 'echoed') " We'll only clear the echoed message when moving off errors once, " so we don't continually clear the echo line. - execute 'echo' + " + " no-custom-checks + echo let l:info.echoed = 0 endif endif @@ -150,7 +161,8 @@ function! s:ShowCursorDetailForItem(loc, options) abort " Clear the echo message if we manually displayed details. if !l:stay_here - execute 'echo' + " no-custom-checks + echo endif endif endfunction diff --git a/vim-config/plugins/ale/autoload/ale/debugging.vim b/vim-config/plugins/ale/autoload/ale/debugging.vim index efd52776..31f3078c 100644 --- a/vim-config/plugins/ale/autoload/ale/debugging.vim +++ b/vim-config/plugins/ale/autoload/ale/debugging.vim @@ -62,7 +62,8 @@ let s:global_variable_list = [ \] function! s:Echo(message) abort - execute 'echo a:message' + " no-custom-checks + echo a:message endfunction function! s:GetLinterVariables(filetype, exclude_linter_names) abort diff --git a/vim-config/plugins/ale/autoload/ale/definition.vim b/vim-config/plugins/ale/autoload/ale/definition.vim index 9574017b..fd6cd2e1 100644 --- a/vim-config/plugins/ale/autoload/ale/definition.vim +++ b/vim-config/plugins/ale/autoload/ale/definition.vim @@ -68,18 +68,27 @@ function! ale#definition#HandleLSPResponse(conn_id, response) abort for l:item in l:result if has_key(l:item, 'targetUri') " LocationLink items use targetUri - let l:filename = ale#path#FromURI(l:item.targetUri) + let l:uri = l:item.targetUri let l:line = l:item.targetRange.start.line + 1 let l:column = l:item.targetRange.start.character + 1 else " LocationLink items use uri - let l:filename = ale#path#FromURI(l:item.uri) + let l:uri = l:item.uri let l:line = l:item.range.start.line + 1 let l:column = l:item.range.start.character + 1 endif call ale#definition#UpdateTagStack() - call ale#util#Open(l:filename, l:line, l:column, l:options) + + let l:uri_handler = ale#uri#GetURIHandler(l:uri) + + if l:uri_handler is# v:null + let l:filename = ale#path#FromFileURI(l:uri) + call ale#util#Open(l:filename, l:line, l:column, l:options) + else + call l:uri_handler.OpenURILink(l:uri, l:line, l:column, l:options, a:conn_id) + endif + break endfor endif @@ -112,6 +121,12 @@ function! s:OnReady(line, column, options, capability, linter, lsp_details) abor \ a:line, \ a:column \) + elseif a:capability is# 'implementation' + let l:message = ale#lsp#tsserver_message#Implementation( + \ l:buffer, + \ a:line, + \ a:column + \) endif else " Send a message saying the buffer has changed first, or the @@ -125,6 +140,8 @@ function! s:OnReady(line, column, options, capability, linter, lsp_details) abor let l:message = ale#lsp#message#Definition(l:buffer, a:line, a:column) elseif a:capability is# 'typeDefinition' let l:message = ale#lsp#message#TypeDefinition(l:buffer, a:line, a:column) + elseif a:capability is# 'implementation' + let l:message = ale#lsp#message#Implementation(l:buffer, a:line, a:column) else " XXX: log here? return @@ -166,6 +183,14 @@ function! ale#definition#GoToType(options) abort endfor endfunction +function! ale#definition#GoToImpl(options) abort + for l:linter in ale#linter#Get(&filetype) + if !empty(l:linter.lsp) + call s:GoToLSPDefinition(l:linter, a:options, 'implementation') + endif + endfor +endfunction + function! ale#definition#GoToCommandHandler(command, ...) abort let l:options = {} @@ -191,6 +216,8 @@ function! ale#definition#GoToCommandHandler(command, ...) abort if a:command is# 'type' call ale#definition#GoToType(l:options) + elseif a:command is# 'implementation' + call ale#definition#GoToImpl(l:options) else call ale#definition#GoTo(l:options) endif diff --git a/vim-config/plugins/ale/autoload/ale/engine.vim b/vim-config/plugins/ale/autoload/ale/engine.vim index 5b9b1fca..150bbc82 100644 --- a/vim-config/plugins/ale/autoload/ale/engine.vim +++ b/vim-config/plugins/ale/autoload/ale/engine.vim @@ -203,6 +203,10 @@ function! ale#engine#SetResults(buffer, loclist) abort call ale#highlight#SetHighlights(a:buffer, a:loclist) endif + if g:ale_virtualtext_cursor is# 'all' || g:ale_virtualtext_cursor == 2 + call ale#virtualtext#SetTexts(a:buffer, a:loclist) + endif + if l:linting_is_done if g:ale_echo_cursor " Try and echo the warning now. @@ -210,7 +214,7 @@ function! ale#engine#SetResults(buffer, loclist) abort call ale#cursor#EchoCursorWarning() endif - if g:ale_virtualtext_cursor + if g:ale_virtualtext_cursor is# 'current' || g:ale_virtualtext_cursor == 1 " Try and show the warning now. " This will only do something meaningful if we're in normal mode. call ale#virtualtext#ShowCursorWarning() @@ -347,6 +351,12 @@ function! ale#engine#FixLocList(buffer, linter_name, from_other_source, loclist) if has_key(l:old_item, 'end_lnum') let l:item.end_lnum = str2nr(l:old_item.end_lnum) + + " When the error ends after the end of the file, put it at the + " end. This is only done for the current buffer. + if l:item.bufnr == a:buffer && l:item.end_lnum > l:last_line_number + let l:item.end_lnum = l:last_line_number + endif endif if has_key(l:old_item, 'sub_type') diff --git a/vim-config/plugins/ale/autoload/ale/events.vim b/vim-config/plugins/ale/autoload/ale/events.vim index 3568c117..eec24f46 100644 --- a/vim-config/plugins/ale/autoload/ale/events.vim +++ b/vim-config/plugins/ale/autoload/ale/events.vim @@ -139,7 +139,7 @@ function! ale#events#Init() abort autocmd InsertLeave * if exists('*ale#engine#Cleanup') | call ale#cursor#EchoCursorWarning() | endif endif - if g:ale_virtualtext_cursor + if g:ale_virtualtext_cursor is# 'current' || g:ale_virtualtext_cursor is# 1 || g:ale_virtualtext_cursor is# '1' autocmd CursorMoved,CursorHold * if exists('*ale#engine#Cleanup') | call ale#virtualtext#ShowCursorWarningWithDelay() | endif " Look for a warning to echo as soon as we leave Insert mode. " The script's position variable used when moving the cursor will @@ -156,4 +156,10 @@ function! ale#events#Init() abort endif endif augroup END + + augroup AleURISchemes + autocmd! + + autocmd BufNewFile,BufReadPre jdt://** call ale#uri#jdt#ReadJDTLink(expand('')) + augroup END endfunction diff --git a/vim-config/plugins/ale/autoload/ale/filerename.vim b/vim-config/plugins/ale/autoload/ale/filerename.vim new file mode 100644 index 00000000..ec20d279 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/filerename.vim @@ -0,0 +1,133 @@ +" Author: Dalius Dobravolskas +" Description: Rename file support for tsserver + +let s:filerename_map = {} + +" Used to get the rename map in tests. +function! ale#filerename#GetMap() abort + return deepcopy(s:filerename_map) +endfunction + +" Used to set the rename map in tests. +function! ale#filerename#SetMap(map) abort + let s:filerename_map = a:map +endfunction + +function! ale#filerename#ClearLSPData() abort + let s:filerename_map = {} +endfunction + +function! s:message(message) abort + call ale#util#Execute('echom ' . string(a:message)) +endfunction + +function! ale#filerename#HandleTSServerResponse(conn_id, response) abort + if get(a:response, 'command', '') isnot# 'getEditsForFileRename' + return + endif + + if !has_key(s:filerename_map, a:response.request_seq) + return + endif + + let l:options = remove(s:filerename_map, a:response.request_seq) + + let l:old_name = l:options.old_name + let l:new_name = l:options.new_name + + if get(a:response, 'success', v:false) is v:false + let l:message = get(a:response, 'message', 'unknown') + call s:message('Error renaming file "' . l:old_name . '" to "' . l:new_name + \ . '". Reason: ' . l:message) + + return + endif + + let l:changes = a:response.body + + if empty(l:changes) + call s:message('No changes while renaming "' . l:old_name . '" to "' . l:new_name . '"') + else + call ale#code_action#HandleCodeAction( + \ { + \ 'description': 'filerename', + \ 'changes': l:changes, + \ }, + \ { + \ 'should_save': 1, + \ }, + \) + endif + + silent! noautocmd execute 'saveas ' . l:new_name + call delete(l:old_name) +endfunction + +function! s:OnReady(options, linter, lsp_details) abort + let l:id = a:lsp_details.connection_id + + if !ale#lsp#HasCapability(l:id, 'filerename') + return + endif + + let l:buffer = a:lsp_details.buffer + + let l:Callback = function('ale#filerename#HandleTSServerResponse') + + call ale#lsp#RegisterCallback(l:id, l:Callback) + + let l:message = ale#lsp#tsserver_message#GetEditsForFileRename( + \ a:options.old_name, + \ a:options.new_name, + \) + + let l:request_id = ale#lsp#Send(l:id, l:message) + + let s:filerename_map[l:request_id] = a:options +endfunction + +function! s:ExecuteFileRename(linter, options) abort + let l:buffer = bufnr('') + + let l:Callback = function('s:OnReady', [a:options]) + call ale#lsp_linter#StartLSP(l:buffer, a:linter, l:Callback) +endfunction + +function! ale#filerename#Execute() abort + let l:lsp_linters = [] + + for l:linter in ale#linter#Get(&filetype) + if l:linter.lsp is# 'tsserver' + call add(l:lsp_linters, l:linter) + endif + endfor + + if empty(l:lsp_linters) + call s:message('No active tsserver LSPs') + + return + endif + + let l:buffer = bufnr('') + let l:old_name = expand('#' . l:buffer . ':p') + let l:new_name = ale#util#Input('New file name: ', l:old_name, 'file') + + if l:old_name is# l:new_name + call s:message('New file name matches old file name') + + return + endif + + if empty(l:new_name) + call s:message('New name cannot be empty!') + + return + endif + + for l:lsp_linter in l:lsp_linters + call s:ExecuteFileRename(l:lsp_linter, { + \ 'old_name': l:old_name, + \ 'new_name': l:new_name, + \}) + endfor +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fix.vim b/vim-config/plugins/ale/autoload/ale/fix.vim index 8ebba9fe..d9820847 100644 --- a/vim-config/plugins/ale/autoload/ale/fix.vim +++ b/vim-config/plugins/ale/autoload/ale/fix.vim @@ -77,7 +77,8 @@ function! ale#fix#ApplyFixes(buffer, output) abort call remove(g:ale_fix_buffer_data, a:buffer) if !l:data.ignore_file_changed_errors - execute 'echoerr ''The file was changed before fixing finished''' + " no-custom-checks + echoerr 'The file was changed before fixing finished' endif return @@ -358,7 +359,8 @@ function! ale#fix#Fix(buffer, fixing_flag, ...) abort \ 'There is no fixer named `%s`. Check :ALEFixSuggest', \ l:function_name, \) - execute 'echom l:echo_message' + " no-custom-checks + echom l:echo_message endif return 0 @@ -366,7 +368,8 @@ function! ale#fix#Fix(buffer, fixing_flag, ...) abort if empty(l:callback_list) if a:fixing_flag is# '' - execute 'echom ''No fixers have been defined. Try :ALEFixSuggest''' + " no-custom-checks + echom 'No fixers have been defined. Try :ALEFixSuggest' endif return 0 diff --git a/vim-config/plugins/ale/autoload/ale/fix/registry.vim b/vim-config/plugins/ale/autoload/ale/fix/registry.vim index c6764daf..28e33926 100644 --- a/vim-config/plugins/ale/autoload/ale/fix/registry.vim +++ b/vim-config/plugins/ale/autoload/ale/fix/registry.vim @@ -37,11 +37,21 @@ let s:default_registry = { \ 'suggested_filetypes': ['python'], \ 'description': 'Fix PEP8 issues with black.', \ }, +\ 'buf-format': { +\ 'function': 'ale#fixers#buf_format#Fix', +\ 'suggested_filetypes': ['proto'], +\ 'description': 'Fix .proto files with buf format.', +\ }, \ 'buildifier': { \ 'function': 'ale#fixers#buildifier#Fix', \ 'suggested_filetypes': ['bzl'], \ 'description': 'Format BUILD and .bzl files with buildifier.', \ }, +\ 'css-beautify': { +\ 'function': 'ale#fixers#css_beautify#Fix', +\ 'suggested_filetypes': ['css'], +\ 'description': 'Format CSS using css-beautify from js-beautify.', +\ }, \ 'deno': { \ 'function': 'ale#fixers#deno#Fix', \ 'suggested_filetypes': ['typescript'], @@ -73,6 +83,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['dhall'], \ 'description': 'Standard code formatter for the Dhall language and removing dead code', \ }, +\ 'dune': { +\ 'function': 'ale#fixers#dune#Fix', +\ 'suggested_filetypes': ['dune'], +\ 'description': 'Fix dune files with dune format', +\ }, \ 'fecs': { \ 'function': 'ale#fixers#fecs#Fix', \ 'suggested_filetypes': ['javascript', 'css', 'html'], @@ -131,6 +146,11 @@ let s:default_registry = { \ 'description': 'Apply prettier-eslint to a file.', \ 'aliases': ['prettier-eslint'], \ }, +\ 'pyflyby': { +\ 'function': 'ale#fixers#pyflyby#Fix', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Tidy Python imports with pyflyby.', +\ }, \ 'importjs': { \ 'function': 'ale#fixers#importjs#Fix', \ 'suggested_filetypes': ['javascript'], @@ -191,6 +211,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['ruby'], \ 'description': 'Fix ruby files with standardrb --fix', \ }, +\ 'statix': { +\ 'function': 'ale#fixers#statix#Fix', +\ 'suggested_filetypes': ['nix'], +\ 'description': 'Fix common Nix antipatterns with statix fix', +\ }, \ 'stylelint': { \ 'function': 'ale#fixers#stylelint#Fix', \ 'suggested_filetypes': ['css', 'sass', 'scss', 'sugarss', 'stylus'], @@ -201,6 +226,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['swift'], \ 'description': 'Apply SwiftFormat to a file.', \ }, +\ 'syntax_tree': { +\ 'function': 'ale#fixers#syntax_tree#Fix', +\ 'suggested_filetypes': ['ruby'], +\ 'description': 'Fix ruby files with stree write', +\ }, \ 'apple-swift-format': { \ 'function': 'ale#fixers#appleswiftformat#Fix', \ 'suggested_filetypes': ['swift'], @@ -216,6 +246,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['php'], \ 'description': 'Fix PHP files with php-cs-fixer.', \ }, +\ 'pint': { +\ 'function': 'ale#fixers#pint#Fix', +\ 'suggested_filetypes': ['php'], +\ 'description': 'Fix PHP files with Laravel Pint.', +\ }, \ 'astyle': { \ 'function': 'ale#fixers#astyle#Fix', \ 'suggested_filetypes': ['c', 'cpp'], @@ -228,8 +263,8 @@ let s:default_registry = { \ }, \ 'clang-format': { \ 'function': 'ale#fixers#clangformat#Fix', -\ 'suggested_filetypes': ['c', 'cpp', 'cuda'], -\ 'description': 'Fix C/C++ and cuda files with clang-format.', +\ 'suggested_filetypes': ['c', 'cpp', 'cs', 'cuda', 'java', 'javascript', 'json', 'objc', 'proto'], +\ 'description': 'Fix C, C++, C#, CUDA, Java, JavaScript, JSON, ObjectiveC and Protobuf files with clang-format.', \ }, \ 'cmakeformat': { \ 'function': 'ale#fixers#cmakeformat#Fix', @@ -246,6 +281,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['go'], \ 'description': 'Fix Go files with go fmt.', \ }, +\ 'gofumpt': { +\ 'function': 'ale#fixers#gofumpt#Fix', +\ 'suggested_filetypes': ['go'], +\ 'description': 'Fix Go files with gofumpt, a stricter go fmt.', +\ }, \ 'goimports': { \ 'function': 'ale#fixers#goimports#Fix', \ 'suggested_filetypes': ['go'], @@ -346,6 +386,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['sh'], \ 'description': 'Fix sh files with shfmt.', \ }, +\ 'sqlfluff': { +\ 'function': 'ale#fixers#sqlfluff#Fix', +\ 'suggested_filetypes': ['sql'], +\ 'description': 'Fix SQL files with sqlfluff.', +\ }, \ 'sqlfmt': { \ 'function': 'ale#fixers#sqlfmt#Fix', \ 'suggested_filetypes': ['sql'], @@ -421,6 +466,16 @@ let s:default_registry = { \ 'suggested_filetypes': ['hcl', 'terraform'], \ 'description': 'Fix tf and hcl files with terraform fmt.', \ }, +\ 'packer': { +\ 'function': 'ale#fixers#packer#Fix', +\ 'suggested_filetypes': ['hcl', 'packer'], +\ 'description': 'Fix Packer HCL files with packer fmt.', +\ }, +\ 'crystal': { +\ 'function': 'ale#fixers#crystal#Fix', +\ 'suggested_filetypes': ['cr'], +\ 'description': 'Fix cr (crystal).', +\ }, \ 'ktlint': { \ 'function': 'ale#fixers#ktlint#Fix', \ 'suggested_filetypes': ['kt', 'kotlin'], @@ -469,7 +524,7 @@ let s:default_registry = { \ 'html-beautify': { \ 'function': 'ale#fixers#html_beautify#Fix', \ 'suggested_filetypes': ['html', 'htmldjango'], -\ 'description': 'Fix HTML files with html-beautify.', +\ 'description': 'Fix HTML files with html-beautify from js-beautify.', \ }, \ 'lua-format': { \ 'function': 'ale#fixers#lua_format#Fix', @@ -481,6 +536,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['lua'], \ 'description': 'Fix Lua files with luafmt.', \ }, +\ 'dprint': { +\ 'function': 'ale#fixers#dprint#Fix', +\ 'suggested_filetypes': ['dockerfile', 'javascript', 'json', 'markdown', 'toml', 'typescript'], +\ 'description': 'Pluggable and configurable code formatting platform', +\ }, \ 'stylua': { \ 'function': 'ale#fixers#stylua#Fix', \ 'suggested_filetypes': ['lua'], @@ -501,10 +561,30 @@ let s:default_registry = { \ 'suggested_filetypes': ['pascal'], \ 'description': 'Fix Pascal files with ptop.', \ }, +\ 'opafmt': { +\ 'function': 'ale#fixers#opafmt#Fix', +\ 'suggested_filetypes': ['rego'], +\ 'description': 'Fix rego files with opa fmt.', +\ }, \ 'vfmt': { \ 'function': 'ale#fixers#vfmt#Fix', \ 'suggested_filetypes': ['v'], \ 'description': 'A formatter for V source code.', +\ }, +\ 'zigfmt': { +\ 'function': 'ale#fixers#zigfmt#Fix', +\ 'suggested_filetypes': ['zig'], +\ 'description': 'Official formatter for Zig', +\ }, +\ 'raco_fmt': { +\ 'function': 'ale#fixers#raco_fmt#Fix', +\ 'suggested_filetypes': ['racket'], +\ 'description': 'Fix Racket files with raco fmt.', +\ }, +\ 'ruff': { +\ 'function': 'ale#fixers#ruff#Fix', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Fix python files with ruff.', \ } \} diff --git a/vim-config/plugins/ale/autoload/ale/fixers/buf_format.vim b/vim-config/plugins/ale/autoload/ale/fixers/buf_format.vim new file mode 100644 index 00000000..c2c156b7 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/buf_format.vim @@ -0,0 +1,12 @@ +" Author: Alex McKinney +" Description: Run buf format. + +call ale#Set('proto_buf_format_executable', 'buf') + +function! ale#fixers#buf_format#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'proto_buf_format_executable') + + return { + \ 'command': ale#Escape(l:executable) . ' format %t', + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/crystal.vim b/vim-config/plugins/ale/autoload/ale/fixers/crystal.vim new file mode 100644 index 00000000..4ba702ba --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/crystal.vim @@ -0,0 +1,14 @@ +call ale#Set('crystal_format_executable', 'crystal') +call ale#Set('crystal_format_options', '') + +function! ale#fixers#crystal#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'crystal_format_executable') + let l:options = ale#Var(a:buffer, 'crystal_format_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' tool format' + \ . ale#Pad(l:options) + \ . ' -' + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/css_beautify.vim b/vim-config/plugins/ale/autoload/ale/fixers/css_beautify.vim new file mode 100644 index 00000000..14a837c4 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/css_beautify.vim @@ -0,0 +1,20 @@ +" Author: https://github.com/Spixmaster +" Description: Format CSS using css-beautify from js-beautify. + +call ale#Set('css_css_beautify_executable', 'css-beautify') +call ale#Set('css_css_beautify_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('css_css_beautify_options', '') + +function! ale#fixers#css_beautify#Fix(buffer) abort + let l:executable = ale#python#FindExecutable( + \ a:buffer, + \ 'css_css_beautify', + \ ['css-beautify'] + \) + + let l:options = ale#Var(a:buffer, 'css_css_beautify_options') + + return { + \ 'command': ale#Escape(l:executable) . ' ' . l:options . ' -', + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/dprint.vim b/vim-config/plugins/ale/autoload/ale/fixers/dprint.vim new file mode 100644 index 00000000..99e590df --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/dprint.vim @@ -0,0 +1,29 @@ +call ale#Set('dprint_executable', 'dprint') +call ale#Set('dprint_executable_override', 0) +call ale#Set('dprint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('dprint_options', '') +call ale#Set('dprint_config', 'dprint.json') + +function! ale#fixers#dprint#Fix(buffer) abort + let l:executable = ale#path#FindExecutable(a:buffer, 'dprint', ['dprint']) + let l:executable_override = ale#Var(a:buffer, 'dprint_executable_override') + + if !executable(l:executable) && !l:executable_override + return 0 + endif + + let l:options = ale#Var(a:buffer, 'dprint_options') + let l:config = ale#path#FindNearestFile(a:buffer, ale#Var(a:buffer, 'dprint_config')) + + if !empty(l:config) + let l:options = l:options . ' -c ' . ale#Escape(l:config) + endif + + let l:options = l:options . ' --stdin %s' + + return { + \ 'command': ale#Escape(l:executable) + \ . ' fmt ' + \ . l:options + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/dune.vim b/vim-config/plugins/ale/autoload/ale/fixers/dune.vim new file mode 100644 index 00000000..6ef7ec9f --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/dune.vim @@ -0,0 +1,16 @@ +" Author: Albert Peschar +" Description: Fix files with dune format. + +call ale#Set('ocaml_dune_executable', 'dune') +call ale#Set('ocaml_dune_options', '') + +function! ale#fixers#dune#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'ocaml_dune_executable') + let l:options = ale#Var(a:buffer, 'ocaml_dune_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' format' + \ . (empty(l:options) ? '' : ' ' . l:options), + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/gofumpt.vim b/vim-config/plugins/ale/autoload/ale/fixers/gofumpt.vim new file mode 100644 index 00000000..99753209 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/gofumpt.vim @@ -0,0 +1,17 @@ +" Author: David Houston +" Description: A stricter gofmt implementation. + +call ale#Set('go_gofumpt_executable', 'gofumpt') +call ale#Set('go_gofumpt_options', '') + +function! ale#fixers#gofumpt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'go_gofumpt_executable') + let l:options = ale#Var(a:buffer, 'go_gofumpt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ale#Pad(l:options) + \ . ' -w -- %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/html_beautify.vim b/vim-config/plugins/ale/autoload/ale/fixers/html_beautify.vim index 236cb6ec..9817563e 100644 --- a/vim-config/plugins/ale/autoload/ale/fixers/html_beautify.vim +++ b/vim-config/plugins/ale/autoload/ale/fixers/html_beautify.vim @@ -1,10 +1,9 @@ " Author: WhyNotHugo -" Description: Lint HTML files with html-beautify. -" +" Description: Format HTML files with html-beautify. + call ale#Set('html_beautify_executable', 'html-beautify') call ale#Set('html_beautify_use_global', get(g:, 'ale_use_global_executables', 0)) call ale#Set('html_beautify_options', '') -call ale#Set('html_beautify_change_directory', 1) function! ale#fixers#html_beautify#Fix(buffer) abort let l:executable = ale#python#FindExecutable( @@ -16,6 +15,6 @@ function! ale#fixers#html_beautify#Fix(buffer) abort let l:options = ale#Var(a:buffer, 'html_beautify_options') return { - \ 'command': ale#Escape(l:executable). ' ' . l:options . ' -', + \ 'command': ale#Escape(l:executable) . ' ' . l:options . ' -', \} endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/opafmt.vim b/vim-config/plugins/ale/autoload/ale/fixers/opafmt.vim new file mode 100644 index 00000000..a0999b70 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/opafmt.vim @@ -0,0 +1,15 @@ +" Description: Fixer for rego files + +call ale#Set('opa_fmt_executable', 'opa') +call ale#Set('opa_fmt_options', '') + +function! ale#fixers#opafmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'opa_fmt_executable') + let l:options = ale#Var(a:buffer, 'opa_fmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' fmt' + \ . (empty(l:options) ? '' : ' ' . l:options) + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/packer.vim b/vim-config/plugins/ale/autoload/ale/fixers/packer.vim new file mode 100644 index 00000000..8770550d --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/packer.vim @@ -0,0 +1,17 @@ +" Author: Zhuoyun Wei +" Description: Fixer for Packer HCL files + +call ale#Set('packer_fmt_executable', 'packer') +call ale#Set('packer_fmt_options', '') + +function! ale#fixers#packer#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'packer_fmt_executable') + let l:options = ale#Var(a:buffer, 'packer_fmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' fmt' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' -' + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/pint.vim b/vim-config/plugins/ale/autoload/ale/fixers/pint.vim new file mode 100644 index 00000000..274ddd9e --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/pint.vim @@ -0,0 +1,25 @@ +" Author: Michael Dyrynda +" Description: Fixing files with Laravel Pint. + +call ale#Set('php_pint_executable', 'pint') +call ale#Set('php_pint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('php_pint_options', '') + +function! ale#fixers#pint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'php_pint', [ + \ 'vendor/bin/pint', + \ 'pint' + \]) +endfunction + +function! ale#fixers#pint#Fix(buffer) abort + let l:executable = ale#fixers#pint#GetExecutable(a:buffer) + + return { + \ 'command': ale#Escape(l:executable) + \ . ' ' . ale#Var(a:buffer, 'php_pint_options') + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction + diff --git a/vim-config/plugins/ale/autoload/ale/fixers/pyflyby.vim b/vim-config/plugins/ale/autoload/ale/fixers/pyflyby.vim new file mode 100644 index 00000000..81c0f05e --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/pyflyby.vim @@ -0,0 +1,41 @@ +" Author: infokiller +" Description: Tidy imports using pyflyby's tidy-import script +" https://github.com/deshaw/pyflyby + +call ale#Set('python_pyflyby_executable', 'tidy-imports') +call ale#Set('python_pyflyby_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_pyflyby_options', '') +call ale#Set('python_pyflyby_auto_pipenv', 0) +call ale#Set('python_pyflyby_auto_poetry', 0) + +function! ale#fixers#pyflyby#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pyflyby_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_pyflyby_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_pyflyby', ['tidy-imports']) +endfunction + +function! ale#fixers#pyflyby#Fix(buffer) abort + " let l:executable = ale#fixers#pyflyby#GetExecutable(a:buffer) + let l:executable = ale#fixers#pyflyby#GetExecutable(a:buffer) + let l:cmd = [ale#Escape(l:executable)] + + if l:executable =~? 'pipenv\|poetry$' + call extend(l:cmd, ['run', 'tidy-imports']) + endif + + let l:options = ale#Var(a:buffer, 'python_pyflyby_options') + + if !empty(l:options) + call add(l:cmd, l:options) + endif + + return {'command': join(l:cmd, ' ')} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/raco_fmt.vim b/vim-config/plugins/ale/autoload/ale/fixers/raco_fmt.vim new file mode 100644 index 00000000..16cf4468 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/raco_fmt.vim @@ -0,0 +1,15 @@ +" Author: Jeremy Cantrell +" Description: Integration of raco fmt with ALE. + +call ale#Set('racket_raco_fmt_executable', 'raco') +call ale#Set('racket_raco_fmt_options', '') + +function! ale#fixers#raco_fmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'racket_raco_fmt_executable') + let l:options = ale#Var(a:buffer, 'racket_raco_fmt_options') + + return { + \ 'command': ale#Escape(l:executable) . ' fmt' + \ . (empty(l:options) ? '' : ' ' . l:options), + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/ruff.vim b/vim-config/plugins/ale/autoload/ale/fixers/ruff.vim new file mode 100644 index 00000000..56bcf3df --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/ruff.vim @@ -0,0 +1,89 @@ +" Author: Yining +" Description: ruff as ALE fixer for python files + +call ale#Set('python_ruff_executable', 'ruff') +call ale#Set('python_ruff_options', '') +call ale#Set('python_ruff_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_ruff_change_directory', 1) +call ale#Set('python_ruff_auto_pipenv', 0) +call ale#Set('python_ruff_auto_poetry', 0) + +function! ale#fixers#ruff#GetCwd(buffer) abort + if ale#Var(a:buffer, 'python_ruff_change_directory') + " Run from project root if found, else from buffer dir. + let l:project_root = ale#python#FindProjectRoot(a:buffer) + + return !empty(l:project_root) ? l:project_root : '%s:h' + endif + + return '%s:h' +endfunction + +function! ale#fixers#ruff#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_ruff_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_ruff_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_ruff', ['ruff']) +endfunction + +function! ale#fixers#ruff#GetCommand(buffer) abort + let l:executable = ale#fixers#ruff#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run ruff' + \ : '' + + return ale#Escape(l:executable) . l:exec_args +endfunction + +function! ale#fixers#ruff#FixForVersion(buffer, version) abort + let l:executable = ale#fixers#ruff#GetExecutable(a:buffer) + let l:cmd = [ale#Escape(l:executable)] + + if l:executable =~? 'pipenv\|poetry$' + call extend(l:cmd, ['run', 'ruff']) + endif + + let l:options = ale#Var(a:buffer, 'python_ruff_options') + + if !empty(l:options) + call add(l:cmd, l:options) + endif + + " when --stdin-filename present, ruff will use it for proj root resolution + " https://github.com/charliermarsh/ruff/pull/1281 + let l:fname = expand('#' . a:buffer . '...') + call add(l:cmd, '--stdin-filename '.ale#Escape(ale#path#Simplify(l:fname))) + + call add(l:cmd, '--fix') + + " NOTE: ruff version `0.0.72` implements `--fix` with stdin + if ale#semver#GTE(a:version, [0, 0, 72]) + call add(l:cmd, '-') + else + call add(l:cmd, '%s') + endif + + return { + \ 'cwd': ale#fixers#ruff#GetCwd(a:buffer), + \ 'command': join(l:cmd, ' '), + \} +endfunction + +function! ale#fixers#ruff#Fix(buffer) abort + let l:executable = ale#fixers#ruff#GetExecutable(a:buffer) + let l:command = ale#fixers#ruff#GetCommand(a:buffer) . ale#Pad('--version') + + return ale#semver#RunWithVersionCheck( + \ a:buffer, + \ l:executable, + \ l:command, + \ function('ale#fixers#ruff#FixForVersion'), + \) +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/shfmt.vim b/vim-config/plugins/ale/autoload/ale/fixers/shfmt.vim index 06e8da57..0eefc985 100644 --- a/vim-config/plugins/ale/autoload/ale/fixers/shfmt.vim +++ b/vim-config/plugins/ale/autoload/ale/fixers/shfmt.vim @@ -5,27 +5,13 @@ scriptencoding utf-8 call ale#Set('sh_shfmt_executable', 'shfmt') call ale#Set('sh_shfmt_options', '') -function! s:DefaultOption(buffer) abort - if getbufvar(a:buffer, '&expandtab') == 0 - " Tab is used by default - return '' - endif - - let l:tabsize = getbufvar(a:buffer, '&shiftwidth') - - if l:tabsize == 0 - let l:tabsize = getbufvar(a:buffer, '&tabstop') - endif - - return ' -i ' . l:tabsize -endfunction - function! ale#fixers#shfmt#Fix(buffer) abort let l:executable = ale#Var(a:buffer, 'sh_shfmt_executable') let l:options = ale#Var(a:buffer, 'sh_shfmt_options') return { \ 'command': ale#Escape(l:executable) - \ . (empty(l:options) ? s:DefaultOption(a:buffer) : ' ' . l:options) + \ . ' -filename=%s' + \ . (empty(l:options) ? '' : ' ' . l:options) \} endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/sqlfluff.vim b/vim-config/plugins/ale/autoload/ale/fixers/sqlfluff.vim new file mode 100644 index 00000000..1dc9f5c1 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/sqlfluff.vim @@ -0,0 +1,25 @@ +" Author: Carl Smedstad +" Description: Fixing SQL files with sqlfluff + +call ale#Set('sql_sqlfluff_executable', 'sqlfluff') + +function! ale#fixers#sqlfluff#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'sql_sqlfluff_executable') + + let l:cmd = + \ ale#Escape(l:executable) + \ . ' fix --force' + + let l:config_file = ale#path#FindNearestFile(a:buffer, '.sqlfluff') + + if !empty(l:config_file) + let l:cmd .= ' --config ' . ale#Escape(l:config_file) + else + let l:cmd .= ' --dialect ansi' + endif + + return { + \ 'command': l:cmd . ' %t > /dev/null', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/statix.vim b/vim-config/plugins/ale/autoload/ale/fixers/statix.vim new file mode 100644 index 00000000..5991c925 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/statix.vim @@ -0,0 +1,17 @@ +" Author: David Houston +" Description: Provide statix fix as a fixer for simple Nix antipatterns. + +call ale#Set('nix_statix_fix_executable', 'statix') +call ale#Set('nix_statix_fix_options', '') + +function! ale#fixers#statix#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'nix_statix_fix_executable') + let l:options = ale#Var(a:buffer, 'nix_statix_fix_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ale#Pad('fix') + \ . ale#Pad('--stdin') + \ . ale#Pad(l:options), + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/syntax_tree.vim b/vim-config/plugins/ale/autoload/ale/fixers/syntax_tree.vim new file mode 100644 index 00000000..7ae03373 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/syntax_tree.vim @@ -0,0 +1,19 @@ +call ale#Set('ruby_syntax_tree_options', '') +call ale#Set('ruby_syntax_tree_executable', 'stree') + +function! ale#fixers#syntax_tree#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'ruby_syntax_tree_executable') + let l:options = ale#Var(a:buffer, 'ruby_syntax_tree_options') + + return ale#ruby#EscapeExecutable(l:executable, 'stree') + \ . ' write' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %t' +endfunction + +function! ale#fixers#syntax_tree#Fix(buffer) abort + return { + \ 'command': ale#fixers#syntax_tree#GetCommand(a:buffer), + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/uncrustify.vim b/vim-config/plugins/ale/autoload/ale/fixers/uncrustify.vim index ffec18ef..0e8271ec 100644 --- a/vim-config/plugins/ale/autoload/ale/fixers/uncrustify.vim +++ b/vim-config/plugins/ale/autoload/ale/fixers/uncrustify.vim @@ -4,13 +4,30 @@ call ale#Set('c_uncrustify_executable', 'uncrustify') call ale#Set('c_uncrustify_options', '') +let s:languages = { +\ 'c': 'C', +\ 'cpp': 'CPP', +\ 'cs': 'CS', +\ 'objc': 'OC', +\ 'objcpp': 'OC+', +\ 'd': 'D', +\ 'java': 'JAVA', +\ 'vala': 'VALA', +\ 'p': 'PAWN', +\} + +function! ale#fixers#uncrustify#Language(buffer) abort + return get(s:languages, &filetype, 'C') +endfunction + function! ale#fixers#uncrustify#Fix(buffer) abort let l:executable = ale#Var(a:buffer, 'c_uncrustify_executable') let l:options = ale#Var(a:buffer, 'c_uncrustify_options') return { \ 'command': ale#Escape(l:executable) - \ . ' --no-backup' - \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' --no-backup ' + \ . '-l' . ale#Pad(ale#fixers#uncrustify#Language(a:buffer)) + \ . ale#Pad(l:options) \} endfunction diff --git a/vim-config/plugins/ale/autoload/ale/fixers/zigfmt.vim b/vim-config/plugins/ale/autoload/ale/fixers/zigfmt.vim new file mode 100644 index 00000000..b22e5b83 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/fixers/zigfmt.vim @@ -0,0 +1,14 @@ +scriptencoding utf-8 +" Author: Arash Mousavi +" Description: Official formatter for Zig. + +call ale#Set('zig_zigfmt_executable', 'zig') + +function! ale#fixers#zigfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'zig_zigfmt_executable') + + return { + \ 'command': ale#Escape(l:executable) . ' fmt %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/floating_preview.vim b/vim-config/plugins/ale/autoload/ale/floating_preview.vim index f0bc8f80..c2bf5b6b 100644 --- a/vim-config/plugins/ale/autoload/ale/floating_preview.vim +++ b/vim-config/plugins/ale/autoload/ale/floating_preview.vim @@ -1,13 +1,15 @@ " Author: Jan-Grimo Sobez " Author: Kevin Clark " Author: D. Ben Knoble +" Author: Shaun Duncan " Description: Floating preview window for showing whatever information in. " Precondition: exists('*nvim_open_win') || has('popupwin') function! ale#floating_preview#Show(lines, ...) abort if !exists('*nvim_open_win') && !has('popupwin') - execute 'echom ''Floating windows not supported in this vim instance.''' + " no-custom-checks + echom 'Floating windows not supported in this vim instance.' return endif @@ -50,9 +52,9 @@ function! s:NvimShow(lines, options) abort autocmd! if g:ale_close_preview_on_insert - autocmd CursorMoved,TabLeave,WinLeave,InsertEnter ++once call s:NvimClose() + autocmd CursorMoved,TabLeave,WinLeave,BufWinLeave,WinScrolled,InsertEnter ++once call s:NvimClose() else - autocmd CursorMoved,TabLeave,WinLeave ++once call s:NvimClose() + autocmd CursorMoved,TabLeave,WinLeave,BufWinLeave,WinScrolled ++once call s:NvimClose() endif augroup END @@ -105,18 +107,20 @@ function! s:NvimPrepareWindowContent(lines) abort let l:width += 2 let l:height += 2 - let l:hor = g:ale_floating_window_border[0] - let l:top = g:ale_floating_window_border[1] - let l:top_left = g:ale_floating_window_border[2] - let l:top_right = g:ale_floating_window_border[3] - let l:bottom_right = g:ale_floating_window_border[4] - let l:bottom_left = g:ale_floating_window_border[5] + let l:left = get(g:ale_floating_window_border, 0, '|') + let l:top = get(g:ale_floating_window_border, 1, '-') + let l:top_left = get(g:ale_floating_window_border, 2, '+') + let l:top_right = get(g:ale_floating_window_border, 3, '+') + let l:bottom_right = get(g:ale_floating_window_border, 4, '+') + let l:bottom_left = get(g:ale_floating_window_border, 5, '+') + let l:right = get(g:ale_floating_window_border, 6, l:left) + let l:bottom = get(g:ale_floating_window_border, 7, l:top) let l:lines = [l:top_left . repeat(l:top, l:width - 2) . l:top_right] for l:line in a:lines let l:line_width = strchars(l:line) - let l:lines = add(l:lines, l:hor . l:line . repeat(' ', l:width - l:line_width - 2). l:hor) + let l:lines = add(l:lines, l:left . l:line . repeat(' ', l:width - l:line_width - 2). l:right) endfor " Truncate the lines @@ -124,21 +128,24 @@ function! s:NvimPrepareWindowContent(lines) abort let l:lines = l:lines[0:l:max_height] endif - let l:lines = add(l:lines, l:bottom_left . repeat(l:top, l:width - 2) . l:bottom_right) + let l:lines = add(l:lines, l:bottom_left . repeat(l:bottom, l:width - 2) . l:bottom_right) return [l:lines, l:width, l:height] endfunction function! s:NvimCreate(options) abort + let l:popup_opts = extend({ + \ 'relative': 'cursor', + \ 'row': 1, + \ 'col': 0, + \ 'width': 42, + \ 'height': 4, + \ 'style': 'minimal' + \ }, s:GetPopupOpts()) + let l:buffer = nvim_create_buf(v:false, v:false) - let l:winid = nvim_open_win(l:buffer, v:false, { - \ 'relative': 'cursor', - \ 'row': 1, - \ 'col': 0, - \ 'width': 42, - \ 'height': 4, - \ 'style': 'minimal' - \ }) + let l:winid = nvim_open_win(l:buffer, v:false, l:popup_opts) + call nvim_buf_set_option(l:buffer, 'buftype', 'acwrite') call nvim_buf_set_option(l:buffer, 'bufhidden', 'delete') call nvim_buf_set_option(l:buffer, 'swapfile', v:false) @@ -148,7 +155,8 @@ function! s:NvimCreate(options) abort endfunction function! s:VimCreate(options) abort - let l:popup_id = popup_create([], { + " default options + let l:popup_opts = extend({ \ 'line': 'cursor+1', \ 'col': 'cursor', \ 'drag': v:true, @@ -157,17 +165,19 @@ function! s:VimCreate(options) abort \ 'padding': [0, 1, 0, 1], \ 'border': [], \ 'borderchars': empty(g:ale_floating_window_border) ? [' '] : [ - \ g:ale_floating_window_border[1], - \ g:ale_floating_window_border[0], - \ g:ale_floating_window_border[1], - \ g:ale_floating_window_border[0], - \ g:ale_floating_window_border[2], - \ g:ale_floating_window_border[3], - \ g:ale_floating_window_border[4], - \ g:ale_floating_window_border[5], + \ get(g:ale_floating_window_border, 1, '-'), + \ get(g:ale_floating_window_border, 6, '|'), + \ get(g:ale_floating_window_border, 7, '-'), + \ get(g:ale_floating_window_border, 0, '|'), + \ get(g:ale_floating_window_border, 2, '+'), + \ get(g:ale_floating_window_border, 3, '+'), + \ get(g:ale_floating_window_border, 4, '+'), + \ get(g:ale_floating_window_border, 5, '+'), \ ], \ 'moved': 'any', - \ }) + \ }, s:GetPopupOpts()) + + let l:popup_id = popup_create([], l:popup_opts) call setbufvar(winbufnr(l:popup_id), '&filetype', get(a:options, 'filetype', 'ale-preview')) let w:preview = {'id': l:popup_id} endfunction @@ -201,3 +211,21 @@ function! s:VimClose() abort call popup_close(w:preview['id']) unlet w:preview endfunction + +" get either the results of a function callback or dictionary for popup overrides +function! s:GetPopupOpts() abort + if exists('g:ale_floating_preview_popup_opts') + let l:ref = g:ale_floating_preview_popup_opts + + if type(l:ref) is# v:t_dict + return l:ref + elseif type(l:ref) is# v:t_string + try + return function(l:ref)() + catch /E700/ + endtry + endif + endif + + return {} +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/handlers/actionlint.vim b/vim-config/plugins/ale/autoload/ale/handlers/actionlint.vim new file mode 100644 index 00000000..73843c08 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/handlers/actionlint.vim @@ -0,0 +1,36 @@ +function! ale#handlers#actionlint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'yaml_actionlint_options') + + " automatically add --no-color option if not defined + if l:options !~# '--no-color' + let l:options .= ' --no-color' + endif + + " automatically add --oneline option if not defined + if l:options !~# '--oneline' + let l:options .= ' --oneline' + endif + + return '%e ' . l:options . ' %t' +endfunction + +function! ale#handlers#actionlint#Handle(buffer, lines) abort + " Matches patterns line the following: + ".github/workflows/main.yml:19:0: could not parse as YAML: yaml: line 19: mapping values are not allowed in this context [yaml-syntax] + let l:pattern = '\v^.*:(\d+):(\d+): (.+) \[(.+)\]$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:item = { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[3], + \ 'code': l:match[4], + \ 'type': 'E', + \} + + call add(l:output, l:item) + endfor + + return l:output +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/handlers/alex.vim b/vim-config/plugins/ale/autoload/ale/handlers/alex.vim index 6ef4867f..1a92bd14 100644 --- a/vim-config/plugins/ale/autoload/ale/handlers/alex.vim +++ b/vim-config/plugins/ale/autoload/ale/handlers/alex.vim @@ -11,8 +11,9 @@ endfunction function! ale#handlers#alex#CreateCommandCallback(flags) abort return {b -> ale#node#Executable(b, ale#handlers#alex#GetExecutable(b)) - \ . ' %s ' - \ . a:flags} + \ . ' --stdin ' + \ . a:flags + \} endfunction function! ale#handlers#alex#Handle(buffer, lines) abort @@ -38,6 +39,7 @@ endfunction " Define a linter for a specific filetype. Accept flags to adapt to the filetype. " no flags treat input as markdown " --html treat input as HTML +" --mdx treat input as MDX " --text treat input as plaintext function! ale#handlers#alex#DefineLinter(filetype, flags) abort call ale#Set('alex_executable', 'alex') @@ -49,6 +51,5 @@ function! ale#handlers#alex#DefineLinter(filetype, flags) abort \ 'command': ale#handlers#alex#CreateCommandCallback(a:flags), \ 'output_stream': 'stderr', \ 'callback': 'ale#handlers#alex#Handle', - \ 'lint_file': 1, \}) endfunction diff --git a/vim-config/plugins/ale/autoload/ale/handlers/cppcheck.vim b/vim-config/plugins/ale/autoload/ale/handlers/cppcheck.vim index a07d0aed..150bb007 100644 --- a/vim-config/plugins/ale/autoload/ale/handlers/cppcheck.vim +++ b/vim-config/plugins/ale/autoload/ale/handlers/cppcheck.vim @@ -19,6 +19,18 @@ function! ale#handlers#cppcheck#GetBufferPathIncludeOptions(buffer) abort endfunction function! ale#handlers#cppcheck#GetCompileCommandsOptions(buffer) abort + " The compile_commands.json doesn't apply to headers and cppheck will + " bail out if it cannot find a file matching the filter, below. Skip out + " now, for headers. Also, suppress FPs; cppcheck is not meant to + " process lone header files. + let b:buffer_name = bufname(a:buffer) + let b:file_extension = fnamemodify(b:buffer_name, ':e') + + if b:file_extension is# 'h' || b:file_extension is# 'hpp' + return ale#handlers#cppcheck#GetBufferPathIncludeOptions(a:buffer) + \ . ' --suppress=unusedStructMember' + endif + " If the current buffer is modified, using compile_commands.json does no " good, so include the file's directory instead. It's not quite as good as " using --project, but is at least equivalent to running cppcheck on this @@ -35,8 +47,10 @@ function! ale#handlers#cppcheck#GetCompileCommandsOptions(buffer) abort " then use the file to set up import paths, etc. let [l:dir, l:json_path] = ale#c#FindCompileCommands(a:buffer) + " By default, cppcheck processes every config in compile_commands.json. + " Use --file-filter to limit to just the buffer file. return !empty(l:json_path) - \ ? '--project=' . ale#Escape(l:json_path[len(l:dir) + 1: ]) + \ ? '--project=' . ale#Escape(l:json_path[len(l:dir) + 1: ]) . ' --file-filter=' . ale#Escape(bufname(a:buffer)) \ : '' endfunction @@ -50,7 +64,12 @@ function! ale#handlers#cppcheck#HandleCppCheckFormat(buffer, lines) abort "test.cpp:974:{column}: error:{inconclusive:inconclusive} Array 'n[3]' accessed at index 3, which is out of bounds. [arrayIndexOutOfBounds]\ " n[3]=3; " ^ - let l:pattern = '\v(\f+):(\d+):(\d+|\{column\}): (\w+):(\{inconclusive:inconclusive\})? ?(.*) \[(\w+)\]\' + " + "" OR if using the misra addon: + "test.c:1:16: style: misra violation (use --rule-texts= to get proper output) [misra-c2012-2.7]\' + "void test( int parm ) {} + " ^ + let l:pattern = '\v(\f+):(\d+):(\d+|\{column\}): (\w+):(\{inconclusive:inconclusive\})? ?(.*) \[(%(\w[-.]?)+)\]\' let l:output = [] for l:match in ale#util#GetMatches(a:lines, l:pattern) diff --git a/vim-config/plugins/ale/autoload/ale/handlers/cspell.vim b/vim-config/plugins/ale/autoload/ale/handlers/cspell.vim new file mode 100644 index 00000000..2cd02d5c --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/handlers/cspell.vim @@ -0,0 +1,54 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: Define a handler function for cspell's output + +function! ale#handlers#cspell#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, + \ 'cspell', [ + \ 'node_modules/.bin/cspell', + \ 'node_modules/cspell/bin.js', + \ ] + \) +endfunction + +function! ale#handlers#cspell#GetCommand(buffer) abort + let l:executable = ale#handlers#cspell#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'cspell_options') + + return ale#node#Executable(a:buffer, l:executable) + \ . ' lint --no-color --no-progress --no-summary' + \ . ale#Pad(l:options) + \ . ' -- stdin' +endfunction + +function! ale#handlers#cspell#Handle(buffer, lines) abort + " Look for lines like the following: + " + " /home/user/repos/ale/README.md:723:48 - Unknown word (stylelint) + let l:pattern = '\v^.*:(\d+):(\d+) - (.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[3], + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +function! ale#handlers#cspell#DefineLinter(filetype) abort + call ale#Set('cspell_executable', 'cspell') + call ale#Set('cspell_options', '') + call ale#Set('cspell_use_global', get(g:, 'ale_use_global_executables', 0)) + + call ale#linter#Define(a:filetype, { + \ 'name': 'cspell', + \ 'executable': function('ale#handlers#cspell#GetExecutable'), + \ 'command': function('ale#handlers#cspell#GetCommand'), + \ 'callback': 'ale#handlers#cspell#Handle', + \}) +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/handlers/deno.vim b/vim-config/plugins/ale/autoload/ale/handlers/deno.vim index 1b5e1718..b762f983 100644 --- a/vim-config/plugins/ale/autoload/ale/handlers/deno.vim +++ b/vim-config/plugins/ale/autoload/ale/handlers/deno.vim @@ -29,6 +29,8 @@ function! ale#handlers#deno#GetProjectRoot(buffer) abort endif let l:possible_project_roots = [ + \ 'deno.json', + \ 'deno.jsonc', \ 'tsconfig.json', \ '.git', \ bufname(a:buffer), diff --git a/vim-config/plugins/ale/autoload/ale/handlers/haskell.vim b/vim-config/plugins/ale/autoload/ale/handlers/haskell.vim index 3613b1bb..70a3a7ea 100644 --- a/vim-config/plugins/ale/autoload/ale/handlers/haskell.vim +++ b/vim-config/plugins/ale/autoload/ale/handlers/haskell.vim @@ -19,6 +19,16 @@ let s:temp_regex_prefix = \ . substitute(s:temp_dir, '\\', '\\\\', 'g') \ . '\.\{-}' +function! s:PanicOutput(lines) abort + return [{ + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'ghc panic!', + \ 'type': 'E', + \ 'detail' : join(a:lines, "\n"), + \}] +endfunction + function! ale#handlers#haskell#HandleGHCFormat(buffer, lines) abort " Look for lines like the following. " @@ -34,6 +44,14 @@ function! ale#handlers#haskell#HandleGHCFormat(buffer, lines) abort let l:corrected_lines = [] + " If ghc panic error, put the whole message in details and exit. + let l:panic_position = match(a:lines,'ghc: panic!') + let l:panic_end = match(a:lines,'Please report this as a GHC bug:') + + if l:panic_position >= 0 + return s:PanicOutput(a:lines[l:panic_position : l:panic_end]) + endif + " Group the lines into smaller lists. for l:line in a:lines if len(matchlist(l:line, l:pattern)) > 0 diff --git a/vim-config/plugins/ale/autoload/ale/handlers/hdl_checker.vim b/vim-config/plugins/ale/autoload/ale/handlers/hdl_checker.vim index e11c5377..e871b083 100644 --- a/vim-config/plugins/ale/autoload/ale/handlers/hdl_checker.vim +++ b/vim-config/plugins/ale/autoload/ale/handlers/hdl_checker.vim @@ -13,7 +13,7 @@ function! ale#handlers#hdl_checker#IsDotGit(path) abort return ! empty(a:path) && isdirectory(a:path) endfunction -" Sould return (in order of preference) +" Should return (in order of preference) " 1. Nearest config file " 2. Nearest .git directory " 3. The current path diff --git a/vim-config/plugins/ale/autoload/ale/handlers/naga.vim b/vim-config/plugins/ale/autoload/ale/handlers/naga.vim new file mode 100644 index 00000000..6480aba6 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/handlers/naga.vim @@ -0,0 +1,30 @@ +" Author: rhysd +" Description: Handle errors for naga-cli. + +function! ale#handlers#naga#Handle(buffer, lines) abort + let l:errors = [] + let l:current_error = v:null + + for l:line in a:lines + if l:line =~# '^error: ' + let l:text = l:line[7:] + let l:current_error = { 'text': l:text, 'type': 'E' } + continue + endif + + if l:current_error isnot v:null + let l:matches = matchlist(l:line, '\v:(\d+):(\d+)$') + + if !empty(l:matches) + let l:current_error.lnum = str2nr(l:matches[1]) + let l:current_error.col = str2nr(l:matches[2]) + call add(l:errors, l:current_error) + let l:current_error = v:null + continue + endif + endif + endfor + + return l:errors +endfunction + diff --git a/vim-config/plugins/ale/autoload/ale/handlers/openscad.vim b/vim-config/plugins/ale/autoload/ale/handlers/openscad.vim new file mode 100644 index 00000000..33eee31c --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/handlers/openscad.vim @@ -0,0 +1,73 @@ +scriptencoding utf-8LE +" Description: This file defines a handler function for linting OpenSCAD files +" with SCA2D + +function! ale#handlers#openscad#SCA2D_callback(buffer, lines) abort + " Example output:: + " foo.scad:3:1: W2001: Variable `unused` overwritten within scope. + " foo.scad:1:1: F0001: Cannot read file due to syntax error: + " - No terminal matches '}' in the current parser context, at line 1 col 36 + let l:filename_re = '^\([^:]*\):' + let l:linenum_re = '\([0-9]*\):' + let l:colnum_re = '\([0-9]*\):' + let l:err_id = '\([IWEFU][0-9]\+\):' + let l:err_msg = '\(.*\)' + let l:pattern = filename_re . + \ linenum_re . + \ colnum_re . + \ ' ' . + \ err_id . + \ ' ' . + \ err_msg + + let l:result = [] + let l:idx = 0 + + for l:line in a:lines + let l:matches = matchlist(line, pattern) + + if len(matches) > 0 + " option: Info, Warning, Error, Fatal, Unknown + if index(['I', 'W'], matches[4][0]) >= 0 + let l:type = 'W' + else + let l:type = 'E' + endif + + let l:lnum = matches[2] + let l:col = matches[3] + let l:text = matches[5] + + " Better locations for some syntax errors + if matches[4][0] is# 'F' + let l:syntax_error_re = '^\(.*\), at line \([0-9]\+\) col \([0-9]\+\)$' + let l:next_line = a:lines[idx+1] + let l:syn_err_matches = matchlist(l:next_line, l:syntax_error_re) + + if len(syn_err_matches) > 0 + let l:text = l:text . l:syn_err_matches[1] + let l:lnum = l:syn_err_matches[2] + let l:col = l:syn_err_matches[3] + else + let l:text = l:next_line + endif + endif + + let l:element = { + \ 'lnum': str2nr(l:lnum), + \ 'col': str2nr(l:col), + \ 'text': l:text, + \ 'detail': l:matches[4] . ': ' . l:text, + \ 'filename': fnamemodify(matches[1], ':p'), + \ 'type': l:type + \ } + + call add(l:result, l:element) + endif + + let l:idx += 1 + endfor + + return result + +endfun diff --git a/vim-config/plugins/ale/autoload/ale/handlers/sml.vim b/vim-config/plugins/ale/autoload/ale/handlers/sml.vim index f5365dd6..403b25fa 100644 --- a/vim-config/plugins/ale/autoload/ale/handlers/sml.vim +++ b/vim-config/plugins/ale/autoload/ale/handlers/sml.vim @@ -63,26 +63,35 @@ function! ale#handlers#sml#Handle(buffer, lines) abort let l:match2 = matchlist(l:line, l:pattern2) if len(l:match2) != 0 - call add(l:out, { - \ 'filename': l:match2[1], + if l:match2[1] =~# 'stdIn$' + let l:loc = {'bufnr': a:buffer} + else + let l:loc = {'filename': l:match2[1]} + endif + + call add(l:out, extend(l:loc, { \ 'lnum': l:match2[2] + 0, \ 'col' : l:match2[3] - 1, \ 'text': l:match2[4], \ 'type': l:match2[4] =~# '^Warning' ? 'W' : 'E', - \}) - + \})) continue endif let l:match = matchlist(l:line, l:pattern) if len(l:match) != 0 - call add(l:out, { - \ 'filename': l:match[1], + if l:match[1] =~# 'stdIn$' + let l:loc = {'bufnr': a:buffer} + else + let l:loc = {'filename': l:match[1]} + endif + + call add(l:out, extend(l:loc, { \ 'lnum': l:match[2] + 0, \ 'text': l:match[3] . ': ' . l:match[4], \ 'type': l:match[3] is# 'error' ? 'E' : 'W', - \}) + \})) continue endif endfor diff --git a/vim-config/plugins/ale/autoload/ale/handlers/statix.vim b/vim-config/plugins/ale/autoload/ale/handlers/statix.vim new file mode 100644 index 00000000..eeef4107 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/handlers/statix.vim @@ -0,0 +1,24 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: This file defines a handler function for statix's errorformat +" output. + +function! ale#handlers#statix#Handle(buffer, lines) abort + " Look for lines like the following. + " + " flake.nix>46:13:W:3:This assignment is better written with `inherit` + let l:pattern = '\v^.*\>(\d+):(\d+):([A-Z]):(\d+):(.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:match[3], + \ 'code': l:match[4], + \ 'text': l:match[5], + \}) + endfor + + return l:output +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/hover.vim b/vim-config/plugins/ale/autoload/ale/hover.vim index 4513c6ad..0954b802 100644 --- a/vim-config/plugins/ale/autoload/ale/hover.vim +++ b/vim-config/plugins/ale/autoload/ale/hover.vim @@ -46,7 +46,7 @@ function! ale#hover#HandleTSServerResponse(conn_id, response) abort call balloon_show(a:response.body.displayString) elseif get(l:options, 'truncated_echo', 0) if !empty(a:response.body.displayString) - call ale#cursor#TruncatedEcho(split(a:response.body.displayString, "\n")[0]) + call ale#cursor#TruncatedEcho(a:response.body.displayString) endif elseif g:ale_hover_to_floating_preview || g:ale_floating_preview call ale#floating_preview#Show(split(a:response.body.displayString, "\n"), { @@ -231,7 +231,11 @@ function! ale#hover#HandleLSPResponse(conn_id, response) abort \&& (l:set_balloons is 1 || l:set_balloons is# 'hover') call balloon_show(join(l:lines, "\n")) elseif get(l:options, 'truncated_echo', 0) - call ale#cursor#TruncatedEcho(l:lines[0]) + if type(l:lines[0]) is# v:t_list + call ale#cursor#TruncatedEcho(join(l:lines[0], '\n')) + else + call ale#cursor#TruncatedEcho(l:lines[0]) + endif elseif g:ale_hover_to_floating_preview || g:ale_floating_preview call ale#floating_preview#Show(l:lines, { \ 'filetype': 'ale-preview.message', @@ -335,6 +339,10 @@ function! ale#hover#ShowTruncatedMessageAtCursor() abort let l:buffer = bufnr('') let l:pos = getpos('.')[0:2] + if !getbufvar(l:buffer, 'ale_enabled', 1) + return + endif + if l:pos != s:last_pos let s:last_pos = l:pos let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer) diff --git a/vim-config/plugins/ale/autoload/ale/java.vim b/vim-config/plugins/ale/autoload/ale/java.vim index e641ac6c..859d938d 100644 --- a/vim-config/plugins/ale/autoload/ale/java.vim +++ b/vim-config/plugins/ale/autoload/ale/java.vim @@ -1,7 +1,7 @@ " Author: Horacio Sanson https://github.com/hsanson " Description: Functions for integrating with Java tools -" Find the nearest dir contining a gradle or pom file and asume it +" Find the nearest dir contining a gradle or pom file and assume it " the root of a java app. function! ale#java#FindProjectRoot(buffer) abort let l:gradle_root = ale#gradle#FindProjectRoot(a:buffer) diff --git a/vim-config/plugins/ale/autoload/ale/job.vim b/vim-config/plugins/ale/autoload/ale/job.vim index 14b3e484..0fc43a8c 100644 --- a/vim-config/plugins/ale/autoload/ale/job.vim +++ b/vim-config/plugins/ale/autoload/ale/job.vim @@ -187,10 +187,16 @@ function! ale#job#PrepareCommand(buffer, command) abort \ : a:command " If a custom shell is specified, use that. - if exists('g:ale_shell') - let l:shell_arguments = get(g:, 'ale_shell_arguments', &shellcmdflag) + if exists('b:ale_shell') + let l:ale_shell = b:ale_shell + elseif exists('g:ale_shell') + let l:ale_shell = g:ale_shell + endif + + if exists('l:ale_shell') + let l:shell_arguments = get(b:, 'ale_shell_arguments', get(g:, 'ale_shell_arguments', &shellcmdflag)) - return split(g:ale_shell) + split(l:shell_arguments) + [l:command] + return split(l:ale_shell) + split(l:shell_arguments) + [l:command] endif if has('win32') @@ -244,10 +250,16 @@ function! ale#job#Start(command, options) abort if has_key(a:options, 'out_cb') let l:job_options.out_cb = function('s:VimOutputCallback') + else + " prevent buffering of output and excessive polling in case close_cb is set + let l:job_options.out_cb = {->0} endif if has_key(a:options, 'err_cb') let l:job_options.err_cb = function('s:VimErrorCallback') + else + " prevent buffering of output and excessive polling in case close_cb is set + let l:job_options.err_cb = {->0} endif if has_key(a:options, 'exit_cb') diff --git a/vim-config/plugins/ale/autoload/ale/linter.vim b/vim-config/plugins/ale/autoload/ale/linter.vim index cbc79064..d90deace 100644 --- a/vim-config/plugins/ale/autoload/ale/linter.vim +++ b/vim-config/plugins/ale/autoload/ale/linter.vim @@ -19,6 +19,7 @@ let s:default_ale_linter_aliases = { \ 'rmd': 'r', \ 'systemverilog': 'verilog', \ 'typescriptreact': ['typescript', 'tsx'], +\ 'vader': ['vim', 'vader'], \ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'], \ 'vimwiki': 'markdown', \ 'vue': ['vue', 'javascript'], @@ -45,15 +46,20 @@ let s:default_ale_linters = { \ 'hack': ['hack'], \ 'help': [], \ 'inko': ['inko'], +\ 'json': ['jsonlint', 'spectral', 'vscodejson'], +\ 'json5': [], +\ 'jsonc': [], \ 'perl': ['perlcritic'], \ 'perl6': [], -\ 'python': ['flake8', 'mypy', 'pylint', 'pyright'], +\ 'python': ['flake8', 'mypy', 'pylint', 'pyright', 'ruff'], \ 'rust': ['cargo', 'rls'], \ 'spec': [], \ 'text': [], +\ 'vader': ['vimls'], \ 'vue': ['eslint', 'vls'], \ 'zsh': ['shell'], \ 'v': ['v'], +\ 'yaml': ['spectral', 'yaml-language-server', 'yamllint'], \} " Testing/debugging helper to unload all linters. diff --git a/vim-config/plugins/ale/autoload/ale/list.vim b/vim-config/plugins/ale/autoload/ale/list.vim index 089aa2c0..8ce8597e 100644 --- a/vim-config/plugins/ale/autoload/ale/list.vim +++ b/vim-config/plugins/ale/autoload/ale/list.vim @@ -18,7 +18,7 @@ if !exists('s:timer_args') let s:timer_args = {} endif -" Return 1 if there is a buffer with buftype == 'quickfix' in bufffer list +" Return 1 if there is a buffer with buftype == 'quickfix' in buffer list function! ale#list#IsQuickfixOpen() abort let l:res = getqflist({ 'winid' : winnr() }) @@ -36,12 +36,22 @@ function! ale#list#IsQuickfixOpen() abort endfunction " Check if we should open the list, based on the save event being fired, and -" that setting being on, or the setting just being set to `1`. -function! s:ShouldOpen(buffer) abort +" that setting being on, or that the error count is at least as high as the +" setting when set to an integer value. +function! s:ShouldOpen(buffer, loclist_len) abort let l:val = ale#Var(a:buffer, 'open_list') let l:saved = getbufvar(a:buffer, 'ale_save_event_fired', 0) - return l:val is 1 || (l:val is# 'on_save' && l:saved) + return l:val > 0 ? a:loclist_len >= l:val : l:val is# 'on_save' && l:saved +endfunction + +" Check if we should close the list, based on the save event being fired, and +" that setting being on, or the setting just being set to an integer value. +function! s:ShouldClose(buffer) abort + let l:val = ale#Var(a:buffer, 'open_list') + let l:saved = getbufvar(a:buffer, 'ale_save_event_fired', 0) + + return !((l:val >= 1) || (l:val is# 'on_save' && l:saved)) endfunction function! s:Deduplicate(list) abort @@ -122,9 +132,9 @@ function! s:SetListsImpl(timer_id, buffer, loclist) abort " Open a window to show the problems if we need to. " - " We'll check if the current buffer's List is not empty here, so the - " window will only be opened if the current buffer has problems. - if s:ShouldOpen(a:buffer) && !empty(a:loclist) + " ShouldOpen() checks if the current buffer has enough problems to be + " opened. + if s:ShouldOpen(a:buffer, len(a:loclist)) let l:winnr = winnr() let l:mode = mode() @@ -180,7 +190,7 @@ function! s:RestoreViewIfNeeded(buffer) abort return endif - " Check wether the cursor has moved since linting was actually requested. If + " Check whether the cursor has moved since linting was actually requested. If " the user has indeed moved lines, do nothing let l:current_view = winsaveview() @@ -212,8 +222,25 @@ function! ale#list#SetLists(buffer, loclist) abort endif endfunction +function! ale#list#ForcePopulateErrorList(populate_quickfix) abort + let l:quickfix_bak = g:ale_set_quickfix + let g:ale_set_quickfix = a:populate_quickfix + let l:loclist_bak = g:ale_set_loclist + let g:ale_set_loclist = !a:populate_quickfix + let l:open_list_bak = g:ale_open_list + let g:ale_open_list = 1 + + let l:buffer = bufnr('') + let l:loclist = get(g:ale_buffer_info, l:buffer, {'loclist': []}).loclist + call s:SetListsImpl(-1, l:buffer, l:loclist) + + let g:ale_open_list = l:open_list_bak + let g:ale_set_loclist = l:loclist_bak + let g:ale_set_quickfix = l:quickfix_bak +endfunction + function! s:CloseWindowIfNeeded(buffer) abort - if ale#Var(a:buffer, 'keep_list_window_open') || !s:ShouldOpen(a:buffer) + if ale#Var(a:buffer, 'keep_list_window_open') || s:ShouldClose(a:buffer) return endif diff --git a/vim-config/plugins/ale/autoload/ale/lsp.vim b/vim-config/plugins/ale/autoload/ale/lsp.vim index 75d81525..daaed6fa 100644 --- a/vim-config/plugins/ale/autoload/ale/lsp.vim +++ b/vim-config/plugins/ale/autoload/ale/lsp.vim @@ -38,11 +38,13 @@ function! ale#lsp#Register(executable_or_address, project, init_options) abort \ 'capabilities': { \ 'hover': 0, \ 'rename': 0, + \ 'filerename': 0, \ 'references': 0, \ 'completion': 0, \ 'completion_trigger_characters': [], \ 'definition': 0, \ 'typeDefinition': 0, + \ 'implementation': 0, \ 'symbol_search': 0, \ 'code_actions': 0, \ 'did_save': 0, @@ -258,6 +260,14 @@ function! s:UpdateCapabilities(conn, capabilities) abort let a:conn.capabilities.typeDefinition = 1 endif + if get(a:capabilities, 'implementationProvider') is v:true + let a:conn.capabilities.implementation = 1 + endif + + if type(get(a:capabilities, 'implementationProvider')) is v:t_dict + let a:conn.capabilities.implementation = 1 + endif + if get(a:capabilities, 'workspaceSymbolProvider') is v:true let a:conn.capabilities.symbol_search = 1 endif @@ -378,8 +388,10 @@ function! ale#lsp#MarkConnectionAsTsserver(conn_id) abort let l:conn.capabilities.completion_trigger_characters = ['.'] let l:conn.capabilities.definition = 1 let l:conn.capabilities.typeDefinition = 1 + let l:conn.capabilities.implementation = 1 let l:conn.capabilities.symbol_search = 1 let l:conn.capabilities.rename = 1 + let l:conn.capabilities.filerename = 1 let l:conn.capabilities.code_actions = 1 endfunction @@ -436,11 +448,20 @@ function! s:SendInitMessage(conn) abort \ 'typeDefinition': { \ 'dynamicRegistration': v:false, \ }, + \ 'implementation': { + \ 'dynamicRegistration': v:false, + \ 'linkSupport': v:false, + \ }, \ 'publishDiagnostics': { \ 'relatedInformation': v:true, \ }, \ 'codeAction': { \ 'dynamicRegistration': v:false, + \ 'codeActionLiteralSupport': { + \ 'codeActionKind': { + \ 'valueSet': [] + \ } + \ } \ }, \ 'rename': { \ 'dynamicRegistration': v:false, @@ -465,6 +486,7 @@ function! ale#lsp#StartProgram(conn_id, executable, command) abort let l:options = { \ 'mode': 'raw', \ 'out_cb': {_, message -> ale#lsp#HandleMessage(a:conn_id, message)}, + \ 'exit_cb': { -> ale#lsp#Stop(a:conn_id) }, \} if has('win32') diff --git a/vim-config/plugins/ale/autoload/ale/lsp/message.vim b/vim-config/plugins/ale/autoload/ale/lsp/message.vim index b40c4407..c2238dec 100644 --- a/vim-config/plugins/ale/autoload/ale/lsp/message.vim +++ b/vim-config/plugins/ale/autoload/ale/lsp/message.vim @@ -35,7 +35,7 @@ function! ale#lsp#message#Initialize(root_path, options, capabilities) abort \ 'rootPath': a:root_path, \ 'capabilities': a:capabilities, \ 'initializationOptions': a:options, - \ 'rootUri': ale#path#ToURI(a:root_path), + \ 'rootUri': ale#util#ToURI(a:root_path), \}] endfunction @@ -56,7 +56,7 @@ function! ale#lsp#message#DidOpen(buffer, language_id) abort return [1, 'textDocument/didOpen', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')), + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), \ 'languageId': a:language_id, \ 'version': ale#lsp#message#GetNextVersionID(), \ 'text': join(l:lines, "\n") . "\n", @@ -70,21 +70,21 @@ function! ale#lsp#message#DidChange(buffer) abort " For changes, we simply send the full text of the document to the server. return [1, 'textDocument/didChange', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')), + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), \ 'version': ale#lsp#message#GetNextVersionID(), \ }, \ 'contentChanges': [{'text': join(l:lines, "\n") . "\n"}] \}] endfunction -function! ale#lsp#message#DidSave(buffer, includeText) abort +function! ale#lsp#message#DidSave(buffer, include_text) abort let l:response = [1, 'textDocument/didSave', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')), + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), \ }, \}] - if a:includeText + if a:include_text let l:response[2].textDocument.version = ale#lsp#message#GetNextVersionID() let l:response[2].text = ale#util#GetBufferContents(a:buffer) endif @@ -95,7 +95,7 @@ endfunction function! ale#lsp#message#DidClose(buffer) abort return [1, 'textDocument/didClose', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')), + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), \ }, \}] endfunction @@ -106,7 +106,7 @@ let s:COMPLETION_TRIGGER_CHARACTER = 2 function! ale#lsp#message#Completion(buffer, line, column, trigger_character) abort let l:message = [0, 'textDocument/completion', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')), + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), \ }, \ 'position': {'line': a:line - 1, 'character': a:column - 1}, \}] @@ -124,7 +124,7 @@ endfunction function! ale#lsp#message#Definition(buffer, line, column) abort return [0, 'textDocument/definition', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')), + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), \ }, \ 'position': {'line': a:line - 1, 'character': a:column - 1}, \}] @@ -133,7 +133,16 @@ endfunction function! ale#lsp#message#TypeDefinition(buffer, line, column) abort return [0, 'textDocument/typeDefinition', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')), + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ }, + \ 'position': {'line': a:line - 1, 'character': a:column - 1}, + \}] +endfunction + +function! ale#lsp#message#Implementation(buffer, line, column) abort + return [0, 'textDocument/implementation', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), \ }, \ 'position': {'line': a:line - 1, 'character': a:column - 1}, \}] @@ -142,7 +151,7 @@ endfunction function! ale#lsp#message#References(buffer, line, column) abort return [0, 'textDocument/references', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')), + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), \ }, \ 'position': {'line': a:line - 1, 'character': a:column - 1}, \ 'context': {'includeDeclaration': v:false}, @@ -158,7 +167,7 @@ endfunction function! ale#lsp#message#Hover(buffer, line, column) abort return [0, 'textDocument/hover', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')), + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), \ }, \ 'position': {'line': a:line - 1, 'character': a:column - 1}, \}] @@ -173,7 +182,7 @@ endfunction function! ale#lsp#message#Rename(buffer, line, column, new_name) abort return [0, 'textDocument/rename', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')), + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), \ }, \ 'position': {'line': a:line - 1, 'character': a:column - 1}, \ 'newName': a:new_name, @@ -183,7 +192,7 @@ endfunction function! ale#lsp#message#CodeAction(buffer, line, column, end_line, end_column, diagnostics) abort return [0, 'textDocument/codeAction', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')), + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), \ }, \ 'range': { \ 'start': {'line': a:line - 1, 'character': a:column - 1}, diff --git a/vim-config/plugins/ale/autoload/ale/lsp/response.vim b/vim-config/plugins/ale/autoload/ale/lsp/response.vim index a4f80980..498ec508 100644 --- a/vim-config/plugins/ale/autoload/ale/lsp/response.vim +++ b/vim-config/plugins/ale/autoload/ale/lsp/response.vim @@ -59,7 +59,7 @@ function! ale#lsp#response#ReadDiagnostics(response) abort \ && l:diagnostic.relatedInformation isnot v:null let l:related = deepcopy(l:diagnostic.relatedInformation) call map(l:related, {key, val -> - \ ale#path#FromURI(val.location.uri) . + \ ale#util#ToResource(val.location.uri) . \ ':' . (val.location.range.start.line + 1) . \ ':' . (val.location.range.start.character + 1) . \ ":\n\t" . val.message diff --git a/vim-config/plugins/ale/autoload/ale/lsp/tsserver_message.vim b/vim-config/plugins/ale/autoload/ale/lsp/tsserver_message.vim index 00213a75..02e57899 100644 --- a/vim-config/plugins/ale/autoload/ale/lsp/tsserver_message.vim +++ b/vim-config/plugins/ale/autoload/ale/lsp/tsserver_message.vim @@ -72,6 +72,14 @@ function! ale#lsp#tsserver_message#TypeDefinition(buffer, line, column) abort \}] endfunction +function! ale#lsp#tsserver_message#Implementation(buffer, line, column) abort + return [0, 'ts@implementation', { + \ 'line': a:line, + \ 'offset': a:column, + \ 'file': expand('#' . a:buffer . ':p'), + \}] +endfunction + function! ale#lsp#tsserver_message#References(buffer, line, column) abort return [0, 'ts@references', { \ 'line': a:line, @@ -101,6 +109,14 @@ function! ale#lsp#tsserver_message#Rename( \}] endfunction +function! ale#lsp#tsserver_message#GetEditsForFileRename( +\ oldFilePath, newFilePath) abort + return [0, 'ts@getEditsForFileRename', { + \ 'oldFilePath': a:oldFilePath, + \ 'newFilePath': a:newFilePath, + \}] +endfunction + function! ale#lsp#tsserver_message#OrganizeImports(buffer) abort return [0, 'ts@organizeImports', { \ 'scope': { diff --git a/vim-config/plugins/ale/autoload/ale/lsp_linter.vim b/vim-config/plugins/ale/autoload/ale/lsp_linter.vim index 230b3141..1c98d628 100644 --- a/vim-config/plugins/ale/autoload/ale/lsp_linter.vim +++ b/vim-config/plugins/ale/autoload/ale/lsp_linter.vim @@ -11,6 +11,22 @@ endif " A Dictionary to track one-shot handlers for custom LSP requests let s:custom_handlers_map = get(s:, 'custom_handlers_map', {}) +" Clear LSP linter data for the linting engine. +function! ale#lsp_linter#ClearLSPData() abort + let s:lsp_linter_map = {} + let s:custom_handlers_map = {} +endfunction + +" Only for internal use. +function! ale#lsp_linter#GetLSPLinterMap() abort + return s:lsp_linter_map +endfunction + +" Just for tests. +function! ale#lsp_linter#SetLSPLinterMap(replacement_map) abort + let s:lsp_linter_map = a:replacement_map +endfunction + " Check if diagnostics for a particular linter should be ignored. function! s:ShouldIgnore(buffer, linter_name) abort " Ignore all diagnostics if LSP integration is disabled. @@ -33,7 +49,7 @@ endfunction function! s:HandleLSPDiagnostics(conn_id, response) abort let l:linter_name = s:lsp_linter_map[a:conn_id] - let l:filename = ale#path#FromURI(a:response.params.uri) + let l:filename = ale#util#ToResource(a:response.params.uri) let l:escaped_name = escape( \ fnameescape(l:filename), \ has('win32') ? '^' : '^,}]' @@ -125,6 +141,10 @@ function! s:HandleLSPErrorMessage(linter_name, response) abort return endif + call ale#lsp_linter#AddErrorMessage(a:linter_name, l:message) +endfunction + +function! ale#lsp_linter#AddErrorMessage(linter_name, message) abort " This global variable is set here so we don't load the debugging.vim file " until someone uses :ALEInfo. let g:ale_lsp_error_messages = get(g:, 'ale_lsp_error_messages', {}) @@ -133,7 +153,7 @@ function! s:HandleLSPErrorMessage(linter_name, response) abort let g:ale_lsp_error_messages[a:linter_name] = [] endif - call add(g:ale_lsp_error_messages[a:linter_name], l:message) + call add(g:ale_lsp_error_messages[a:linter_name], a:message) endfunction function! ale#lsp_linter#HandleLSPResponse(conn_id, response) abort @@ -414,6 +434,8 @@ function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort if empty(l:root) && a:linter.lsp isnot# 'tsserver' " If there's no project root, then we can't check files with LSP, " unless we are using tsserver, which doesn't use project roots. + call ale#lsp_linter#AddErrorMessage(a:linter.name, "Failed to find project root, language server won't start.") + return 0 endif @@ -466,8 +488,8 @@ function! s:CheckWithLSP(linter, details) abort " If this was a file save event, also notify the server of that. if a:linter.lsp isnot# 'tsserver' \&& getbufvar(l:buffer, 'ale_save_event_fired', 0) - \&& ale#lsp#HasCapability(l:buffer, 'did_save') - let l:include_text = ale#lsp#HasCapability(l:buffer, 'includeText') + \&& ale#lsp#HasCapability(l:id, 'did_save') + let l:include_text = ale#lsp#HasCapability(l:id, 'includeText') let l:save_message = ale#lsp#message#DidSave(l:buffer, l:include_text) let l:notified = ale#lsp#Send(l:id, l:save_message) != 0 endif @@ -477,17 +499,6 @@ function! ale#lsp_linter#CheckWithLSP(buffer, linter) abort return ale#lsp_linter#StartLSP(a:buffer, a:linter, function('s:CheckWithLSP')) endfunction -" Clear LSP linter data for the linting engine. -function! ale#lsp_linter#ClearLSPData() abort - let s:lsp_linter_map = {} - let s:custom_handlers_map = {} -endfunction - -" Just for tests. -function! ale#lsp_linter#SetLSPLinterMap(replacement_map) abort - let s:lsp_linter_map = a:replacement_map -endfunction - function! s:HandleLSPResponseToCustomRequests(conn_id, response) abort if has_key(a:response, 'id') \&& has_key(s:custom_handlers_map, a:response.id) diff --git a/vim-config/plugins/ale/autoload/ale/organize_imports.vim b/vim-config/plugins/ale/autoload/ale/organize_imports.vim index e2b1c0d2..a6e77863 100644 --- a/vim-config/plugins/ale/autoload/ale/organize_imports.vim +++ b/vim-config/plugins/ale/autoload/ale/organize_imports.vim @@ -1,6 +1,6 @@ " Author: Jerko Steiner " Description: Organize imports support for tsserver -" + function! ale#organize_imports#HandleTSServerResponse(conn_id, response) abort if get(a:response, 'command', '') isnot# 'organizeImports' return @@ -17,7 +17,10 @@ function! ale#organize_imports#HandleTSServerResponse(conn_id, response) abort \ 'description': 'Organize Imports', \ 'changes': l:file_code_edits, \ }, - \ {} + \ { + \ 'conn_id': a:conn_id, + \ 'should_save': !&hidden, + \ }, \) endfunction diff --git a/vim-config/plugins/ale/autoload/ale/path.vim b/vim-config/plugins/ale/autoload/ale/path.vim index c7bfd47e..cc5c6658 100644 --- a/vim-config/plugins/ale/autoload/ale/path.vim +++ b/vim-config/plugins/ale/autoload/ale/path.vim @@ -218,7 +218,7 @@ endfunction " Convert a filesystem path to a file:// URI " relatives paths will not be prefixed with the protocol. " For Windows paths, the `:` in C:\ etc. will not be percent-encoded. -function! ale#path#ToURI(path) abort +function! ale#path#ToFileURI(path) abort let l:has_drive_letter = a:path[1:2] is# ':\' return substitute( @@ -231,7 +231,7 @@ function! ale#path#ToURI(path) abort \) endfunction -function! ale#path#FromURI(uri) abort +function! ale#path#FromFileURI(uri) abort if a:uri[:6] is? 'file://' let l:encoded_path = a:uri[7:] elseif a:uri[:4] is? 'file:' diff --git a/vim-config/plugins/ale/autoload/ale/python.vim b/vim-config/plugins/ale/autoload/ale/python.vim index 81cb06e0..7a998414 100644 --- a/vim-config/plugins/ale/autoload/ale/python.vim +++ b/vim-config/plugins/ale/autoload/ale/python.vim @@ -26,12 +26,15 @@ function! ale#python#FindProjectRootIni(buffer) abort \|| filereadable(l:path . '/tox.ini') \|| filereadable(l:path . '/.pyre_configuration.local') \|| filereadable(l:path . '/mypy.ini') + \|| filereadable(l:path . '/.mypy.ini') \|| filereadable(l:path . '/pycodestyle.cfg') \|| filereadable(l:path . '/.flake8') \|| filereadable(l:path . '/.flake8rc') \|| filereadable(l:path . '/pylama.ini') \|| filereadable(l:path . '/pylintrc') \|| filereadable(l:path . '/.pylintrc') + \|| filereadable(l:path . '/pyrightconfig.json') + \|| filereadable(l:path . '/pyrightconfig.toml') \|| filereadable(l:path . '/Pipfile') \|| filereadable(l:path . '/Pipfile.lock') \|| filereadable(l:path . '/poetry.lock') diff --git a/vim-config/plugins/ale/autoload/ale/references.vim b/vim-config/plugins/ale/autoload/ale/references.vim index 38ff0d3d..c32663fe 100644 --- a/vim-config/plugins/ale/autoload/ale/references.vim +++ b/vim-config/plugins/ale/autoload/ale/references.vim @@ -16,6 +16,23 @@ function! ale#references#ClearLSPData() abort let s:references_map = {} endfunction +function! ale#references#FormatTSResponseItem(response_item, options) abort + if get(a:options, 'open_in') is# 'quickfix' + return { + \ 'filename': a:response_item.file, + \ 'lnum': a:response_item.start.line, + \ 'col': a:response_item.start.offset, + \} + else + return { + \ 'filename': a:response_item.file, + \ 'line': a:response_item.start.line, + \ 'column': a:response_item.start.offset, + \ 'match': substitute(a:response_item.lineText, '^\s*\(.\{-}\)\s*$', '\1', ''), + \} + endif +endfunction + function! ale#references#HandleTSServerResponse(conn_id, response) abort if get(a:response, 'command', '') is# 'references' \&& has_key(s:references_map, a:response.request_seq) @@ -25,23 +42,43 @@ function! ale#references#HandleTSServerResponse(conn_id, response) abort let l:item_list = [] for l:response_item in a:response.body.refs - call add(l:item_list, { - \ 'filename': l:response_item.file, - \ 'line': l:response_item.start.line, - \ 'column': l:response_item.start.offset, - \ 'match': substitute(l:response_item.lineText, '^\s*\(.\{-}\)\s*$', '\1', ''), - \}) + call add( + \ l:item_list, + \ ale#references#FormatTSResponseItem(l:response_item, l:options) + \) endfor if empty(l:item_list) call ale#util#Execute('echom ''No references found.''') else - call ale#preview#ShowSelection(l:item_list, l:options) + if get(l:options, 'open_in') is# 'quickfix' + call setqflist([], 'r') + call setqflist(l:item_list, 'a') + call ale#util#Execute('cc 1') + else + call ale#preview#ShowSelection(l:item_list, l:options) + endif endif endif endif endfunction +function! ale#references#FormatLSPResponseItem(response_item, options) abort + if get(a:options, 'open_in') is# 'quickfix' + return { + \ 'filename': ale#util#ToResource(a:response_item.uri), + \ 'lnum': a:response_item.range.start.line + 1, + \ 'col': a:response_item.range.start.character + 1, + \} + else + return { + \ 'filename': ale#util#ToResource(a:response_item.uri), + \ 'line': a:response_item.range.start.line + 1, + \ 'column': a:response_item.range.start.character + 1, + \} + endif +endfunction + function! ale#references#HandleLSPResponse(conn_id, response) abort if has_key(a:response, 'id') \&& has_key(s:references_map, a:response.id) @@ -53,18 +90,22 @@ function! ale#references#HandleLSPResponse(conn_id, response) abort if type(l:result) is v:t_list for l:response_item in l:result - call add(l:item_list, { - \ 'filename': ale#path#FromURI(l:response_item.uri), - \ 'line': l:response_item.range.start.line + 1, - \ 'column': l:response_item.range.start.character + 1, - \}) + call add(l:item_list, + \ ale#references#FormatLSPResponseItem(l:response_item, l:options) + \) endfor endif if empty(l:item_list) call ale#util#Execute('echom ''No references found.''') else - call ale#preview#ShowSelection(l:item_list, l:options) + if get(l:options, 'open_in') is# 'quickfix' + call setqflist([], 'r') + call setqflist(l:item_list, 'a') + call ale#util#Execute('cc 1') + else + call ale#preview#ShowSelection(l:item_list, l:options) + endif endif endif endfunction @@ -119,6 +160,8 @@ function! ale#references#Find(...) abort let l:options.open_in = 'split' elseif l:option is? '-vsplit' let l:options.open_in = 'vsplit' + elseif l:option is? '-quickfix' + let l:options.open_in = 'quickfix' endif endfor endif diff --git a/vim-config/plugins/ale/autoload/ale/rename.vim b/vim-config/plugins/ale/autoload/ale/rename.vim index 9030618e..a722cc94 100644 --- a/vim-config/plugins/ale/autoload/ale/rename.vim +++ b/vim-config/plugins/ale/autoload/ale/rename.vim @@ -84,7 +84,8 @@ function! ale#rename#HandleTSServerResponse(conn_id, response) abort \ 'changes': l:changes, \ }, \ { - \ 'should_save': 1, + \ 'conn_id': a:conn_id, + \ 'should_save': !&hidden, \ }, \) endfunction @@ -116,7 +117,8 @@ function! ale#rename#HandleLSPResponse(conn_id, response) abort \ 'changes': l:changes, \ }, \ { - \ 'should_save': 1, + \ 'conn_id': a:conn_id, + \ 'should_save': !&hidden, \ }, \) endif diff --git a/vim-config/plugins/ale/autoload/ale/symbol.vim b/vim-config/plugins/ale/autoload/ale/symbol.vim index ae4151ab..6c65f1b2 100644 --- a/vim-config/plugins/ale/autoload/ale/symbol.vim +++ b/vim-config/plugins/ale/autoload/ale/symbol.vim @@ -41,7 +41,7 @@ function! ale#symbol#HandleLSPResponse(conn_id, response) abort let l:location = l:response_item.location call add(l:item_list, { - \ 'filename': ale#path#FromURI(l:location.uri), + \ 'filename': ale#util#ToResource(l:location.uri), \ 'line': l:location.range.start.line + 1, \ 'column': l:location.range.start.character + 1, \ 'match': l:response_item.name, diff --git a/vim-config/plugins/ale/autoload/ale/test.vim b/vim-config/plugins/ale/autoload/ale/test.vim index 4d75d515..e03ecb65 100644 --- a/vim-config/plugins/ale/autoload/ale/test.vim +++ b/vim-config/plugins/ale/autoload/ale/test.vim @@ -62,25 +62,34 @@ function! ale#test#SetFilename(path) abort silent! noautocmd execute 'file ' . fnameescape(l:full_path) endfunction -function! s:RemoveModule(results) abort +function! RemoveNewerKeys(results) abort for l:item in a:results if has_key(l:item, 'module') call remove(l:item, 'module') endif + + if has_key(l:item, 'end_col') + call remove(l:item, 'end_col') + endif + + if has_key(l:item, 'end_lnum') + call remove(l:item, 'end_lnum') + endif endfor endfunction -" Return loclist data without the module string, only in newer Vim versions. -function! ale#test#GetLoclistWithoutModule() abort +" Return loclist data with only the keys supported by the lowest Vim versions. +function! ale#test#GetLoclistWithoutNewerKeys() abort let l:results = getloclist(0) - call s:RemoveModule(l:results) + call RemoveNewerKeys(l:results) return l:results endfunction -function! ale#test#GetQflistWithoutModule() abort +" Return quickfix data with only the keys supported by the lowest Vim versions. +function! ale#test#GetQflistWithoutNewerKeys() abort let l:results = getqflist() - call s:RemoveModule(l:results) + call RemoveNewerKeys(l:results) return l:results endfunction diff --git a/vim-config/plugins/ale/autoload/ale/toggle.vim b/vim-config/plugins/ale/autoload/ale/toggle.vim index 1311e527..abc53daa 100644 --- a/vim-config/plugins/ale/autoload/ale/toggle.vim +++ b/vim-config/plugins/ale/autoload/ale/toggle.vim @@ -14,8 +14,8 @@ function! s:DisablePostamble() abort call ale#highlight#UpdateHighlights() endif - if g:ale_virtualtext_cursor - call ale#virtualtext#Clear() + if g:ale_virtualtext_cursor is# 'current' || g:ale_virtualtext_cursor == 1 + call ale#virtualtext#Clear(bufnr('')) endif endfunction @@ -64,7 +64,8 @@ function! ale#toggle#ToggleBuffer(buffer) abort " Disabling ALE globally removes autocmd events, so we cannot enable " linting locally when linting is disabled globally if l:enabled && !g:ale_enabled - execute 'echom ''ALE cannot be enabled locally when disabled globally''' + " no-custom-checks + echom 'ALE cannot be enabled locally when disabled globally' return endif diff --git a/vim-config/plugins/ale/autoload/ale/uri.vim b/vim-config/plugins/ale/autoload/ale/uri.vim index e71c6340..d696f03d 100644 --- a/vim-config/plugins/ale/autoload/ale/uri.vim +++ b/vim-config/plugins/ale/autoload/ale/uri.vim @@ -25,3 +25,19 @@ function! ale#uri#Decode(value) abort \ 'g' \) endfunction + +let s:uri_handlers = { +\ 'jdt': { +\ 'OpenURILink': function('ale#uri#jdt#OpenJDTLink'), +\ } +\} + +function! ale#uri#GetURIHandler(uri) abort + for l:scheme in keys(s:uri_handlers) + if a:uri =~# '^'.l:scheme.'://' + return s:uri_handlers[scheme] + endif + endfor + + return v:null +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/uri/jdt.vim b/vim-config/plugins/ale/autoload/ale/uri/jdt.vim new file mode 100644 index 00000000..46cea268 --- /dev/null +++ b/vim-config/plugins/ale/autoload/ale/uri/jdt.vim @@ -0,0 +1,110 @@ +" Author: yoshi1123 +" Description: Functions for working with jdt:// URIs. + +function! s:OpenJDTLink(root, uri, line, column, options, result) abort + if has_key(a:result, 'error') + " no-custom-checks + echoerr a:result.error.message + + return + endif + + let l:contents = a:result['result'] + + if type(l:contents) is# type(v:null) + " no-custom-checks + echoerr 'File content not found' + endif + + " disable autocmd when opening buffer + autocmd! AleURISchemes + call ale#util#Open(a:uri, a:line, a:column, a:options) + autocmd AleURISchemes BufNewFile,BufReadPre jdt://** call ale#uri#jdt#ReadJDTLink(expand('')) + + if !empty(getbufvar(bufnr(''), 'ale_lsp_root', '')) + return + endif + + let b:ale_lsp_root = a:root + set filetype=java + + call setline(1, split(l:contents, '\n')) + call cursor(a:line, a:column) + normal! zz + + setlocal buftype=nofile nomodified nomodifiable readonly +endfunction + +" Load new buffer with jdt:// contents and jump to line and column. +function! ale#uri#jdt#OpenJDTLink(encoded_uri, line, column, options, conn_id) abort + let l:found_eclipselsp = v:false + + for l:linter in ale#linter#Get('java') + if l:linter.name is# 'eclipselsp' + let l:found_eclipselsp = v:true + endif + endfor + + if !l:found_eclipselsp + throw 'eclipselsp not running' + endif + + let l:root = a:conn_id[stridx(a:conn_id, ':')+1:] + let l:uri = a:encoded_uri + call ale#lsp_linter#SendRequest( + \ bufnr(''), + \ 'eclipselsp', + \ [0, 'java/classFileContents', {'uri': ale#util#ToURI(l:uri)}], + \ function('s:OpenJDTLink', [l:root, l:uri, a:line, a:column, a:options]) + \) +endfunction + +function! s:ReadClassFileContents(uri, result) abort + if has_key(a:result, 'error') + " no-custom-checks + echoerr a:result.error.message + + return + endif + + let l:contents = a:result['result'] + + if type(l:contents) is# type(v:null) + " no-custom-checks + echoerr 'File content not found' + endif + + call setline(1, split(l:contents, '\n')) + + setlocal buftype=nofile nomodified nomodifiable readonly +endfunction + +" Read jdt:// contents, as part of current project, into current buffer. +function! ale#uri#jdt#ReadJDTLink(encoded_uri) abort + if !empty(getbufvar(bufnr(''), 'ale_lsp_root', '')) + return + endif + + let l:linter_map = ale#lsp_linter#GetLSPLinterMap() + + for l:conn_id in keys(l:linter_map) + if l:linter_map[l:conn_id] is# 'eclipselsp' + let l:root = l:conn_id[stridx(l:conn_id, ':')+1:] + endif + endfor + + if l:root is# v:null + throw 'eclipselsp not running' + endif + + let l:uri = a:encoded_uri + let b:ale_lsp_root = l:root + set filetype=java + + call ale#lsp_linter#SendRequest( + \ bufnr(''), + \ 'eclipselsp', + \ [0, 'java/classFileContents', {'uri': ale#util#ToURI(l:uri)}], + \ function('s:ReadClassFileContents', [l:uri]) + \) +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/util.vim b/vim-config/plugins/ale/autoload/ale/util.vim index ec9383ac..c884076a 100644 --- a/vim-config/plugins/ale/autoload/ale/util.vim +++ b/vim-config/plugins/ale/autoload/ale/util.vim @@ -25,7 +25,8 @@ function! ale#util#ShowMessage(string, ...) abort " We have to assume the user is using a monospace font. if has('nvim') || (a:string !~? "\n" && len(a:string) < &columns) - execute 'echo a:string' + " no-custom-checks + echo a:string else call ale#preview#Show(split(a:string, "\n"), extend( \ { @@ -491,8 +492,12 @@ function! ale#util#FindItemAtCursor(buffer) abort return [l:info, l:loc] endfunction -function! ale#util#Input(message, value) abort - return input(a:message, a:value) +function! ale#util#Input(message, value, ...) abort + if a:0 > 0 + return input(a:message, a:value, a:1) + else + return input(a:message, a:value) + endif endfunction function! ale#util#HasBuflineApi() abort @@ -539,3 +544,31 @@ endfunction function! ale#util#GetBufferContents(buffer) abort return join(getbufline(a:buffer, 1, '$'), '\n') . '\n' endfunction + +function! ale#util#ToURI(resource) abort + let l:uri_handler = ale#uri#GetURIHandler(a:resource) + + if l:uri_handler is# v:null + " resource is a filesystem path + let l:uri = ale#path#ToFileURI(a:resource) + else + " resource is a URI + let l:uri = a:resource + endif + + return l:uri +endfunction + +function! ale#util#ToResource(uri) abort + let l:uri_handler = ale#uri#GetURIHandler(a:uri) + + if l:uri_handler is# v:null + " resource is a filesystem path + let l:resource = ale#path#FromFileURI(a:uri) + else + " resource is a URI + let l:resource = a:uri + endif + + return l:resource +endfunction diff --git a/vim-config/plugins/ale/autoload/ale/virtualtext.vim b/vim-config/plugins/ale/autoload/ale/virtualtext.vim index 598bc1bf..0f2b2173 100644 --- a/vim-config/plugins/ale/autoload/ale/virtualtext.vim +++ b/vim-config/plugins/ale/autoload/ale/virtualtext.vim @@ -3,23 +3,8 @@ scriptencoding utf-8 " Author: Luan Santos " Description: Shows lint message for the current line as virtualtext, if any -" Controls the milliseconds delay before showing a message. -let g:ale_virtualtext_delay = get(g:, 'ale_virtualtext_delay', 10) -let s:cursor_timer = -1 -let s:last_pos = [0, 0, 0] -let s:has_virt_text = 0 - -if has('nvim-0.3.2') - let s:ns_id = nvim_create_namespace('ale') - let s:has_virt_text = 1 -elseif has('textprop') && has('popupwin') - call prop_type_add('ale', {}) - let s:last_popup = -1 - let s:has_virt_text = 1 -endif - if !hlexists('ALEVirtualTextError') - highlight link ALEVirtualTextError ALEError + highlight link ALEVirtualTextError Comment endif if !hlexists('ALEVirtualTextStyleError') @@ -27,7 +12,7 @@ if !hlexists('ALEVirtualTextStyleError') endif if !hlexists('ALEVirtualTextWarning') - highlight link ALEVirtualTextWarning ALEWarning + highlight link ALEVirtualTextWarning Comment endif if !hlexists('ALEVirtualTextStyleWarning') @@ -38,63 +23,164 @@ if !hlexists('ALEVirtualTextInfo') highlight link ALEVirtualTextInfo ALEVirtualTextWarning endif -function! ale#virtualtext#Clear() abort - if !s:has_virt_text - return +let g:ale_virtualtext_prefix = +\ get(g:, 'ale_virtualtext_prefix', '%comment% %type%: ') +" Controls the milliseconds delay before showing a message. +let g:ale_virtualtext_delay = get(g:, 'ale_virtualtext_delay', 10) + +let s:cursor_timer = get(s:, 'cursor_timer', -1) +let s:last_pos = get(s:, 'last_pos', [0, 0, 0]) +let s:hl_list = get(s:, 'hl_list', []) +let s:last_message = '' + +if !has_key(s:, 'has_virt_text') + let s:has_virt_text = 0 + let s:emulate_virt = 0 + let s:last_virt = -1 + + if has('nvim-0.3.2') + let s:ns_id = nvim_create_namespace('ale') + let s:has_virt_text = 1 + elseif has('textprop') && has('popupwin') + let s:has_virt_text = 1 + let s:emulate_virt = !has('patch-9.0.0297') + + if s:emulate_virt + call prop_type_add('ale', {}) + endif endif +endif - let l:buffer = bufnr('') +function! s:StopCursorTimer() abort + if s:cursor_timer != -1 + call timer_stop(s:cursor_timer) + let s:cursor_timer = -1 + endif +endfunction + +function! ale#virtualtext#ResetDataForTests() abort + let s:last_pos = [0, 0, 0] + let s:last_message = '' +endfunction + +function! ale#virtualtext#GetLastMessageForTests() abort + return s:last_message +endfunction + +function! ale#virtualtext#GetComment(buffer) abort + let l:filetype = getbufvar(a:buffer, '&filetype') + let l:split = split(getbufvar(a:buffer, '&commentstring'), '%s') + + return !empty(l:split) ? trim(l:split[0]) : '#' +endfunction + +function! ale#virtualtext#Clear(buffer) abort + if !s:has_virt_text || !bufexists(str2nr(a:buffer)) + return + endif if has('nvim') - call nvim_buf_clear_highlight(l:buffer, s:ns_id, 0, -1) + call nvim_buf_clear_namespace(a:buffer, s:ns_id, 0, -1) else - if s:last_popup != -1 + if s:emulate_virt && s:last_virt != -1 call prop_remove({'type': 'ale'}) - call popup_close(s:last_popup) - let s:last_popup = -1 + call popup_close(s:last_virt) + let s:last_virt = -1 + elseif !empty(s:hl_list) + call prop_remove({ + \ 'types': s:hl_list, + \ 'all': 1, + \ 'bufnr': a:buffer, + \}) + endif + endif +endfunction + +function! ale#virtualtext#GetGroup(item) abort + let l:type = get(a:item, 'type', 'E') + let l:sub_type = get(a:item, 'sub_type', '') + + if l:type is# 'E' + if l:sub_type is# 'style' + return 'ALEVirtualTextStyleError' + endif + + return 'ALEVirtualTextError' + endif + + if l:type is# 'W' + if l:sub_type is# 'style' + return 'ALEVirtualTextStyleWarning' endif + + return 'ALEVirtualTextWarning' endif + + return 'ALEVirtualTextInfo' endfunction -function! ale#virtualtext#ShowMessage(message, hl_group) abort - if !s:has_virt_text +function! ale#virtualtext#ShowMessage(buffer, item) abort + if !s:has_virt_text || !bufexists(str2nr(a:buffer)) return endif - let l:line = line('.') - let l:buffer = bufnr('') - let l:prefix = get(g:, 'ale_virtualtext_prefix', '> ') - let l:msg = l:prefix.trim(substitute(a:message, '\n', ' ', 'g')) + let l:line = max([1, a:item.lnum]) + let l:hl_group = ale#virtualtext#GetGroup(a:item) + + " Get a language-appropriate comment character, or default to '#'. + let l:comment = ale#virtualtext#GetComment(a:buffer) + let l:prefix = ale#Var(a:buffer, 'virtualtext_prefix') + let l:prefix = ale#GetLocItemMessage(a:item, l:prefix) + let l:prefix = substitute(l:prefix, '\V%comment%', '\=l:comment', 'g') + let l:msg = l:prefix . substitute(a:item.text, '\n', ' ', 'g') + + " Store the last message we're going to set so we can read it in tests. + let s:last_message = l:msg if has('nvim') - call nvim_buf_set_virtual_text(l:buffer, s:ns_id, l:line-1, [[l:msg, a:hl_group]], {}) - else + call nvim_buf_set_virtual_text( + \ a:buffer, + \ s:ns_id, l:line - 1, + \ [[l:msg, l:hl_group]], + \ {} + \) + elseif s:emulate_virt let l:left_pad = col('$') - call prop_add(l:line, l:left_pad, { - \ 'type': 'ale', - \}) - let s:last_popup = popup_create(l:msg, { - \ 'line': -1, - \ 'padding': [0, 0, 0, 1], - \ 'mask': [[1, 1, 1, 1]], - \ 'textprop': 'ale', - \ 'highlight': a:hl_group, - \ 'fixed': 1, - \ 'wrap': 0, - \ 'zindex': 2 + call prop_add(l:line, l:left_pad, {'type': 'ale'}) + let s:last_virt = popup_create(l:msg, { + \ 'line': -1, + \ 'padding': [0, 0, 0, 1], + \ 'mask': [[1, 1, 1, 1]], + \ 'textprop': 'ale', + \ 'highlight': l:hl_group, + \ 'fixed': 1, + \ 'wrap': 0, + \ 'zindex': 2 \}) - endif -endfunction + else + let l:type = prop_type_get(l:hl_group) -function! s:StopCursorTimer() abort - if s:cursor_timer != -1 - call timer_stop(s:cursor_timer) - let s:cursor_timer = -1 + if l:type == {} + call prop_type_add(l:hl_group, {'highlight': l:hl_group}) + endif + + " Add highlight groups to the list so we can clear them later. + if index(s:hl_list, l:hl_group) == -1 + call add(s:hl_list, l:hl_group) + endif + + " We ignore all errors from prop_add. + silent! call prop_add(l:line, 0, { + \ 'type': l:hl_group, + \ 'text': ' ' . l:msg, + \ 'bufnr': a:buffer, + \}) endif endfunction function! ale#virtualtext#ShowCursorWarning(...) abort - if !g:ale_virtualtext_cursor + if g:ale_virtualtext_cursor isnot# 'current' + \&& g:ale_virtualtext_cursor != 1 return endif @@ -108,37 +194,19 @@ function! ale#virtualtext#ShowCursorWarning(...) abort return endif - let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer) - - call ale#virtualtext#Clear() - - if !empty(l:loc) - let l:msg = l:loc.text - let l:hl_group = 'ALEVirtualTextInfo' - let l:type = get(l:loc, 'type', 'E') + let [l:info, l:item] = ale#util#FindItemAtCursor(l:buffer) + call ale#virtualtext#Clear(l:buffer) - if l:type is# 'E' - if get(l:loc, 'sub_type', '') is# 'style' - let l:hl_group = 'ALEVirtualTextStyleError' - else - let l:hl_group = 'ALEVirtualTextError' - endif - elseif l:type is# 'W' - if get(l:loc, 'sub_type', '') is# 'style' - let l:hl_group = 'ALEVirtualTextStyleWarning' - else - let l:hl_group = 'ALEVirtualTextWarning' - endif - endif - - call ale#virtualtext#ShowMessage(l:msg, l:hl_group) + if !empty(l:item) + call ale#virtualtext#ShowMessage(l:buffer, l:item) endif endfunction function! ale#virtualtext#ShowCursorWarningWithDelay() abort let l:buffer = bufnr('') - if !g:ale_virtualtext_cursor + if g:ale_virtualtext_cursor isnot# 'current' + \&& g:ale_virtualtext_cursor != 1 return endif @@ -165,3 +233,16 @@ function! ale#virtualtext#ShowCursorWarningWithDelay() abort endif endfunction +function! ale#virtualtext#SetTexts(buffer, loclist) abort + if !has('nvim') && s:emulate_virt + return + endif + + call ale#virtualtext#Clear(a:buffer) + + for l:item in a:loclist + if l:item.bufnr == a:buffer + call ale#virtualtext#ShowMessage(a:buffer, l:item) + endif + endfor +endfunction diff --git a/vim-config/plugins/ale/doc/ale-ada.txt b/vim-config/plugins/ale/doc/ale-ada.txt index 0fc55a9c..80321dbb 100644 --- a/vim-config/plugins/ale/doc/ale-ada.txt +++ b/vim-config/plugins/ale/doc/ale-ada.txt @@ -2,6 +2,11 @@ ALE Ada Integration *ale-ada-options* +=============================================================================== +cspell *ale-ada-cspell* + +See |ale-cspell-options| + =============================================================================== gcc *ale-ada-gcc* diff --git a/vim-config/plugins/ale/doc/ale-ansible.txt b/vim-config/plugins/ale/doc/ale-ansible.txt index 3a4efaa5..41442b08 100644 --- a/vim-config/plugins/ale/doc/ale-ansible.txt +++ b/vim-config/plugins/ale/doc/ale-ansible.txt @@ -1,6 +1,28 @@ =============================================================================== ALE Ansible Integration *ale-ansible-options* +=============================================================================== +ansible-language-server *ale-ansible-language-server* + + +g:ale_ansible_language_server_executable *g:ale_ansible_language_server* + *b:ale_ansible_language_server* + + Type: |String| + Default: 'ansible-language-server' + + Variable can be used to modify the executable used for ansible language server. + + +g:ale_ansible_language_server_config *g:ale_ansible_language_server_config* + *b:ale_ansible_language_server_config* + + Type: |Dictionary| + Default: '{}' + + Configuration parameters sent to the language server on start. Refer to the + ansible language server configuration documentation for list of available + options: https://als.readthedocs.io/en/latest/settings/ =============================================================================== ansible-lint *ale-ansible-ansible-lint* @@ -12,5 +34,6 @@ g:ale_ansible_ansible_lint_executable *g:ale_ansible_ansible_lint_executable* This variable can be changed to modify the executable used for ansible-lint. + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-asciidoc.txt b/vim-config/plugins/ale/doc/ale-asciidoc.txt index 86629fd4..dd8b12ff 100644 --- a/vim-config/plugins/ale/doc/ale-asciidoc.txt +++ b/vim-config/plugins/ale/doc/ale-asciidoc.txt @@ -2,6 +2,12 @@ ALE AsciiDoc Integration *ale-asciidoc-options* +=============================================================================== +cspell *ale-asciidoc-cspell* + +See |ale-cspell-options| + + =============================================================================== write-good *ale-asciidoc-write-good* diff --git a/vim-config/plugins/ale/doc/ale-avra.txt b/vim-config/plugins/ale/doc/ale-avra.txt new file mode 100644 index 00000000..a61913ad --- /dev/null +++ b/vim-config/plugins/ale/doc/ale-avra.txt @@ -0,0 +1,26 @@ +=============================================================================== +ALE AVRA Integration *ale-avra-options* + + +=============================================================================== +avra *ale-avra-avra* + +g:ale_avra_avra_executable *g:ale_avra_avra_executable* + *b:ale_avra_avra_executable* + + Type: |String| + Default `'avra'` + + This variable can be changed to use different executable for AVRA. + + +g:ale_avra_avra_options *g:ale_avra_avra_options* + *b:ale_avra_avra_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to AVRA. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-bicep.txt b/vim-config/plugins/ale/doc/ale-bicep.txt new file mode 100644 index 00000000..d26d67bc --- /dev/null +++ b/vim-config/plugins/ale/doc/ale-bicep.txt @@ -0,0 +1,24 @@ +=============================================================================== +ALE Bicep Integration *ale-bicep-options* + + +=============================================================================== +bicep *ale-bicep-bicep* + +g:ale_bicep_bicep_executable *g:ale_bicep_bicep_executable* + *b:ale_bicep_bicep_executable* + Type: |String| + Default: `'bicep'` + + This variable can be set to change the path to bicep. + + +g:ale_bicep_bicep_options *g:ale_bicep_bicep_options* + *b:ale_bicep_bicep_options* + Type: |String| + Default: `'build --outfile /dev/null'` + + This variable can be set to pass additional options to bicep. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-bitbake.txt b/vim-config/plugins/ale/doc/ale-bitbake.txt new file mode 100644 index 00000000..4c480fd4 --- /dev/null +++ b/vim-config/plugins/ale/doc/ale-bitbake.txt @@ -0,0 +1,31 @@ +=============================================================================== +ALE BitBake Integration *ale-bitbake-options* + + +=============================================================================== +oelint-adv *ale-bitbake-oelint_adv* + +g:ale_bitbake_oelint_adv_executable *g:ale_bitbake_oelint_adv_executable* + + Type: |String| + Default: `'oelint-adv'` + + This variable can be changed to use a different executable for oelint-adv. + +g:ale_bitbake_oelint_adv_options *g:ale_bitbake_oelint_adv_options* + + Type: |String| + Default: `''` + + This variable can be set to pass additional options to oelint-adv. + + g:ale_bitbake_oelint_adv_config *g:ale_bitbake_oelint_adv_config* + + Type: |String| + Default: `'.oelint.cfg'` + + This variable can be set to use a different config file. + + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-c.txt b/vim-config/plugins/ale/doc/ale-c.txt index 3b9fbc44..29933861 100644 --- a/vim-config/plugins/ale/doc/ale-c.txt +++ b/vim-config/plugins/ale/doc/ale-c.txt @@ -133,7 +133,42 @@ g:ale_c_cc_options *g:ale_c_cc_options* Type: |String| Default: `'-std=c11 -Wall'` - This variable can be change to modify flags given to the C compiler. + This variable can be changed to modify flags given to the C compiler. + + +g:ale_c_cc_use_header_lang_flag *g:ale_c_cc_use_header_lang_flag* + *b:ale_c_cc_use_header_lang_flag* + Type: |Number| + Default: `-1` + + By default, ALE will use `'-x c-header'` instead of `'-x c'` for header files + when using Clang. + + This variable can be changed to manually activate or deactivate this flag + for header files. + + - When set to `-1`, the default beviour is used, `'-x c-header'` is used with + Clang and `'-x c'` is used with other compilers. + - When set to `0`, the flag is deactivated, `'-x c'` is always used + independently of the compiler. + - When set to `1`, the flag is activated, `'-x c-header'` is always used + independently of the compiler. + + Gcc does not support `'-x c-header'` when using `'-'` as input filename, + which is what ALE does. This why, by default, ALE only uses `'-x c-header'` + with Clang. + + +g:ale_c_cc_header_exts *g:ale_c_cc_header_exts* + *b:ale_c_cc_header_exts* + Type: |List| + Default: `['h']` + + This variable can be changed to modify the list of extensions of the files + considered as header files. + + This variable is only used when `'-x c-header'` is used instead of `'-x c'`, + see |ale_c_cc_use_header_lang_flag|. =============================================================================== @@ -352,6 +387,12 @@ g:ale_cpp_cquery_cache_directory *g:ale_c_cquery_cache_directory* cache. +=============================================================================== +cspell *ale-c-cspell* + +See |ale-cspell-options| + + =============================================================================== flawfinder *ale-c-flawfinder* diff --git a/vim-config/plugins/ale/doc/ale-cairo.txt b/vim-config/plugins/ale/doc/ale-cairo.txt new file mode 100644 index 00000000..0a78e68a --- /dev/null +++ b/vim-config/plugins/ale/doc/ale-cairo.txt @@ -0,0 +1,15 @@ +=============================================================================== +ALE Cairo Integration *ale-cairo-options* + + +=============================================================================== +starknet *ale-cairo-starknet* + +g:ale_cairo_starknet_executable *g:ale_cairo_starknet_executable* + *b:ale_cairo_starknet_executable* + + Default: `'starknet-compile'` + + Overrides the starknet-compile binary after installing the cairo-language. + + For more information read 'https://starknet.io/docs/quickstart.html' diff --git a/vim-config/plugins/ale/doc/ale-cmake.txt b/vim-config/plugins/ale/doc/ale-cmake.txt index 602637b1..e44c328e 100644 --- a/vim-config/plugins/ale/doc/ale-cmake.txt +++ b/vim-config/plugins/ale/doc/ale-cmake.txt @@ -21,6 +21,25 @@ g:ale_cmake_cmakelint_options *g:ale_cmake_cmakelint_options* This variable can be set to pass additional options to cmakelint. +=============================================================================== +cmake-lint *ale-cmake-cmake-lint* + +g:ale_cmake_cmake_lint_executable *g:ale_cmake_cmake_lint_executable* + *b:ale_cmake_cmake_lint_executable* + Type: |String| + Default: `'cmake-lint'` + + This variable can be set to change the path the cmake-lint. + + +g:ale_cmake_cmake_lint_options *g:ale_cmake_cmake_lint_options* + *b:ale_cmake_cmake_lint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to cmake-lint. + + =============================================================================== cmake-format *ale-cmake-cmakeformat* diff --git a/vim-config/plugins/ale/doc/ale-cpp.txt b/vim-config/plugins/ale/doc/ale-cpp.txt index 17894e6e..1ed6d371 100644 --- a/vim-config/plugins/ale/doc/ale-cpp.txt +++ b/vim-config/plugins/ale/doc/ale-cpp.txt @@ -62,7 +62,42 @@ g:ale_cpp_cc_options *g:ale_cpp_cc_options* Type: |String| Default: `'-std=c++14 -Wall'` - This variable can be change to modify flags given to the C++ compiler. + This variable can be changed to modify flags given to the C++ compiler. + + +g:ale_cpp_cc_use_header_lang_flag *g:ale_cpp_cc_use_header_lang_flag* + *b:ale_cpp_cc_use_header_lang_flag* + Type: |Number| + Default: `-1` + + By default, ALE will use `'-x c++-header'` instead of `'-x c++'` for header + files when using Clang. + + This variable can be changed to manually activate or deactivate this flag + for header files. + + - When set to `-1`, the default beviour is used, `'-x c++-header'` is used with + Clang and `'-x c++'` is used with other compilers. + - When set to `0`, the flag is deactivated, `'-x c++'` is always used + independently of the compiler. + - When set to `1`, the flag is activated, `'-x c++-header'` is always used + independently of the compiler. + + Gcc does not support `'-x c++-header'` when using `'-'` as input filename, + which is what ALE does. This why, by default, ALE only uses `'-x c++-header'` + with Clang. + + +g:ale_cpp_cc_header_exts *g:ale_cpp_cc_header_exts* + *b:ale_cpp_cc_header_exts* + Type: |List| + Default: `['h', 'hpp']` + + This variable can be changed to modify the list of extensions of the files + considered as header files. + + This variable is only used when `'-x c++-header'` is used instead of `'-x c++'`, + see |ale_cpp_cc_use_header_lang_flag|. =============================================================================== @@ -287,6 +322,21 @@ g:ale_cpp_cpplint_options *g:ale_cpp_cpplint_options* This variable can be changed to modify flags given to cpplint. +g:ale_c_cpplint_executable *g:ale_c_cpplint_executable* + *b:ale_c_cpplint_executable* + Type: |String| + Default: `'cpplint'` + + This variable can be changed to use a different executable for cpplint. + + +g:ale_c_cpplint_options *g:ale_c_cpplint_options* + *b:ale_c_cpplint_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to cpplint. + =============================================================================== cquery *ale-cpp-cquery* @@ -308,6 +358,12 @@ g:ale_cpp_cquery_cache_directory *g:ale_cpp_cquery_cache_directory* cache. +=============================================================================== +cspell *ale-cpp-cspell* + +See |ale-cspell-options| + + =============================================================================== flawfinder *ale-cpp-flawfinder* diff --git a/vim-config/plugins/ale/doc/ale-cs.txt b/vim-config/plugins/ale/doc/ale-cs.txt index bef495b9..d9a9dc00 100644 --- a/vim-config/plugins/ale/doc/ale-cs.txt +++ b/vim-config/plugins/ale/doc/ale-cs.txt @@ -6,6 +6,13 @@ In addition to the linters that are provided with ALE, C# code can be checked with the OmniSharp plugin. See here: https://github.com/OmniSharp/omnisharp-vim +=============================================================================== +clang-format *ale-cs-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for C#. + + =============================================================================== csc *ale-cs-csc* @@ -90,6 +97,12 @@ g:ale_cs_csc_assemblies *g:ale_cs_csc_assemblies* \] < +=============================================================================== +cspell *ale-cs-cspell* + +See |ale-cspell-options| + + =============================================================================== dotnet-format *ale-cs-dotnet-format* diff --git a/vim-config/plugins/ale/doc/ale-css.txt b/vim-config/plugins/ale/doc/ale-css.txt index ff74b263..74ca16dd 100644 --- a/vim-config/plugins/ale/doc/ale-css.txt +++ b/vim-config/plugins/ale/doc/ale-css.txt @@ -2,6 +2,39 @@ ALE CSS Integration *ale-css-options* +=============================================================================== +cspell *ale-css-cspell* + +See |ale-cspell-options| + + +=============================================================================== +css-beautify *ale-css-css-beautify* + +g:ale_css_css_beautify_executable *g:ale_css_css_beautify_executable* + *b:ale_css_css_beautify_executable* + Type: |String| + Default: `'css-beautify'` + + See |ale-integrations-local-executables| + + +g:ale_css_css_beautify_options *g:ale_css_css_beautify_options* + *b:ale_css_css_beautify_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to css-beautify. + + +g:ale_css_css_beautify_use_global *g:ale_css_css_beautify_use_global* + *b:ale_css_css_beautify_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + =============================================================================== fecs *ale-css-fecs* @@ -43,5 +76,18 @@ g:ale_css_stylelint_use_global *g:ale_css_stylelint_use_global* See |ale-integrations-local-executables| +=============================================================================== +vscodecss *ale-css-vscode* + +Website: https://github.com/hrsh7th/vscode-langservers-extracted + +Installation +------------------------------------------------------------------------------- + +Install VSCode css language server either globally or locally: > + + npm install -g vscode-langservers-extracted +< + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-cuda.txt b/vim-config/plugins/ale/doc/ale-cuda.txt index 06aa48ce..729d86b5 100644 --- a/vim-config/plugins/ale/doc/ale-cuda.txt +++ b/vim-config/plugins/ale/doc/ale-cuda.txt @@ -3,23 +3,11 @@ ALE CUDA Integration *ale-cuda-options* =============================================================================== -nvcc *ale-cuda-nvcc* - -g:ale_cuda_nvcc_executable *g:ale_cuda_nvcc_executable* - *b:ale_cuda_nvcc_executable* - Type: |String| - Default: `'nvcc'` - - This variable can be changed to use a different executable for nvcc. - Currently only nvcc 8.0 is supported. - +clang-format *ale-cuda-clangformat* -g:ale_cuda_nvcc_options *g:ale_cuda_nvcc_options* - *b:ale_cuda_nvcc_options* - Type: |String| - Default: `'-std=c++11'` +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for CUDA. - This variable can be changed to modify flags given to nvcc. =============================================================================== clangd *ale-cuda-clangd* @@ -39,11 +27,25 @@ g:ale_cuda_clangd_options *g:ale_cuda_clangd_options* This variable can be changed to modify flags given to clangd. + =============================================================================== -clang-format *ale-cuda-clangformat* +nvcc *ale-cuda-nvcc* -See |ale-c-clangformat| for information about the available options. -Note that the C options are also used for cuda. +g:ale_cuda_nvcc_executable *g:ale_cuda_nvcc_executable* + *b:ale_cuda_nvcc_executable* + Type: |String| + Default: `'nvcc'` + + This variable can be changed to use a different executable for nvcc. + Currently only nvcc 8.0 is supported. + + +g:ale_cuda_nvcc_options *g:ale_cuda_nvcc_options* + *b:ale_cuda_nvcc_options* + Type: |String| + Default: `'-std=c++11'` + + This variable can be changed to modify flags given to nvcc. =============================================================================== diff --git a/vim-config/plugins/ale/doc/ale-dart.txt b/vim-config/plugins/ale/doc/ale-dart.txt index a046808b..4824e82e 100644 --- a/vim-config/plugins/ale/doc/ale-dart.txt +++ b/vim-config/plugins/ale/doc/ale-dart.txt @@ -87,39 +87,6 @@ g:ale_dart_format_options *g:ale_dart_format_options* This variable can be set to pass additional options to the dart format fixer. - -=============================================================================== -dartanalyzer *ale-dart-dartanalyzer* - -Installation -------------------------------------------------------------------------------- - -Install Dart via whatever means. `dartanalyzer` will be included in the SDK. - -You can add the SDK to `$PATH`, as described here: -https://www.dartlang.org/tools/sdk - -If you have installed Dart on Linux, you can also try the following: > - " Set the executable path for dartanalyzer to the absolute path to it. - let g:ale_dart_dartanalyzer_executable = '/usr/lib/dart/bin/dartanalyzer' -< -... or similarly for wherever your Dart SDK lives. This should work without -having to modify `$PATH`. - -ALE can only check for problems with `dartanalyzer` with the file on disk. -See |ale-lint-file-linters| - -Options -------------------------------------------------------------------------------- - -g:ale_dart_dartanalyzer_executable *g:ale_dart_dartanalyzer_executable* - *b:ale_dart_dartanalyzer_executable* - Type: |String| - Default: `'dartanalyzer'` - - This variable can be set to change the path to dartanalyzer. - - =============================================================================== dartfmt *ale-dart-dartfmt* diff --git a/vim-config/plugins/ale/doc/ale-development.txt b/vim-config/plugins/ale/doc/ale-development.txt index 3d0dd524..6bc009fd 100644 --- a/vim-config/plugins/ale/doc/ale-development.txt +++ b/vim-config/plugins/ale/doc/ale-development.txt @@ -14,6 +14,8 @@ CONTENTS *ale-development-contents* 4.1. Writing Linter Tests.............|ale-development-linter-tests| 4.2. Writing Fixer Tests..............|ale-development-fixer-tests| 4.3. Running Tests in a Windows VM....|ale-development-windows-tests| + 5. Contributing.........................|ale-development-contributing| + 5.1. Preparing a Release..............|ale-development-release| =============================================================================== 1. Introduction *ale-development-introduction* @@ -97,8 +99,8 @@ should also follow some additional rules designed to prevent mistakes. Some of these are reported with ALE's `custom-linting-rules` script. See |ale-development-tests|. -* Don't leave stray `:echo` lines in code. Use `execute 'echo' ...` if you must - echo something. +* Don't leave stray `:echo` lines in code. Write `" no-custom-checks` above + the line if you must echo something. * For strings use |is#| instead of |==#|, `is?` instead of `==?`, `isnot#` instead of `!=#`, and `isnot?` instead of `!=?`. This is because `'x' ==# 0` returns 1, while `'x' is# 0` returns 0, so you will experience fewer issues @@ -153,10 +155,9 @@ ALE runs tests with the following versions of Vim in the following environments. 1. Vim 8.0.0027 on Linux via GitHub Actions. -2. Vim 8.2.2401 on Linux via GitHub Actions. +2. Vim 9.0.0297 on Linux via GitHub Actions. 3. NeoVim 0.2.0 on Linux via GitHub Actions. -4. NeoVim 0.4.4 on Linux via GitHub Actions. -5. NeoVim 0.5.0 on Linux via GitHub Actions. +4. NeoVim 0.8.0 on Linux via GitHub Actions. 6. Vim 8 (stable builds) on Windows via AppVeyor. If you are developing ALE code on Linux, Mac OSX, or BSD, you can run ALEs @@ -325,7 +326,6 @@ given the above setup are as follows. `AssertLSPProject project_root` - Check the root given to an LSP server. `AssertLSPAddress address` - Check the address to an LSP server. - =============================================================================== 4.2 Writing Fixer Tests *ale-development-fixer-tests* @@ -367,7 +367,6 @@ given the above setup are as follows. `AssertFixer results` - Check the fixer results `AssertFixerNotExecuted` - Check that fixers will not be executed. - =============================================================================== 4.3 Running Tests in a Windows VM *ale-development-windows-tests* @@ -444,5 +443,94 @@ You can run a specific test by passing the filename as an argument to the batch file, for example: `run-tests test/test_c_flag_parsing.vader` . This will give you results much more quickly. +=============================================================================== +5. Contributing *ale-development-contributing* + +All integration of new code into ALE is done through GitHub pull requests. +Using that tool streamlines the process and minimizes the time and effort +required to e.g. ensure test suites are run for every change. + +As for any project hosted by GitHub, the choice of platform demands every +contributor to take care to setup an account and configure it accordingly. + +Due to details of our process, a difference to many other GitHub hosted +projects is that contributors who wish to keep the author fields for their +commits unaltered need to configure a public email address in their account +and profile settings. See: https://docs.github.com/en/account-and-profile/ + +Unless configuring GitHub to expose contact details, commits will be rewritten +to appear by `USERNAME ` . + +=============================================================================== +5.1 Preparing a Release *ale-development-release* + +ALE offers release packages through GitHub, for two reasons: + +1. Some users like to target specific release versions rather than simply + installing the plugin from `master`. This includes users who create Linux + distribution specific packages from GitHub releases. +2. The releases provide a nice way to get an overview of what has changed in + ALE over time. + +ALE has no fixed release schedule. Release versions are created whenever the +ALE developers feel the need to create one. ALE release versions follow the +typical Semantic Versioning scheme. See: https://semver.org/ + +Minor version releases for ALE should be the most common, followed by patch +releases. Every minor version release should be followed by a `vA.B.x` branch +such as `v2.0.x` for version `2.0.0` and every following patch version before +`2.1.0`. The `git` branch strategy for patches is to first merge a bug fix to +`master`, and then `git cherry-pick` a patch to a branch for a specific +version. ALE developers do not generally support anything but `master` or the +last minor version. + +Generally ALE releases hit a major version only when there are breaking +changes to a public ALE setting or function. A "public" setting or function is +defined as any setting or function documented in the `:help` |ale| text file. +Major ALE versions ought to be so rare that they only come once a year at +most. ALE should not typically introduce any breaking changes. + +If there are ever to be any breaking changes made for ALE, there should first +come a minor version release for ALE documenting all of the coming breaking +changes to ALE. It should be described how users can prepare for a breaking +change that is coming before it is done. + +To create a release for ALE, you will need sufficient permissions in GitHub. +Once you do, follow these steps. + +1. Create a new release draft, or edit an existing one. It helps to craft + drafts ahead of time and write the last commit ID checked for release notes + on the last update to a draft. + See the releases page: https://github.com/dense-analysis/ale/releases +2. Examine `git log` and read changes made between the last ID checked, or the + git tag of the previous release, and the current commit in `master`. +3. Write updates in separate sections (except where empty) for: + 3.a. Breaking Changes + 3.b. Deprecated Features + 3.c. New Features + 3.d. New Linters + 3.e. New Fixers + 3.f. Linter Enhancements + 3.g. Fixer Enhancements + 3.h. Bugs Fixed +4. Once you've finished writing the draft for the release, bump + `s:current_ale_version` in `autoload/ale.vim` to the current version, and + add a line to `test/test_ale_has.vader` to test for the version. See + |ale#Has()| documentation for more information. +5. Commit the changes after `./run-tests --fast -q` passes. +6. Tag the release with `git tag vA.B.C`, replacing `A`, `B`, and `C` with the + version numbers. See `git tag --list` for examples. +7. Run `git push` and `git push --tags` to push the commit and the tag. +8. Edit the release draft in GitHub, select the tag you just pushed, and + publish the draft. +9. If you're creating a new major or minor version: `git checkout -b vA.B.x`, + replacing `A` and `B` with the major and minor versions. `git push` the new + branch, and the GitHub branch protection settings should automatically + apply to the new release branch. +10. You have already completed the last step. + +Have fun creating ALE releases. Drink responsibly, or not at all, which is the +preference of w0rp. + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-dockerfile.txt b/vim-config/plugins/ale/doc/ale-dockerfile.txt index 284c6a10..51b9acc1 100644 --- a/vim-config/plugins/ale/doc/ale-dockerfile.txt +++ b/vim-config/plugins/ale/doc/ale-dockerfile.txt @@ -25,12 +25,28 @@ g:ale_dockerfile_dockerfile_lint_options the dockerfile lint invocation - like custom rule file definitions. +=============================================================================== +dprint *ale-dockerfile-dprint* + +See |ale-dprint-options| and https://dprint.dev/plugins/dockerfile + + =============================================================================== hadolint *ale-dockerfile-hadolint* hadolint can be found at: https://github.com/hadolint/hadolint +g:ale_dockerfile_hadolint_options *g:ale_dockerfile_hadolint_options* + *b:ale_dockerfile_hadolint_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the hadolint + invocation. These arguments will be used whether docker is being used or not + (see below). + + g:ale_dockerfile_hadolint_use_docker *g:ale_dockerfile_hadolint_use_docker* *b:ale_dockerfile_hadolint_use_docker* Type: |String| diff --git a/vim-config/plugins/ale/doc/ale-elixir.txt b/vim-config/plugins/ale/doc/ale-elixir.txt index a4e5c2c6..693db5aa 100644 --- a/vim-config/plugins/ale/doc/ale-elixir.txt +++ b/vim-config/plugins/ale/doc/ale-elixir.txt @@ -5,7 +5,6 @@ ALE Elixir Integration *ale-elixir-options* =============================================================================== mix *ale-elixir-mix* - The `mix` linter is disabled by default, as it can be too expensive to run. See `:help g:ale_linters` @@ -18,6 +17,7 @@ g:ale_elixir_mix_options *g:ale_elixir_mix_options* This variable can be changed to specify the mix executable. + =============================================================================== mix_format *ale-elixir-mix-format* @@ -30,6 +30,7 @@ g:ale_elixir_mix_format_options *g:ale_elixir_mix_format_options* This variable can be changed to specify the mix options passed to the mix_format fixer + =============================================================================== dialyxir *ale-elixir-dialyxir* @@ -45,6 +46,7 @@ configured on your project's `mix.exs`. See https://github.com/jeremyjh/dialyxir#with-explaining-stuff for more information. + =============================================================================== elixir-ls *ale-elixir-elixir-ls* @@ -72,6 +74,8 @@ g:ale_elixir_elixir_ls_config *g:ale_elixir_elixir_ls_config* \ } < Consult the ElixirLS documentation for more information about settings. + + =============================================================================== credo *ale-elixir-credo* @@ -79,18 +83,26 @@ Credo (https://github.com/rrrene/credo) g:ale_elixir_credo_strict *g:ale_elixir_credo_strict* - Type: Integer - Default: 0 + Type: |Integer| + Default: `0` Tells credo to run in strict mode or suggest mode. Set variable to 1 to enable --strict mode. -g:ale_elixir_credo_config_file g:ale_elixir_credo_config_file - Type: String - Default: '' +g:ale_elixir_credo_config_file *g:ale_elixir_credo_config_file* + + Type: |String| + Default: `''` Tells credo to use a custom configuration file. + +=============================================================================== +cspell *ale-elixir-cspell* + +See |ale-cspell-options| + + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-erlang.txt b/vim-config/plugins/ale/doc/ale-erlang.txt index ede179d1..2c6ff22a 100644 --- a/vim-config/plugins/ale/doc/ale-erlang.txt +++ b/vim-config/plugins/ale/doc/ale-erlang.txt @@ -51,6 +51,31 @@ g:ale_erlang_elvis_executable *g:ale_erlang_elvis_executable* This variable can be changed to specify the elvis executable. +------------------------------------------------------------------------------- +erlang_ls *ale-erlang-erlang_ls* + +g:ale_erlang_erlang_ls_executable *g:ale_erlang_erlang_ls_executable* + *b:ale_erlang_erlang_ls_executable* + Type: |String| + Default: `'erlang_ls'` + + This variable can be changed to specify the erlang_ls executable. + +g:ale_erlang_erlang_ls_log_dir *g:ale_erlang_erlang_ls_log_dir* + *b:ale_erlang_erlang_ls_log_dir* + Type: |String| + Default: `''` + + If set this variable overrides default directory where logs will be written. + +g:ale_erlang_erlang_ls_log_level *g:ale_erlang_erlang_ls_log_level* + *b:ale_erlang_erlang_ls_log_level* + Type: |String| + Default: `'info'` + + This variable can be changed to specify log level. + + ------------------------------------------------------------------------------- erlc *ale-erlang-erlc* diff --git a/vim-config/plugins/ale/doc/ale-eruby.txt b/vim-config/plugins/ale/doc/ale-eruby.txt index 48a34895..4cf08d07 100644 --- a/vim-config/plugins/ale/doc/ale-eruby.txt +++ b/vim-config/plugins/ale/doc/ale-eruby.txt @@ -39,7 +39,7 @@ ruumba *ale-eruby-ruumba* g:ale_eruby_ruumba_executable *g:ale_eruby_ruumba_executable* *b:ale_eruby_ruumba_executable* - Type: String + Type: |String| Default: `'ruumba` Override the invoked ruumba binary. This is useful for running ruumba diff --git a/vim-config/plugins/ale/doc/ale-go.txt b/vim-config/plugins/ale/doc/ale-go.txt index 2f1e4c1c..367618ea 100644 --- a/vim-config/plugins/ale/doc/ale-go.txt +++ b/vim-config/plugins/ale/doc/ale-go.txt @@ -39,7 +39,6 @@ g:ale_go_go111module *g:ale_go_go111module* golang tools. - =============================================================================== bingo *ale-go-bingo* @@ -57,6 +56,11 @@ g:ale_go_bingo_options *g:ale_go_bingo_options* Default: `''` +=============================================================================== +cspell *ale-go-cspell* + +See |ale-cspell-options| + =============================================================================== gobuild *ale-go-gobuild* @@ -80,6 +84,24 @@ g:ale_go_gofmt_options *g:ale_go_gofmt_options* This variable can be set to pass additional options to the gofmt fixer. +=============================================================================== +gofumpt *ale-go-gofumpt* + +g:ale_go_gofumpt_executable *g:ale_go_gofumpt_executable* + *b:ale_go_gofumpt_executable* + Type: |String| + Default: `'gofumpt'` + + Executable to run to use as the gofumpt fixer. + +g:ale_go_gofumpt_options *g:ale_go_gofumpt_options* + *b:ale_go_gofumpt_options* + Type: |String| + Default: `''` + + Options to pass to the gofumpt fixer. + + =============================================================================== golangci-lint *ale-go-golangci-lint* @@ -133,6 +155,7 @@ g:ale_go_langserver_options *g:ale_go_langserver_options* `-gocodecompletion` option is ignored because it is handled automatically by the |g:ale_completion_enabled| variable. + =============================================================================== golines *ale-go-golines* @@ -146,11 +169,12 @@ g:ale_go_golines_executable *g:ale_go_lines_executable* g:ale_go_golines_options *g:ale_go_golines_options* *b:ale_go_golines_options* Type: |String| - Default: '' + Default: `''` - Additional options passed to the golines command. By default golines has + Additional options passed to the golines command. By default golines has --max-length=100 (lines above 100 characters will be wrapped) + =============================================================================== golint *ale-go-golint* @@ -330,7 +354,7 @@ g:ale_go_staticcheck_options *g:ale_go_staticcheck_options* g:ale_go_staticcheck_lint_package *g:ale_go_staticcheck_lint_package* *b:ale_go_staticcheck_lint_package* Type: |Number| - Default: `0` + Default: `1` When set to `1`, the whole Go package will be checked instead of only the current file. diff --git a/vim-config/plugins/ale/doc/ale-haskell.txt b/vim-config/plugins/ale/doc/ale-haskell.txt index 09894340..bd5a5edf 100644 --- a/vim-config/plugins/ale/doc/ale-haskell.txt +++ b/vim-config/plugins/ale/doc/ale-haskell.txt @@ -13,6 +13,12 @@ g:ale_haskell_brittany_executable *g:ale_haskell_brittany_executable* This variable can be changed to use a different executable for brittany. +=============================================================================== +cspell *ale-haskell-cspell* + +See |ale-cspell-options| + + =============================================================================== floskell *ale-haskell-floskell* @@ -117,8 +123,8 @@ g:ale_haskell_hlint_executable *g:ale_haskell_hlint_executable* g:ale_haskell_hlint_options g:ale_haskell_hlint_options b:ale_haskell_hlint_options - Type: String - Default: '' + Type: |String| + Default: `''` This variable can be used to pass extra options to the underlying hlint executable. @@ -128,7 +134,7 @@ g:ale_haskell_hlint_options g:ale_haskell_hlint_options hls *ale-haskell-hls* g:ale_haskell_hls_executable *g:ale_haskell_hls_executable* - *b:ale_haskell_his_executable* + *b:ale_haskell_hls_executable* Type: |String| Default: `'haskell-language-server-wrapper'` @@ -136,6 +142,20 @@ g:ale_haskell_hls_executable *g:ale_haskell_hls_executable* language server. +g:ale_haskell_hls_config *g:ale_haskell_hls_config* + *b:ale_haskell_hls_config* + Type: |Dictionary| + Default: `{}` + + Dictionary with configuration settings for HLS. For example, to see more + completions: +> + let g:ale_haskell_hls_config = {'haskell': {'maxCompletions': 250}} +< + Refer to HLS documentation for possible settings: + https://haskell-language-server.readthedocs.io/en/latest/configuration.html#language-specific-server-options + + =============================================================================== stack-build *ale-haskell-stack-build* @@ -197,8 +217,8 @@ g:ale_haskell_ormolu_executable *g:ale_haskell_ormolu_executable* g:ale_haskell_ormolu_options *g:ale_haskell_ormolu_options* *b:ale_haskell_ormolu_options* - Type: String - Default: '' + Type: |String| + Default: `''` This variable can be used to pass extra options to the underlying ormolu executable. diff --git a/vim-config/plugins/ale/doc/ale-hcl.txt b/vim-config/plugins/ale/doc/ale-hcl.txt index 59b0a9da..71e1114e 100644 --- a/vim-config/plugins/ale/doc/ale-hcl.txt +++ b/vim-config/plugins/ale/doc/ale-hcl.txt @@ -2,6 +2,11 @@ ALE HCL Integration *ale-hcl-options* +=============================================================================== +packer-fmt *ale-hcl-packer-fmt* + +See |ale-packer-fmt-fixer| for information about the available options. + =============================================================================== terraform-fmt *ale-hcl-terraform-fmt* diff --git a/vim-config/plugins/ale/doc/ale-help.txt b/vim-config/plugins/ale/doc/ale-help.txt new file mode 100644 index 00000000..89872545 --- /dev/null +++ b/vim-config/plugins/ale/doc/ale-help.txt @@ -0,0 +1,12 @@ +=============================================================================== +ALE Help Integration *ale-help-options* + + +=============================================================================== +cspell *ale-help-cspell* + +See |ale-cspell-options| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-html.txt b/vim-config/plugins/ale/doc/ale-html.txt index 2c048148..6d18afd1 100644 --- a/vim-config/plugins/ale/doc/ale-html.txt +++ b/vim-config/plugins/ale/doc/ale-html.txt @@ -28,6 +28,11 @@ g:ale_html_angular_use_global *g:ale_html_angular_use_global* See |ale-integrations-local-executables| +=============================================================================== +cspell *ale-html-cspell* + +See |ale-cspell-options| + =============================================================================== fecs *ale-html-fecs* @@ -40,6 +45,14 @@ See: |ale-javascript-fecs|. =============================================================================== html-beautify *ale-html-beautify* +g:ale_html_beautify_executable *g:ale_html_beautify_executable* + *b:ale_html_beautify_executable* + Type: |String| + Default: `'html-beautify'` + + See |ale-integrations-local-executables| + + g:ale_html_beautify_options *g:ale_html_beautify_options* *b:ale_html_beautify_options* Type: |String| @@ -48,6 +61,14 @@ g:ale_html_beautify_options *g:ale_html_beautify_options* This variable can be changed to modify flags given to html-beautify. +g:ale_html_beautify_use_global *g:ale_html_beautify_use_global* + *b:ale_html_beautify_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + =============================================================================== htmlhint *ale-html-htmlhint* @@ -75,7 +96,6 @@ g:ale_html_htmlhint_use_global *g:ale_html_htmlhint_use_global* See |ale-integrations-local-executables| - =============================================================================== prettier *ale-html-prettier* @@ -159,6 +179,19 @@ g:ale_html_tidy_use_global *g:html_tidy_use_global* See |ale-integrations-local-executables| +=============================================================================== +vscodehtml *ale-html-vscode* + +Website: https://github.com/hrsh7th/vscode-langservers-extracted + +Installation +------------------------------------------------------------------------------- + +Install VSCode html language server either globally or locally: > + + npm install -g vscode-langservers-extracted +< + =============================================================================== write-good *ale-html-write-good* diff --git a/vim-config/plugins/ale/doc/ale-java.txt b/vim-config/plugins/ale/doc/ale-java.txt index 6bd04ef9..69611866 100644 --- a/vim-config/plugins/ale/doc/ale-java.txt +++ b/vim-config/plugins/ale/doc/ale-java.txt @@ -24,7 +24,7 @@ g:ale_java_checkstyle_executable *g:ale_java_checkstyle_executable* *b:ale_java_checkstyle_executable* Type: |String| - Default: 'checkstyle' + Default: `'checkstyle'` This variable can be changed to modify the executable used for checkstyle. @@ -41,6 +41,19 @@ g:ale_java_checkstyle_options *g:ale_java_checkstyle_options* configuration files set with |g:ale_java_checkstyle_config|. +=============================================================================== +clang-format *ale-java-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for Java. + + +=============================================================================== +cspell *ale-java-cspell* + +See |ale-cspell-options| + + =============================================================================== javac *ale-java-javac* @@ -91,7 +104,6 @@ List type: \ ] < - =============================================================================== google-java-format *ale-java-google-java-format* @@ -119,8 +131,8 @@ pmd *ale-java-pmd* g:ale_java_pmd_options *g:ale_java_pmd_options* *b:ale_java_pmd_options* - Type: String - Default: '-R category/java/bestpractices' + Type: |String| + Default: `'-R category/java/bestpractices'` This variable can be changed to modify flags given to PMD. Do not specify -f and -d. They are added automatically. @@ -168,7 +180,7 @@ g:ale_java_javalsp_config *g:ale_java_javalsp_config* Type: |Dictionary| Default: `{}` -The javalsp linter automatically detects external depenencies for Maven and +The javalsp linter automatically detects external dependencies for Maven and Gradle projects. In case the javalsp fails to detect some of them, you can specify them setting a dictionary to |g:ale_java_javalsp_config| variable. > @@ -190,6 +202,7 @@ The Java language server will look for the dependencies you specify in `externalDependencies` array in your Maven and Gradle caches ~/.m2 and ~/.gradle. + =============================================================================== eclipselsp *ale-java-eclipselsp* @@ -218,8 +231,9 @@ g:ale_java_eclipselsp_path *g:ale_java_eclipselsp_path* Default: `'$HOME/eclipse.jdt.ls'` Absolute path to the location of the eclipse.jdt.ls repository folder. Or if - you have VSCode extension installed the absolute path to the VSCode extensions - folder (e.g. $HOME/.vscode/extensions/redhat.java-0.4x.0 in Linux). + you have VSCode extension installed the absolute path to the VSCode + extensions folder (e.g. $HOME/.vscode/extensions/redhat.java-0.4x.0 in + Linux). g:ale_java_eclipselsp_executable *g:ale_java_eclipse_executable* @@ -261,7 +275,8 @@ g:ale_java_eclipselsp_javaagent *g:ale_java_eclipselsp_javaagent* Default: `''` A variable to add java agent for annotation processing such as Lombok. - If you have multiple java agent files, use space to separate them. For example: + If you have multiple java agent files, use space to separate them. + For example: > let g:ale_java_eclipselsp_javaagent='/eclipse/lombok.jar /eclipse/jacoco.jar' < diff --git a/vim-config/plugins/ale/doc/ale-javascript.txt b/vim-config/plugins/ale/doc/ale-javascript.txt index acd886c9..a55cd643 100644 --- a/vim-config/plugins/ale/doc/ale-javascript.txt +++ b/vim-config/plugins/ale/doc/ale-javascript.txt @@ -17,17 +17,39 @@ You should change the structure of your project from this: > /path/foo/.eslintrc.js # root: true /path/foo/bar/.eslintrc.js # root: false < + To this: > /path/foo/.base-eslintrc.js # Base configuration here /path/foo/.eslintrc.js # extends: ["/path/foo/.base-eslintrc.js"] /path/foo/bar/.eslintrc.js # extends: ["/path/foo/.base-eslintrc.js"] < + +=============================================================================== +clang-format *ale-javascript-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for JavaScript. + + +=============================================================================== +cspell *ale-javascript-cspell* + +See |ale-cspell-options| + + =============================================================================== deno *ale-javascript-deno* Check the docs over at |ale-typescript-deno|. + +=============================================================================== +dprint *ale-javascript-dprint* + +See |ale-dprint-options| and https://dprint.dev/plugins/typescript + + =============================================================================== eslint *ale-javascript-eslint* diff --git a/vim-config/plugins/ale/doc/ale-json.txt b/vim-config/plugins/ale/doc/ale-json.txt index ad0a05b1..7b240373 100644 --- a/vim-config/plugins/ale/doc/ale-json.txt +++ b/vim-config/plugins/ale/doc/ale-json.txt @@ -2,6 +2,25 @@ ALE JSON Integration *ale-json-options* +=============================================================================== +clang-format *ale-json-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for JSON. + + +=============================================================================== +cspell *ale-json-cspell* + +See |ale-cspell-options| + + +=============================================================================== +dprint *ale-json-dprint* + +See |ale-dprint-options| and https://dprint.dev/plugins/json + + =============================================================================== eslint *ale-json-eslint* @@ -141,6 +160,18 @@ g:ale_json_spectral_use_global *g:ale_json_spectral_use_global* See |ale-integrations-local-executables| +=============================================================================== +vscodejson *ale-json-vscode* + +Website: https://github.com/hrsh7th/vscode-langservers-extracted + +Installation +------------------------------------------------------------------------------- + +Install VSCode json language server either globally or locally: > + + npm install -g vscode-langservers-extracted +< =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-julia.txt b/vim-config/plugins/ale/doc/ale-julia.txt index 51532419..ab74ee12 100644 --- a/vim-config/plugins/ale/doc/ale-julia.txt +++ b/vim-config/plugins/ale/doc/ale-julia.txt @@ -11,7 +11,7 @@ g:ale_julia_executable *g:ale_julia_executable* *b:ale_julia_executable* Type: |String| - Default: 'julia' + Default: `'julia'` Path to the julia exetuable. diff --git a/vim-config/plugins/ale/doc/ale-kotlin.txt b/vim-config/plugins/ale/doc/ale-kotlin.txt index 4028531f..87cf56c5 100644 --- a/vim-config/plugins/ale/doc/ale-kotlin.txt +++ b/vim-config/plugins/ale/doc/ale-kotlin.txt @@ -79,7 +79,7 @@ g:ale_kotlin_ktlint_executable *g:ale_kotlin_ktlint_executable* g:ale_kotlin_ktlint_rulesets *g:ale_kotlin_ktlint_rulesets* Type: |List| of |String|s - Default: [] + Default: `[]` This list should contain paths to ruleset jars and/or strings of maven artifact triples. Example: diff --git a/vim-config/plugins/ale/doc/ale-latex.txt b/vim-config/plugins/ale/doc/ale-latex.txt index bedbabcd..b3029a5b 100644 --- a/vim-config/plugins/ale/doc/ale-latex.txt +++ b/vim-config/plugins/ale/doc/ale-latex.txt @@ -2,6 +2,9 @@ ALE LaTeX Integration *ale-latex-options* +=============================================================================== +cspell *ale-latex-cspell* + =============================================================================== write-good *ale-latex-write-good* @@ -9,10 +12,10 @@ See |ale-write-good-options| =============================================================================== -textlint *ale-latex-textlint* +textlint *ale-latex-textlint* See |ale-text-textlint| =============================================================================== -vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-llvm.txt b/vim-config/plugins/ale/doc/ale-llvm.txt index 2f4a46bd..fff1c305 100644 --- a/vim-config/plugins/ale/doc/ale-llvm.txt +++ b/vim-config/plugins/ale/doc/ale-llvm.txt @@ -9,7 +9,7 @@ g:ale_llvm_llc_executable *g:ale_llvm_llc_executable* *b:ale_llvm_llc_executable* Type: |String| - Default: "llc" + Default: `"llc"` The command to use for checking. This variable is useful when llc command has suffix like "llc-5.0". diff --git a/vim-config/plugins/ale/doc/ale-lua.txt b/vim-config/plugins/ale/doc/ale-lua.txt index ac92b9ac..7ee60d0e 100644 --- a/vim-config/plugins/ale/doc/ale-lua.txt +++ b/vim-config/plugins/ale/doc/ale-lua.txt @@ -1,6 +1,13 @@ =============================================================================== ALE Lua Integration *ale-lua-options* + +=============================================================================== +cspell *ale-lua-cspell* + +See |ale-cspell-options| + + =============================================================================== lua-format *ale-lua-lua-format* @@ -11,6 +18,7 @@ g:ale_lua_lua_format_executable *g:ale_lua_lua_format_executable* This variable can be changed to change the path to lua-format. + g:ale_lua_lua_format_options *g:ale_lua_lua_format_options* *b:ale_lua_lua_format_options* Type: |String| @@ -29,6 +37,7 @@ g:ale_lua_luac_executable *g:ale_lua_luac_executable* This variable can be changed to change the path to luac. + =============================================================================== luacheck *ale-lua-luacheck* @@ -58,6 +67,7 @@ g:ale_lua_luafmt_executable *g:ale_lua_luafmt_executable* This variable can be set to use a different executable for luafmt. + g:ale_lua_luafmt_options *g:ale_lua_luafmt_options* *b:ale_lua_luafmt_options* Type: |String| @@ -66,6 +76,25 @@ g:ale_lua_luafmt_options *g:ale_lua_luafmt_options* This variable can be set to pass additional options to the luafmt fixer. +=============================================================================== +selene *ale-lua-selene* + +g:ale_lua_selene_executable *g:ale_lua_selene_executable* + *b:ale_lua_selene_executable* + Type: |String| + Default: `'selene'` + + This variable can be set to use a different executable for selene. + + +g:ale_lua_selene_options *g:ale_lua_selene_options* + *b:ale_lua_selene_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to selene. + + =============================================================================== stylua *ale-lua-stylua* @@ -76,6 +105,7 @@ g:ale_lua_stylua_executable *g:ale_lua_stylua_executable* This variable can be set to use a different executable for stylua. + g:ale_lua_stylua_options *g:ale_lua_stylua_options* *b:ale_lua_stylua_options* Type: |String| diff --git a/vim-config/plugins/ale/doc/ale-make.txt b/vim-config/plugins/ale/doc/ale-make.txt new file mode 100644 index 00000000..74de798f --- /dev/null +++ b/vim-config/plugins/ale/doc/ale-make.txt @@ -0,0 +1,18 @@ +=============================================================================== +ALE Make Integration *ale-make-options* + + +=============================================================================== +checkmake *ale-make-checkmake* + +g:ale_make_checkmake_config *g:ale_make_checkmake_config* + *b:ale_make_checkmake_config* + Type: |String| + Default: `''` + + This variable can be used to set the `--config` option of checkmake command. + if the value is empty, the checkmake command will not be invoked with the + option. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-markdown.txt b/vim-config/plugins/ale/doc/ale-markdown.txt index feb37fc9..422828f3 100644 --- a/vim-config/plugins/ale/doc/ale-markdown.txt +++ b/vim-config/plugins/ale/doc/ale-markdown.txt @@ -2,9 +2,30 @@ ALE Markdown Integration *ale-markdown-options* +=============================================================================== +cspell *ale-markdown-cspell* + +See |ale-cspell-options| + + +=============================================================================== +dprint *ale-markdown-dprint* + +See |ale-dprint-options| and https://dprint.dev/plugins/markdown + + =============================================================================== markdownlint *ale-markdown-markdownlint* +g:ale_markdown_markdownlint_executable *g:ale_markdown_markdownlint_executable* + *b:ale_markdown_markdownlint_executable* + Type: |String| + Default: `'markdownlint'` + + Override the invoked `markdownlint` binary. You can use other binaries such as + `markdownlint-cli2`. + + g:ale_markdown_markdownlint_options *g:ale_markdown_markdownlint_options* *b:ale_markdown_markdownlint_options* Type: |String| @@ -98,4 +119,4 @@ See |ale-write-good-options| =============================================================================== -vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-nix.txt b/vim-config/plugins/ale/doc/ale-nix.txt index c38b93db..1df7caff 100644 --- a/vim-config/plugins/ale/doc/ale-nix.txt +++ b/vim-config/plugins/ale/doc/ale-nix.txt @@ -7,24 +7,24 @@ nixfmt *ale-nix-nixfmt* g:ale_nix_nixfmt_executable *g:ale_nix_nixfmt_executable* *b:ale_nix_nixfmt_executable* - Type: String - Default: 'nixfmt' + Type: |String| + Default: `'nixfmt'` This variable sets the executable used for nixfmt. g:ale_nix_nixfmt_options *g:ale_nix_nixfmt_options* *b:ale_nix_nixfmt_options* - Type: String - Default: '' + Type: |String| + Default: `''` This variable can be set to pass additional options to the nixfmt fixer. =============================================================================== -nixpkgs-fmt *ale-nix-nixpkgs-fmt* +nixpkgs-fmt *ale-nix-nixpkgs-fmt* -g:ale_nix_nixpkgsfmt_executable *g:ale_nix_nixpkgsfmt_executable* - *b:ale_nix_nixpkgsfmt_executable* +g:ale_nix_nixpkgsfmt_executable *g:ale_nix_nixpkgsfmt_executable* + *b:ale_nix_nixpkgsfmt_executable* Type: |String| Default: `'nixpkgs-fmt'` @@ -35,7 +35,44 @@ g:ale_nix_nixpkgsfmt_options *g:ale_nix_nixpkgsfmt_options* Type: |String| Default: `''` - This variable can be set to pass additional options to the nixpkgs-fmt fixer. + This variable can be set to pass additional options to the nixpkgs-fmt + fixer. + + +=============================================================================== +statix *ale-nix-statix* + +g:ale_nix_statix_check_executable *g:ale_nix_statix_check_executable* + *b:ale_nix_statix_check_executable* + Type: |String| + Default: `'statix'` + + This variable sets the executable used for statix when running it as a + linter. + +g:ale_nix_statix_check_options *g:ale_nix_statix_check_options* + *b:ale_nix_statix_check_options* + Type: |String| + Default: `''` + + This variable can be used to pass additional options to statix when running + it as a linter. + +g:ale_nix_statix_fix_executable *g:ale_nix_fix_check_executable* + *b:ale_nix_fix_check_executable* + Type: |String| + Default: `'statix'` + + This variable sets the executable used for statix when running it as a + fixer. + +g:ale_nix_statix_fix_options *g:ale_nix_statix_fix_options* + *b:ale_nix_statix_fix_options* + Type: |String| + Default: `''` + + This variable can be used to pass additional options to statix when running + it as a fixer. =============================================================================== diff --git a/vim-config/plugins/ale/doc/ale-objc.txt b/vim-config/plugins/ale/doc/ale-objc.txt index 0163175a..e1a0c2a2 100644 --- a/vim-config/plugins/ale/doc/ale-objc.txt +++ b/vim-config/plugins/ale/doc/ale-objc.txt @@ -2,6 +2,37 @@ ALE Objective-C Integration *ale-objc-options* +=============================================================================== +ccls *ale-objc-ccls* + +g:ale_objc_ccls_executable *g:ale_objc_ccls_executable* + *b:ale_objc_ccls_executable* + Type: |String| + Default: `'ccls'` + + This variable can be changed to use a different executable for ccls. + + +g:ale_objc_ccls_init_options *g:ale_objc_ccls_init_options* + *b:ale_objc_ccls_init_options* + Type: |Dictionary| + Default: `{}` + + This variable can be changed to customize ccls initialization options. + Example: > + { + \ 'cacheDirectory': '/tmp/ccls', + \ 'cacheFormat': 'binary', + \ 'diagnostics': { + \ 'onOpen': 0, + \ 'opChange': 1000, + \ }, + \ } +< + Visit https://github.com/MaskRay/ccls/wiki/Initialization-options for all + available options and explanations. + + =============================================================================== clang *ale-objc-clang* @@ -13,6 +44,13 @@ g:ale_objc_clang_options *g:ale_objc_clang_options* This variable can be changed to modify flags given to clang. +=============================================================================== +clang-format *ale-objc-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for Objective-C. + + =============================================================================== clangd *ale-objc-clangd* @@ -38,36 +76,5 @@ uncrustify *ale-objc-uncrustify* See |ale-c-uncrustify| for information about the available options. -=============================================================================== -ccls *ale-objc-ccls* - -g:ale_objc_ccls_executable *g:ale_objc_ccls_executable* - *b:ale_objc_ccls_executable* - Type: |String| - Default: `'ccls'` - - This variable can be changed to use a different executable for ccls. - - -g:ale_objc_ccls_init_options *g:ale_objc_ccls_init_options* - *b:ale_objc_ccls_init_options* - Type: |Dictionary| - Default: `{}` - - This variable can be changed to customize ccls initialization options. - Example: > - { - \ 'cacheDirectory': '/tmp/ccls', - \ 'cacheFormat': 'binary', - \ 'diagnostics': { - \ 'onOpen': 0, - \ 'opChange': 1000, - \ }, - \ } -< - Visit https://github.com/MaskRay/ccls/wiki/Initialization-options for all - available options and explanations. - - =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-ocaml.txt b/vim-config/plugins/ale/doc/ale-ocaml.txt index afbc2386..a361a7b4 100644 --- a/vim-config/plugins/ale/doc/ale-ocaml.txt +++ b/vim-config/plugins/ale/doc/ale-ocaml.txt @@ -2,6 +2,26 @@ ALE OCaml Integration *ale-ocaml-options* +=============================================================================== +dune *ale-ocaml-dune* + + Dune is a build system for OCaml projects. The `dune format` command is + supported for automatically formatting `dune` and `dune-project` files. + +g:ale_ocaml_dune_executable *g:ale_ocaml_dune_executable* + *b:ale_ocaml_dune_executable* + Type: |String| + Default: `'dune'` + + This variable can be set to pass the path to dune. + +g:ale_ocaml_dune_options *g:ale_ocaml_dune_options* + *b:ale_ocaml_dune_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the dune fixer. + =============================================================================== merlin *ale-ocaml-merlin* diff --git a/vim-config/plugins/ale/doc/ale-openscad.txt b/vim-config/plugins/ale/doc/ale-openscad.txt new file mode 100644 index 00000000..ac416bc3 --- /dev/null +++ b/vim-config/plugins/ale/doc/ale-openscad.txt @@ -0,0 +1,25 @@ +=============================================================================== +ALE OpenSCAD Integration *ale-openscad-options* + + +=============================================================================== +sca2d *ale-openscad-sca2d* + +g:ale_openscad_sca2d_executable *g:ale_openscad_sca2d_executable* + *b:ale_openscad_sca2d_executable* + Type: |String| + Default: `'sca2d'` + + See |ale-integrations-local-executables| + + +g:ale_openscad_sca2d_options *g:ale_openscad_sca2d_options* + *b:ale_openscad_sca2d_options* + Type: |String| + Default: `''` + + This variable can be set to pass options to sca2d. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-packer.txt b/vim-config/plugins/ale/doc/ale-packer.txt new file mode 100644 index 00000000..11b7cc22 --- /dev/null +++ b/vim-config/plugins/ale/doc/ale-packer.txt @@ -0,0 +1,24 @@ +=============================================================================== +ALE Packer Integration *ale-packer-options* + + +=============================================================================== +packer-fmt-fixer *ale-packer-fmt-fixer* + +g:ale_packer_fmt_executable *g:ale_packer_fmt_executable* + *b:ale_packer_fmt_executable* + + Type: |String| + Default: `'packer'` + + This variable can be changed to use a different executable for packer. + + +g:ale_packer_fmt_options *g:ale_packer_fmt_options* + *b:ale_packer_fmt_options* + Type: |String| + Default: `''` + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-perl.txt b/vim-config/plugins/ale/doc/ale-perl.txt index 761c2735..5eebc0e3 100644 --- a/vim-config/plugins/ale/doc/ale-perl.txt +++ b/vim-config/plugins/ale/doc/ale-perl.txt @@ -72,7 +72,7 @@ g:ale_perl_perlcritic_options *g:ale_perl_perlcritic_options* g:ale_perl_perlcritic_showrules *g:ale_perl_perlcritic_showrules* Type: |Number| - Default: 0 + Default: `0` Controls whether perlcritic rule names are shown after the error message. Defaults to off to reduce length of message. diff --git a/vim-config/plugins/ale/doc/ale-php.txt b/vim-config/plugins/ale/doc/ale-php.txt index 4ee016fb..2750a319 100644 --- a/vim-config/plugins/ale/doc/ale-php.txt +++ b/vim-config/plugins/ale/doc/ale-php.txt @@ -1,6 +1,13 @@ =============================================================================== ALE PHP Integration *ale-php-options* + +=============================================================================== +cspell *ale-php-cspell* + +See |ale-cspell-options| + + =============================================================================== langserver *ale-php-langserver* @@ -41,6 +48,7 @@ g:ale_php_phan_minimum_severity *g:ale_php_phan_minimum_severity* This variable defines the minimum severity level. + g:ale_php_phan_executable *g:ale_php_phan_executable* *b:ale_php_phan_executable* Type: |String| @@ -48,6 +56,7 @@ g:ale_php_phan_executable *g:ale_php_phan_executable* This variable sets executable used for phan or phan_client. + g:ale_php_phan_use_client *g:ale_php_phan_use_client* *b:ale_php_phan_use_client* Type: |Number| @@ -56,6 +65,7 @@ g:ale_php_phan_use_client *g:ale_php_phan_use_client* This variable can be set to 1 to use the phan_client with phan daemon mode instead of the phan standalone. + =============================================================================== phpcbf *ale-php-phpcbf* @@ -129,6 +139,7 @@ g:ale_php_phpcs_options *g:ale_php_phpcs_options* This variable can be set to pass additional options to php-cs + =============================================================================== phpmd *ale-php-phpmd* @@ -187,6 +198,15 @@ g:ale_php_phpstan_autoload *g:ale_php_phpstan_autoload* This variable sets path to phpstan autoload file. +g:ale_php_phpstan_memory_limit *g:ale_php_phpstan_memory-limit* + *b:ale_php_phpstan_memory-limit* + Type: |String| + Default: `''` + + This variable sets the memory limit for phpstan analysis. This is a string + in the same format as `php.ini` accepts, e.g. `128M`, `1G`. + + =============================================================================== psalm *ale-php-psalm* @@ -252,6 +272,33 @@ g:ale_php_php_executable *g:ale_php_php_executable* This variable sets the executable used for php. +=============================================================================== +pint *ale-php-pint* + +g:ale_php_pint_executable *g:ale_php_pint_executable* + *b:ale_php_pint_executable* + Type: |String| + Default: `'pint'` + + This variable sets the executable used for pint. + + +g:ale_php_pint_options *g:ale_php_pint_options* + *b:ale_php_pint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to pint. + + +g:ale_php_pint_use_global *g:ale_php_pint_use_global* + *b:ale_php_pint_use_global* + Type: |Boolean| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + =============================================================================== tlint *ale-php-tlint* diff --git a/vim-config/plugins/ale/doc/ale-powershell.txt b/vim-config/plugins/ale/doc/ale-powershell.txt index 485c9bd0..44a3c618 100644 --- a/vim-config/plugins/ale/doc/ale-powershell.txt +++ b/vim-config/plugins/ale/doc/ale-powershell.txt @@ -2,12 +2,18 @@ ALE PowerShell Integration *ale-powershell-options* +=============================================================================== +cspell *ale-powershell-cspell* + +See |ale-cspell-options| + + =============================================================================== powershell *ale-powershell-powershell* -g:ale_powershell_powershell_executable *g:ale_powershell_powershell_executable* - *b:ale_powershell_powershell_executable* - Type: String +g:ale_powershell_powershell_executable *g:ale_powershell_powershell_executable* + *b:ale_powershell_powershell_executable* + Type: |String| Default: `'pwsh'` This variable can be changed to use a different executable for powershell. @@ -33,7 +39,7 @@ g:ale_powershell_psscriptanalyzer_executable Default: `'pwsh'` This variable sets executable used for powershell. - + For example, on Windows you could set powershell to be Windows Powershell: > let g:ale_powershell_psscriptanalyzer_executable = 'powershell.exe' @@ -49,7 +55,7 @@ g:ale_powershell_psscriptanalyzer_module for psscriptanalyzer invocation. -g:ale_powershell_psscriptanalyzer_exclusions +g:ale_powershell_psscriptanalyzer_exclusions *g:ale_powershell_psscriptanalyzer_exclusions* *b:ale_powershell_psscriptanalyzer_exclusions* Type: |String| @@ -65,6 +71,5 @@ g:ale_powershell_psscriptanalyzer_exclusions \ 'PSAvoidUsingWriteHost,PSAvoidGlobalVars' < - =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-proto.txt b/vim-config/plugins/ale/doc/ale-proto.txt index 8ab56a14..e7015dcc 100644 --- a/vim-config/plugins/ale/doc/ale-proto.txt +++ b/vim-config/plugins/ale/doc/ale-proto.txt @@ -8,13 +8,63 @@ Integration Information To enable `.proto` file linting, update |g:ale_linters| as appropriate: > " Enable linter for .proto files - let g:ale_linters = {'proto': ['protoc-gen-lint', 'protolint']} + let g:ale_linters = {'proto': ['buf-lint', 'protoc-gen-lint', 'protolint']} +< To enable `.proto` file fixing, update |g:ale_fixers| as appropriate: > " Enable linter for .proto files - let b:ale_fixers = {'proto': ['protolint']} + let b:ale_fixers = {'proto': ['buf-format', 'protolint']} < + + +=============================================================================== +buf-format *ale-proto-buf-format* + + The formatter uses `buf`, a fully-featured Protobuf compiler that doesn't depend + on `protoc`. Make sure the `buf` binary is available in the system path, or + set ale_proto_buf_format_executable. + +g:ale_proto_buf_format_executable *g:ale_proto_buf_format_executable* + + Type: |String| + Default: `'buf'` + + This variable can be changed to modify the executable used for buf. + + +=============================================================================== +buf-lint *ale-proto-buf-lint* + + The linter uses `buf`, a fully-featured Protobuf compiler that doesn't depend + on `protoc`. Make sure the `buf` binary is available in the system path, or + set ale_proto_buf_lint_executable. + +g:ale_proto_buf_lint_executable *g:ale_proto_buf_lint_executable* + + Type: |String| + Default: `'buf'` + + This variable can be changed to modify the executable used for buf. + +g:ale_proto_buf_lint_config *g:ale_proto_buf_lint_config* + + Type: |String| + Default: `''` + + A path to a buf configuration file. + + The path to the configuration file can be an absolute path or a relative + path. ALE will search for the relative path in parent directories. + + +=============================================================================== +clang-format *ale-proto-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for Proto. + + =============================================================================== protoc-gen-lint *ale-proto-protoc-gen-lint* @@ -30,6 +80,7 @@ g:ale_proto_protoc_gen_lint_options *g:ale_proto_protoc_gen_lint_options* directory of the linted file is always passed as an include path with '-I' before any user-supplied options. + =============================================================================== protolint *ale-proto-protolint* @@ -42,7 +93,7 @@ protolint *ale-proto-protolint g:ale_proto_protolint_executable *g:ale_proto_protolint_executable* Type: |String| - Default: 'protolint' + Default: `'protolint'` This variable can be changed to modify the executable used for protolint. @@ -56,5 +107,6 @@ g:ale_proto_protolint_config *g:ale_proto_protolint_config* The path to the configuration file can be an absolute path or a relative path. ALE will search for the relative path in parent directories. + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-purescript.txt b/vim-config/plugins/ale/doc/ale-purescript.txt index 91bef558..25b3dd8d 100644 --- a/vim-config/plugins/ale/doc/ale-purescript.txt +++ b/vim-config/plugins/ale/doc/ale-purescript.txt @@ -48,7 +48,7 @@ g:ale_purescript_tidy_use_global *g:ale_purescript_tidy_use_global* g:ale_purescript_tidy_options *g:ale_purescript_tidy_options* *b:ale_purescript_tidy_options* - Type: String + Type: |String| Default: `''` This variable can be set to pass in additional option to the 'purs-tidy' diff --git a/vim-config/plugins/ale/doc/ale-python.txt b/vim-config/plugins/ale/doc/ale-python.txt index 10cc2897..07f54db8 100644 --- a/vim-config/plugins/ale/doc/ale-python.txt +++ b/vim-config/plugins/ale/doc/ale-python.txt @@ -10,6 +10,7 @@ g:ale_python_auto_pipenv *g:ale_python_auto_pipenv* Detect whether the file is inside a pipenv, and set the executable to `pipenv` if true. This is overridden by a manually-set executable. + g:ale_python_auto_poetry *g:ale_python_auto_poetry* *b:ale_python_auto_poetry* Type: |Number| @@ -18,6 +19,7 @@ g:ale_python_auto_poetry *g:ale_python_auto_poetry* Detect whether the file is inside a poetry, and set the executable to `poetry` if true. This is overridden by a manually-set executable. + =============================================================================== ALE Python Project Root Behavior *ale-python-root* @@ -37,12 +39,15 @@ ALE will look for configuration files with the following filenames. > tox.ini .pyre_configuration.local mypy.ini + .mypy.ini pycodestyle.cfg .flake8 .flake8rc pylama.ini pylintrc .pylintrc + pyrightconfig.json + pyrightconfig.toml Pipfile Pipfile.lock poetry.lock @@ -229,6 +234,7 @@ g:ale_python_black_auto_pipenv *g:ale_python_black_auto_pipenv* Detect whether the file is inside a pipenv, and set the executable to `pipenv` if true. This is overridden by a manually-set executable. + g:ale_python_black_auto_poetry *g:ale_python_black_auto_poetry* *b:ale_python_black_auto_poetry* Type: |Number| @@ -237,6 +243,7 @@ g:ale_python_black_auto_poetry *g:ale_python_black_auto_poetry* Detect whether the file is inside a poetry, and set the executable to `poetry` if true. This is overridden by a manually-set executable. + g:ale_python_black_change_directory *g:ale_python_black_change_directory* *b:ale_python_black_change_directory* Type: |Number| @@ -248,17 +255,23 @@ g:ale_python_black_change_directory *g:ale_python_black_change_directory* to control the directory Python is executed from yourself. +=============================================================================== +cspell *ale-python-cspell* + +See |ale-cspell-options| + + =============================================================================== flake8 *ale-python-flake8* g:ale_python_flake8_change_directory *g:ale_python_flake8_change_directory* *b:ale_python_flake8_change_directory* Type: |String| - Default: `project` + Default: `'project'` If set to `project`, ALE will switch to the project root before checking file. - If set to `file`, ALE will switch to directory the Python file being - checked with `flake8` is in before checking it. + If set to `file`, ALE will first switch to the directory containing the + Python file being checked with `flake8` before checking it. You can turn it off with `off` option if you want to control the directory Python is executed from yourself. @@ -320,6 +333,7 @@ g:ale_python_flake8_auto_poetry *g:ale_python_flake8_auto_poetry* Detect whether the file is inside a poetry, and set the executable to `poetry` if true. This is overridden by a manually-set executable. + =============================================================================== flakehell *ale-python-flakehell* @@ -384,6 +398,7 @@ g:ale_python_flakehell_auto_poetry *g:ale_python_flakehell_auto_poetry* Detect whether the file is inside a poetry, and set the executable to `poetry` if true. This is overridden by a manually-set executable. + =============================================================================== isort *ale-python-isort* @@ -504,7 +519,6 @@ g:ale_python_mypy_use_global *g:ale_python_mypy_use_global* See |ale-integrations-local-executables| - =============================================================================== prospector *ale-python-prospector* @@ -569,7 +583,6 @@ g:ale_python_prospector_auto_poetry *g:ale_python_prospector_auto_poetry* =============================================================================== pycodestyle *ale-python-pycodestyle* - g:ale_python_pycodestyle_executable *g:ale_python_pycodestyle_executable* *b:ale_python_pycodestyle_executable* Type: |String| @@ -619,7 +632,6 @@ g:ale_python_pycodestyle_auto_poetry *g:ale_python_pycodestyle_auto_poetry* =============================================================================== pydocstyle *ale-python-pydocstyle* - g:ale_python_pydocstyle_executable *g:ale_python_pydocstyle_executable* *b:ale_python_pydocstyle_executable* Type: |String| @@ -669,7 +681,6 @@ g:ale_python_pydocstyle_auto_poetry *g:ale_python_pydocstyle_auto_poetry* =============================================================================== pyflakes *ale-python-pyflakes* - g:ale_python_pyflakes_executable *g:ale_python_pyflakes_executable* *b:ale_python_pyflakes_executable* Type: |String| @@ -699,6 +710,52 @@ g:ale_python_pyflakes_auto_poetry *g:ale_python_pyflakes_auto_poetry* if true. This is overridden by a manually-set executable. +=============================================================================== +pyflyby *ale-python-pyflyby* + +g:ale_python_pyflyby_executable *g:ale_python_pyflyby_executable* + *b:ale_python_pyflyby_executable* + Type: |String| + Default: `'tidy-imports'` + + See |ale-integrations-local-executables| + + +g:ale_python_pyflyby_options *g:ale_python_pyflyby_options* + *b:ale_python_pyflyby_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the pyflyby + tidy-imports invocation. + + +g:ale_python_pyflyby_use_global *g:ale_python_pyflyby_use_global* + *b:ale_python_pyflyby_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_pyflyby_auto_pipenv *g:ale_python_pyflyby_auto_pipenv* + *b:ale_python_pyflyby_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_pyflyby_auto_poetry *g:ale_python_pyflyby_auto_poetry* + *b:ale_python_pyflyby_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + =============================================================================== pylama *ale-python-pylama* @@ -922,9 +979,10 @@ g:ale_python_pylsp_options *g:ale_python_pylsp_options let g:ale_python_pylsp_executable = 'python3' let g:ale_python_pylsp_options = '-m pylsp' - An example stragety for installing `pylsp`: + An example strategy for installing `pylsp`: `python3 -m pip install --user pylsp` + =============================================================================== pyre *ale-python-pyre* @@ -1027,6 +1085,67 @@ g:ale_python_pyright_config *g:ale_python_pyright_config* \} < +=============================================================================== +refurb *ale-python-refurb* + +g:ale_python_refurb_change_directory *g:ale_python_refurb_change_directory* + *b:ale_python_refurb_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, `refurb` will be run from a detected project root, per + |ale-python-root|. if set to `0` or no project root detected, + `refurb` will be run from the buffer's directory. + + +g:ale_python_refurb_executable *g:ale_python_refurb_executable* + *b:ale_python_refurb_executable* + Type: |String| + Default: `'refurb'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `refurb'`. + Set this to `'poetry'` to invoke `'poetry` `run` `refurb'`. + + +g:ale_python_refurb_options *g:ale_python_refurb_options* + *b:ale_python_refurb_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the refurb + invocation. + + For example, to select/enable and/or disable some error codes, + you may want to set > + let g:ale_python_refurb_options = '--ignore 100' +g:ale_python_refurb_use_global *g:ale_python_refurb_use_global* + *b:ale_python_refurb_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_refurb_auto_pipenv *g:ale_python_refurb_auto_pipenv* + *b:ale_python_refurb_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_refurb_auto_poetry *g:ale_python_refurb_auto_poetry* + *b:ale_python_refurb_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + =============================================================================== reorder-python-imports *ale-python-reorder_python_imports* @@ -1057,6 +1176,121 @@ g:ale_python_reorder_python_imports_use_global See |ale-integrations-local-executables| +=============================================================================== +ruff *ale-python-ruff* + +g:ale_python_ruff_change_directory *g:ale_python_ruff_change_directory* + *b:ale_python_ruff_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, `ruff` will be run from a detected project root, per + |ale-python-root|. if set to `0` or no project root detected, + `ruff` will be run from the buffer's directory. + + +g:ale_python_ruff_executable *g:ale_python_ruff_executable* + *b:ale_python_ruff_executable* + Type: |String| + Default: `'ruff'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `ruff'`. + Set this to `'poetry'` to invoke `'poetry` `run` `ruff'`. + + +g:ale_python_ruff_options *g:ale_python_ruff_options* + *b:ale_python_ruff_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the ruff + invocation. + + For example, to select/enable and/or disable some error codes, + you may want to set > + let g:ale_python_ruff_options = '--ignore F401' + + +g:ale_python_ruff_use_global *g:ale_python_ruff_use_global* + *b:ale_python_ruff_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_ruff_auto_pipenv *g:ale_python_ruff_auto_pipenv* + *b:ale_python_ruff_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_ruff_auto_poetry *g:ale_python_ruff_auto_poetry* + *b:ale_python_ruff_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +unimport *ale-python-unimport* + +`unimport` will be run from a detected project root, per |ale-python-root|. + + +g:ale_python_unimport_auto_pipenv *g:ale_python_unimport_auto_pipenv* + *b:ale_python_unimport_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_unimport_auto_poetry *g:ale_python_unimport_auto_poetry* + *b:ale_python_unimport_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +g:ale_python_unimport_executable *g:ale_python_unimport_executable* + *b:ale_python_unimport_executable* + Type: |String| + Default: `'unimport'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `unimport'`. + Set this to `'poetry'` to invoke `'poetry` `run` `unimport'`. + + +g:ale_python_unimport_options *g:ale_python_unimport_options* + *b:ale_python_unimport_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the unimport + invocation. + + +g:ale_python_unimport_use_global *g:ale_python_unimport_use_global* + *b:ale_python_unimport_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + =============================================================================== vulture *ale-python-vulture* diff --git a/vim-config/plugins/ale/doc/ale-racket.txt b/vim-config/plugins/ale/doc/ale-racket.txt new file mode 100644 index 00000000..7e78702f --- /dev/null +++ b/vim-config/plugins/ale/doc/ale-racket.txt @@ -0,0 +1,41 @@ +=============================================================================== +ALE Racket Integration *ale-racket-options* + +=============================================================================== +racket_langserver *ale-racket-langserver* + +1. Install racket-langserver as described here: + https://github.com/jeapostrophe/racket-langserver +2. Have `racket` available in the `$PATH` environment variable, currently there + is no way to specify path to custom location of `racket`. +3. set `racket_langserver` as a linter for `racket` like: > + let g:ale_linters['racket'] += ['racket_langserver'] + +You should be able to see linter results and use LSP features of `ALE` like +`ALEGoToDefinition` with `racket-langserver`. + +=============================================================================== +raco_fmt *ale-racket-raco-fmt* + +g:ale_racket_raco_fmt_executable *g:ale_racket_raco_fmt_executable* + *b:ale_racket_raco_fmt_executable* + Type: |String| + Default: `'raco'` + + If the `raco` excutable is not in the `$PATH` environment variable, or you + prefer to use one installed in a custom location, set this option to the + path to the specific `raco` executable. + +g:ale_racket_raco_fmt_options *g:ale_racket_raco_fmt_options* + *b:ale_racket_raco_fmt_options* + Type: |String| + Default: `''` + + Use this variable to pass command-line flags/parameters to `raco_fmt` + + For example, set the page width limit to 40 > + let g:ale_racket_raco_fmt_options = '--width 40' + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-rego.txt b/vim-config/plugins/ale/doc/ale-rego.txt new file mode 100644 index 00000000..9a39dbf0 --- /dev/null +++ b/vim-config/plugins/ale/doc/ale-rego.txt @@ -0,0 +1,50 @@ +=============================================================================== +ALE Rego Integration *ale-rego-options* + + +=============================================================================== +cspell *ale-rego-cspell* + +See |ale-cspell-options| + + +=============================================================================== +opacheck *ale-rego-opa-check* + +g:ale_rego_opacheck_executable *g:rego_opacheck_executable* + *b:rego_opacheck_executable* + + Type: |String| + Default: `'opa'` + + This variable can be changed to use a different executable for opa. + + +g:rego_opacheck_options *g:rego_opacheck_options* + *b:rego_opacheck_options* + Type: |String| + Default: `''` + + This variable can be changed to pass custom CLI flags to opa check. + + +=============================================================================== +opafmt *ale-rego-opa-fmt-fixer* + +g:ale_opa_fmt_executable *g:ale_opa_fmt_executable* + *b:ale_opa_fmt_executable* + + Type: |String| + Default: `'opa'` + + This variable can be changed to use a different executable for opa. + + +g:ale_opa_fmt_options *g:ale_opa_fmt_options* + *b:ale_opa_fmt_options* + Type: |String| + Default: `''` + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-restructuredtext.txt b/vim-config/plugins/ale/doc/ale-restructuredtext.txt index e308b072..7af62133 100644 --- a/vim-config/plugins/ale/doc/ale-restructuredtext.txt +++ b/vim-config/plugins/ale/doc/ale-restructuredtext.txt @@ -2,6 +2,12 @@ ALE reStructuredText Integration *ale-restructuredtext-options* +=============================================================================== +cspell *ale-restructuredtext-cspell* + +See |ale-cspell-options| + + =============================================================================== textlint *ale-restructuredtext-textlint* @@ -16,6 +22,7 @@ See: https://github.com/jimo1001/docutils-ast-writer See |ale-text-textlint| + =============================================================================== write-good *ale-restructuredtext-write-good* @@ -23,4 +30,4 @@ See |ale-write-good-options| =============================================================================== -vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-ruby.txt b/vim-config/plugins/ale/doc/ale-ruby.txt index 69c643a9..b0773fdd 100644 --- a/vim-config/plugins/ale/doc/ale-ruby.txt +++ b/vim-config/plugins/ale/doc/ale-ruby.txt @@ -7,7 +7,7 @@ brakeman *ale-ruby-brakeman* g:ale_ruby_brakeman_executable *g:ale_ruby_brakeman_executable* *b:ale_ruby_brakeman_executable* - Type: String + Type: |String| Default: `'brakeman'` Override the invoked brakeman binary. Set this to `'bundle'` to invoke @@ -21,12 +21,19 @@ g:ale_ruby_brakeman_options *g:ale_ruby_brakeman_options* The contents of this variable will be passed through to brakeman. + +=============================================================================== +cspell *ale-ruby-cspell* + +See |ale-cspell-options| + + =============================================================================== debride *ale-ruby-debride* g:ale_ruby_debride_executable *g:ale_ruby_debride_executable* *b:ale_ruby_debride_executable* - Type: String + Type: |String| Default: `'debride'` Override the invoked debride binary. Set this to `'bundle'` to invoke @@ -53,7 +60,7 @@ rails_best_practices *ale-ruby-rails_best_practices* g:ale_ruby_rails_best_practices_executable *g:ale_ruby_rails_best_practices_executable* *b:ale_ruby_rails_best_practices_executable* - Type: String + Type: |String| Default: `'rails_best_practices'` Override the invoked rails_best_practices binary. Set this to `'bundle'` to @@ -74,7 +81,7 @@ reek *ale-ruby-reek* g:ale_ruby_reek_executable *g:ale_ruby_reek_executable* *b:ale_ruby_reek_executable* - Type: String + Type: |String| Default: `'reek'` Override the invoked reek binary. Set this to `'bundle'` to invoke @@ -84,7 +91,7 @@ g:ale_ruby_reek_executable *g:ale_ruby_reek_executable* g:ale_ruby_reek_show_context *g:ale_ruby_reek_show_context* *b:ale_ruby_reek_show_context* Type: |Number| - Default: 0 + Default: `0` Controls whether context is included in the linter message. Defaults to off because context is usually obvious while viewing a file. @@ -93,7 +100,7 @@ g:ale_ruby_reek_show_context *g:ale_ruby_reek_show_context* g:ale_ruby_reek_show_wiki_link *g:ale_ruby_reek_show_wiki_link* *b:ale_ruby_reek_show_wiki_link* Type: |Number| - Default: 0 + Default: `0` Controls whether linter messages contain a link to an explanatory wiki page for the type of code smell. Defaults to off to improve readability. @@ -104,7 +111,7 @@ rubocop *ale-ruby-rubocop* g:ale_ruby_rubocop_executable *g:ale_ruby_rubocop_executable* *b:ale_ruby_rubocop_executable* - Type: String + Type: |String| Default: `'rubocop'` Override the invoked rubocop binary. Set this to `'bundle'` to invoke @@ -121,7 +128,7 @@ g:ale_ruby_rubocop_options *g:ale_ruby_rubocop_options* g:ale_ruby_rubocop_auto_correct_all *g:ale_ruby_rubocop_auto_correct_all* *b:ale_ruby_rubocop_auto_correct_all* - Type: Number + Type: |Number| Default: `0` This variable can be changed to make rubocop to correct all offenses (unsafe). @@ -132,7 +139,7 @@ ruby *ale-ruby-ruby* g:ale_ruby_ruby_executable *g:ale_ruby_ruby_executable* *b:ale_ruby_ruby_executable* - Type: String + Type: |String| Default: `'ruby'` This variable can be changed to use a different executable for ruby. @@ -143,7 +150,7 @@ rufo *ale-ruby-rufo* g:ale_ruby_rufo_executable *g:ale_ruby_rufo_executable* *b:ale_ruby_rufo_executable* - Type: String + Type: |String| Default: `'rufo'` Override the invoked rufo binary. This is useful for running rufo from @@ -155,7 +162,7 @@ solargraph *ale-ruby-solargraph* g:ale_ruby_solargraph_executable *g:ale_ruby_solargraph_executable* *b:ale_ruby_solargraph_executable* - Type: String + Type: |String| Default: `'solargraph'` Override the invoked solargraph binary. This is useful for running solargraph @@ -167,7 +174,7 @@ sorbet *ale-ruby-sorbet* g:ale_ruby_sorbet_executable *g:ale_ruby_sorbet_executable* *b:ale_ruby_sorbet_executable* - Type: String + Type: |String| Default: `'srb'` Override the invoked sorbet binary. Set this to `'bundle'` to invoke @@ -197,7 +204,7 @@ standardrb *ale-ruby-standardrb* g:ale_ruby_standardrb_executable *g:ale_ruby_standardrb_executable* *b:ale_ruby_standardrb_executable* - Type: String + Type: |String| Default: `'standardrb'` Override the invoked standardrb binary. Set this to `'bundle'` to invoke @@ -213,6 +220,24 @@ g:ale_ruby_standardrb_options *g:ale_ruby_standardrb_options* =============================================================================== +syntax_tree *ale-ruby-syntax_tree* + +g:ale_ruby_syntax_tree_executable *g:ale_ruby_syntax_tree_executable* + *b:ale_ruby_syntax_tree_executable* + Type: |String| + Default: `'stree'` + + Override the invoked SyntaxTree binary. Set this to `'bundle'` to invoke + `'bundle` `exec` stree'. + + +g:ale_ruby_syntax_tree_options *g:ale_ruby_syntax_tree_options* + *b:ale_ruby_syntax_tree_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to SyntaxTree. + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-rust.txt b/vim-config/plugins/ale/doc/ale-rust.txt index 3aa63673..36d69b5e 100644 --- a/vim-config/plugins/ale/doc/ale-rust.txt +++ b/vim-config/plugins/ale/doc/ale-rust.txt @@ -26,8 +26,10 @@ Integration Information 4. analyzer -- If you have rust-analyzer installed, you might prefer using this linter over cargo and rls. rust-analyzer also implements the Language Server Protocol for incremental compilation of Rust code, and is - the next iteration of rls. rust-analyzer, like rls, requires Rust files - to be contained in Cargo projects. + the next iteration of rls. rust-analyzer either requires Rust files to be + contained in Cargo projects or requires the project to be described in + the rust-project.json format: + https://rust-analyzer.github.io/manual.html#non-cargo-based-projects 5. rustfmt -- If you have `rustfmt` installed, you can use it as a fixer to consistently reformat your Rust code. @@ -38,7 +40,7 @@ Integration Information let g:ale_linters = {'rust': ['rustc', 'rls']} < - Also note that rustc 1.12. or later is needed. + Also note that rustc 1.18. or later is needed. =============================================================================== @@ -145,8 +147,7 @@ g:ale_rust_cargo_avoid_whole_workspace *g:ale_rust_cargo_avoid_whole_workspace* in the crate's directory. Otherwise, behave as usual. -g:ale_rust_cargo_use_clippy - *g:ale_rust_cargo_use_clippy* +g:ale_rust_cargo_use_clippy *g:ale_rust_cargo_use_clippy* *b:ale_rust_cargo_use_clippy* Type: |Number| Default: `0` @@ -163,8 +164,7 @@ g:ale_rust_cargo_use_clippy let g:ale_rust_cargo_use_clippy = executable('cargo-clippy') < -g:ale_rust_cargo_clippy_options - *g:ale_rust_cargo_clippy_options* +g:ale_rust_cargo_clippy_options *g:ale_rust_cargo_clippy_options* *b:ale_rust_cargo_clippy_options* Type: |String| @@ -175,8 +175,7 @@ g:ale_rust_cargo_clippy_options only `cargo clippy` supports (e.g. `--deny`). -g:ale_rust_cargo_target_dir - *g:ale_rust_cargo_target_dir* +g:ale_rust_cargo_target_dir *g:ale_rust_cargo_target_dir* *b:ale_rust_cargo_target_dir* Type: |String| @@ -187,6 +186,12 @@ g:ale_rust_cargo_target_dir running `cargo` commands manually while ALE is performing its checks. +=============================================================================== +cspell *ale-rust-cspell* + +See |ale-cspell-options| + + =============================================================================== rls *ale-rust-rls* @@ -234,13 +239,13 @@ rustc *ale-rust-rustc* g:ale_rust_rustc_options *g:ale_rust_rustc_options* *b:ale_rust_rustc_options* Type: |String| - Default: `'-Z no-codegen'` + Default: `'--emit=mir -o /dev/null'` The variable can be used to change the options passed to `rustc`. - `-Z no-codegen` should only work with nightly builds of Rust. Be careful when - setting the options, as running `rustc` could execute code or generate - binary files. + Users of nightly builds of Rust might want to use `-Z no-codegen` instead. + Be careful when setting the options, as running `rustc` could execute code + or generate binary files. g:ale_rust_ignore_error_codes *g:ale_rust_ignore_error_codes* @@ -256,8 +261,8 @@ g:ale_rust_ignore_error_codes *g:ale_rust_ignore_error_codes* g:ale_rust_ignore_secondary_spans *g:ale_rust_ignore_secondary_spans* *b:ale_rust_ignore_secondary_spans* - Type: Number - Default: 0 + Type: |Number| + Default: `0` When set to 1, instructs the Rust error reporting to ignore secondary spans. The problem with secondary spans is that they sometimes appear in error @@ -283,5 +288,13 @@ g:ale_rust_rustfmt_options *g:ale_rust_rustfmt_options* This variable can be set to pass additional options to the rustfmt fixer. +g:ale_rust_rustfmt_executable *g:ale_rust_rustfmt_executable* + *b:ale_rust_rustfmt_executable* + Type: |String| + Default: `'rustfmt'` + + This variable can be modified to change the executable path for `rustfmt`. + + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-scala.txt b/vim-config/plugins/ale/doc/ale-scala.txt index c9638baf..0b0f1a9a 100644 --- a/vim-config/plugins/ale/doc/ale-scala.txt +++ b/vim-config/plugins/ale/doc/ale-scala.txt @@ -2,6 +2,12 @@ ALE Scala Integration *ale-scala-options* +=============================================================================== +cspell *ale-scala-cspell* + +See |ale-cspell-options| + + =============================================================================== metals *ale-scala-metals* diff --git a/vim-config/plugins/ale/doc/ale-sh.txt b/vim-config/plugins/ale/doc/ale-sh.txt index c06f737a..9a1928c4 100644 --- a/vim-config/plugins/ale/doc/ale-sh.txt +++ b/vim-config/plugins/ale/doc/ale-sh.txt @@ -25,6 +25,12 @@ g:ale_sh_bashate_options *g:ale_sh_bashate_options* let g:ale_sh_bashate_options = '-i E003' < +=============================================================================== +cspell *ale-sh-cspell* + +See |ale-cspell-options| + + =============================================================================== sh-language-server *ale-sh-language-server* diff --git a/vim-config/plugins/ale/doc/ale-sql.txt b/vim-config/plugins/ale/doc/ale-sql.txt index 398e24d3..225ac7df 100644 --- a/vim-config/plugins/ale/doc/ale-sql.txt +++ b/vim-config/plugins/ale/doc/ale-sql.txt @@ -2,6 +2,13 @@ ALE SQL Integration *ale-sql-options* +=============================================================================== +dprint *ale-sql-dprint* + +See |ale-dprint-options| +and https://github.com/dprint/dprint-plugin-sql/releases + + =============================================================================== pgformatter *ale-sql-pgformatter* @@ -20,6 +27,27 @@ g:ale_sql_pgformatter_options *g:ale_sql_pgformatter_options* This variable can be set to pass additional options to the pgformatter fixer. +=============================================================================== +sqlfluff *ale-sql-sqlfluff* + +g:ale_sql_sqlfluff_executable *g:ale_sql_sqlfluff_executable* + *b:ale_sql_sqlfluff_executable* + Type: |String| + Default: `'sqlfluff'` + + This variable sets executable used for sqlfluff. + +g:ale_sql_sqlfluff_options *g:ale_sql_sqlfluff_options* + *b:ale_sql_sqlfluff_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the sqlfluff linter. + + +=============================================================================== + + =============================================================================== sqlfmt *ale-sql-sqlfmt* diff --git a/vim-config/plugins/ale/doc/ale-supported-languages-and-tools.txt b/vim-config/plugins/ale/doc/ale-supported-languages-and-tools.txt index 36ef83ea..4edc10c0 100644 --- a/vim-config/plugins/ale/doc/ale-supported-languages-and-tools.txt +++ b/vim-config/plugins/ale/doc/ale-supported-languages-and-tools.txt @@ -14,9 +14,11 @@ Notes: * Ada * `ada_language_server` + * `cspell` * `gcc` * `gnatpp` * Ansible + * `ansible-language-server` * `ansible-lint`!! * API Blueprint * `drafter` @@ -24,7 +26,8 @@ Notes: * `apkbuild-lint` * `secfixes-check` * AsciiDoc - * `alex`!! + * `alex` + * `cspell` * `languagetool`!! * `proselint` * `redpen` @@ -33,10 +36,13 @@ Notes: * `write-good` * ASM * `gcc` +* AVRA + * `avra` * Awk * `gawk` * Bash * `bashate` + * `cspell` * `language-server` * `shell` (-n flag) * `shellcheck` @@ -47,6 +53,10 @@ Notes: * `buildifier` * BibTeX * `bibclean` +* Bicep + * `bicep` +* BitBake + * `oelint-adv` * Bourne Shell * `shell` (-n flag) * `shellcheck` @@ -61,11 +71,14 @@ Notes: * `cppcheck` * `cpplint`!! * `cquery` + * `cspell` * `flawfinder` * `gcc` (`cc`) * `uncrustify` * C# + * `clang-format` * `csc`!! + * `cspell` * `dotnet-format` * `mcs` * `mcsc`!! @@ -82,9 +95,12 @@ Notes: * `cppcheck` * `cpplint`!! * `cquery` + * `cspell` * `flawfinder` * `gcc` (`cc`) * `uncrustify` +* Cairo + * `starknet` * Chef * `cookstyle` * `foodcritic`!! @@ -95,6 +111,7 @@ Notes: * `cfn-python-lint` * CMake * `cmake-format` + * `cmake-lint` * `cmakelint` * CoffeeScript * `coffee` @@ -103,6 +120,9 @@ Notes: * `ameba`!! * `crystal`!! * CSS + * `VSCode CSS language server` + * `cspell` + * `css-beautify` * `csslint` * `fecs` * `prettier` @@ -110,6 +130,7 @@ Notes: * Cucumber * `cucumber` * CUDA + * `clang-format` * `clangd` * `nvcc`!! * Cypher @@ -127,7 +148,6 @@ Notes: * `analysis_server` * `dart-analyze`!! * `dart-format`!! - * `dartanalyzer`!! * `dartfmt`!! * `language_server` * desktop @@ -138,9 +158,11 @@ Notes: * `dhall-lint` * Dockerfile * `dockerfile_lint` + * `dprint` * `hadolint` * Elixir * `credo` + * `cspell` * `dialyxir` * `dogma`!! * `elixir-ls` @@ -159,6 +181,7 @@ Notes: * `SyntaxErl` * `dialyzer`!! * `elvis`!! + * `erlang_ls` * `erlc` * `erlfmt` * Fish @@ -178,10 +201,12 @@ Notes: * `glslls` * Go * `bingo` + * `cspell` * `go build`!! * `go mod`!! * `go vet`!! * `gofmt` + * `gofumpt` * `goimports` * `golangci-lint`!! * `golangserver` @@ -208,6 +233,7 @@ Notes: * Haskell * `brittany` * `cabal-ghc` + * `cspell` * `floskell` * `ghc` * `ghc-mod` @@ -222,10 +248,13 @@ Notes: * `stack-ghc` * `stylish-haskell` * HCL + * `packer-fmt` * `terraform-fmt` * HTML - * `alex`!! + * `VSCode HTML language server` + * `alex` * `angular` + * `cspell` * `fecs` * `html-beautify` * `htmlhint` @@ -244,13 +273,18 @@ Notes: * Java * `PMD` * `checkstyle`!! + * `clang-format` + * `cspell` * `eclipselsp` * `google-java-format` * `javac` * `javalsp` * `uncrustify` * JavaScript + * `clang-format` + * `cspell` * `deno` + * `dprint` * `eslint` * `fecs` * `flow` @@ -263,6 +297,10 @@ Notes: * `tsserver` * `xo` * JSON + * `VSCode JSON language server` + * `clang-format` + * `cspell` + * `dprint` * `eslint` * `fixjson` * `jq` @@ -283,8 +321,9 @@ Notes: * `ktlint` * `languageserver` * LaTeX (tex) - * `alex`!! + * `alex` * `chktex` + * `cspell` * `lacheck` * `proselint` * `redpen` @@ -299,20 +338,23 @@ Notes: * LLVM * `llc` * Lua + * `cspell` * `lua-format` * `luac` * `luacheck` * `luafmt` + * `selene` * `stylua` * Mail - * `alex`!! + * `alex` * `languagetool`!! * `proselint` * `vale` * Make * `checkmake` * Markdown - * `alex`!! + * `alex` + * `cspell` * `languagetool`!! * `markdownlint`!! * `mdl` @@ -339,13 +381,15 @@ Notes: * `nixfmt` * `nixpkgs-fmt` * `rnix-lsp` + * `statix` * nroff - * `alex`!! + * `alex` * `proselint` * `write-good` * Objective-C * `ccls` * `clang` + * `clang-format` * `clangd` * `uncrustify` * Objective-C++ @@ -353,6 +397,7 @@ Notes: * `clangd` * `uncrustify` * OCaml + * `dune` * `merlin` (see |ale-ocaml-merlin|) * `ocamlformat` * `ocamllsp` @@ -362,6 +407,10 @@ Notes: * `ibm_validator` * `prettier` * `yamllint` +* OpenSCAD + * `SCA2D` +* Packer + * `packer-fmt-fixer` * Pascal * `ptop` * Pawn @@ -373,34 +422,41 @@ Notes: * Perl6 * `perl6 -c` * PHP + * `cspell` * `intelephense` * `langserver` * `phan` * `php -l` * `php-cs-fixer` + * `phpactor` * `phpcbf` * `phpcs` * `phpmd` * `phpstan` + * `pint` * `psalm`!! * `tlint` * PO - * `alex`!! + * `alex` * `msgfmt` * `proselint` * `write-good` * Pod - * `alex`!! + * `alex` * `proselint` * `write-good` * Pony * `ponyc` * PowerShell + * `cspell` * `powershell` * `psscriptanalyzer` * Prolog * `swipl` * proto + * `buf-format`!! + * `buf-lint`!! + * `clang-format` * `protoc-gen-lint`!! * `protolint`!! * Pug @@ -419,6 +475,7 @@ Notes: * `autopep8` * `bandit` * `black` + * `cspell` * `flake8` * `flakehell` * `isort` @@ -427,12 +484,16 @@ Notes: * `pycodestyle` * `pydocstyle` * `pyflakes` + * `pyflyby` * `pylama`!! * `pylint`!! * `pylsp` * `pyre` * `pyright` + * `refurb` * `reorder-python-imports` + * ruff + * `unimport` * `vulture`!! * `yapf` * QML @@ -445,6 +506,7 @@ Notes: * Racket * `racket-langserver` * `raco` + * `raco_fmt` * Re:VIEW * `redpen` * ReasonML @@ -452,8 +514,13 @@ Notes: * `ols` * `reason-language-server` * `refmt` +* Rego + * `cspell` + * `opacheck` + * `opafmt` * reStructuredText - * `alex`!! + * `alex` + * `cspell` * `proselint` * `redpen` * `rstcheck` @@ -466,6 +533,7 @@ Notes: * `rpmlint` * Ruby * `brakeman`!! + * `cspell` * `debride` * `prettier` * `rails_best_practices`!! @@ -476,8 +544,10 @@ Notes: * `solargraph` * `sorbet` * `standardrb` + * `syntax_tree` * Rust * `cargo`!! + * `cspell` * `rls` * `rust-analyzer` * `rustc` (see |ale-integration-rust|) @@ -488,6 +558,7 @@ Notes: * `sass-lint` * `stylelint` * Scala + * `cspell` * `fsc` * `metals` * `sbtserver` @@ -508,8 +579,10 @@ Notes: * `solhint` * `solium` * SQL + * `dprint` * `pgformatter` * `sql-lint` + * `sqlfluff` * `sqlfmt` * `sqlformat` * `sqlint` @@ -522,6 +595,7 @@ Notes: * `svelteserver` * Swift * Apple `swift-format` + * `cspell` * `sourcekit-lsp` * `swiftformat` * `swiftlint` @@ -530,17 +604,21 @@ Notes: * Tcl * `nagelfar`!! * Terraform + * `checkov` * `terraform` * `terraform-fmt-fixer` * `terraform-ls` * `terraform-lsp` * `tflint` + * `tfsec` * Texinfo - * `alex`!! + * `alex` + * `cspell` * `proselint` * `write-good` * Text^ - * `alex`!! + * `alex` + * `cspell` * `languagetool`!! * `proselint` * `redpen` @@ -550,8 +628,12 @@ Notes: * Thrift * `thrift` * `thriftcheck` +* TOML + * `dprint` * TypeScript + * `cspell` * `deno` + * `dprint` * `eslint` * `fecs` * `prettier` @@ -580,23 +662,31 @@ Notes: * `vimls` * `vint` * Vim help^ - * `alex`!! + * `alex` * `proselint` * `write-good` * Vue + * `cspell` * `prettier` * `vls` + * `volar` +* WGSL + * `naga` * XHTML - * `alex`!! + * `alex` + * `cspell` * `proselint` * `write-good` * XML * `xmllint` * YAML + * `actionlint` * `circleci`!! + * `gitlablint` * `prettier` * `spectral` * `swaglint` + * `yaml-language-server` * `yamlfix` * `yamllint` * YANG @@ -604,6 +694,7 @@ Notes: * Zeek * `zeek`!! * Zig + * `zigfmt` * `zls` =============================================================================== diff --git a/vim-config/plugins/ale/doc/ale-swift.txt b/vim-config/plugins/ale/doc/ale-swift.txt index 6d53ca7c..a443eab8 100644 --- a/vim-config/plugins/ale/doc/ale-swift.txt +++ b/vim-config/plugins/ale/doc/ale-swift.txt @@ -19,7 +19,8 @@ Additionally, ALE tries to locate and use the nearest existing `.swift-format` configuration file. -g:ale_swift_appleswiftformat_executable *g:ale_swift_appleswiftformat_executable* +g:ale_swift_appleswiftformat_executable + *g:ale_swift_appleswiftformat_executable* *b:ale_swift_appleswiftformat_executable* Type: |String| Default: `'swift-format'` @@ -28,7 +29,8 @@ g:ale_swift_appleswiftformat_executable *g:ale_swift_appleswiftformat_executable `swift-format`. -g:ale_swift_appleswiftformat_use_swiftpm *g:ale_swift_appleswiftformat_use_swiftpm* +g:ale_swift_appleswiftformat_use_swiftpm + *g:ale_swift_appleswiftformat_use_swiftpm* *b:ale_swift_appleswiftformat_use_swiftpm* Type: |Number| Default: `0` @@ -40,6 +42,12 @@ g:ale_swift_appleswiftformat_use_swiftpm *g:ale_swift_appleswiftformat_use_swift See |ale-integrations-local-executables| +=============================================================================== +cspell *ale-swift-cspell* + +See |ale-cspell-options| + + =============================================================================== sourcekitlsp *ale-swift-sourcekitlsp* @@ -57,4 +65,3 @@ g:ale_sourcekit_lsp_executable *g:ale_sourcekit_lsp_executable* =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: - diff --git a/vim-config/plugins/ale/doc/ale-terraform.txt b/vim-config/plugins/ale/doc/ale-terraform.txt index 175bdf5c..91a7dd16 100644 --- a/vim-config/plugins/ale/doc/ale-terraform.txt +++ b/vim-config/plugins/ale/doc/ale-terraform.txt @@ -2,6 +2,25 @@ ALE Terraform Integration *ale-terraform-options* +=============================================================================== +checkov *ale-terraform-checkov* + +g:ale_terraform_checkov_executable *g:ale_terraform_checkov_executable* + *b:ale_terraform_checkov_executable* + + Type: |String| + Default: `'checkov'` + + This variable can be changed to use a different executable for checkov. + + +g:ale_terraform_checkov_options *g:ale_terraform_checkov_options* + *b:ale_terraform_checkov_options* + Type: |String| + Default: `''` + + This variable can be changed to set additional options for checkov. + =============================================================================== terraform-fmt-fixer *ale-terraform-fmt-fixer* @@ -95,6 +114,25 @@ g:ale_terraform_tflint_options *g:ale_terraform_tflint_options* to include '-f json' in your new value. +=============================================================================== +tfsec *ale-terraform-tfsec* + +g:ale_terraform_tfsec_executable *g:ale_terraform_tfsec_executable* + *b:ale_terraform_tfsec_executable* + + Type: |String| + Default: `'tfsec'` + + This variable can be changed to use a different executable for tfsec. + +g:ale_terraform_tfsec_options *g:ale_terraform_tfsec_options* + *b:ale_terraform_tfsec_options* + + Type: |String| + Default: `''` + + This variable can be changed to pass custom CLI flags to tfsec. + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-tex.txt b/vim-config/plugins/ale/doc/ale-tex.txt index ceb9fa81..fa0d827e 100644 --- a/vim-config/plugins/ale/doc/ale-tex.txt +++ b/vim-config/plugins/ale/doc/ale-tex.txt @@ -21,23 +21,28 @@ g:ale_tex_chktex_options *g:ale_tex_chktex_options* This variable can be changed to modify flags given to chktex. ------------------------------------------------------------------------------- +=============================================================================== +cspell *ale-tex-cspell* + +See |ale-cspell-options| + + +=============================================================================== lacheck *ale-tex-lacheck* g:ale_lacheck_executable *g:ale_lacheck_executable* *b:ale_lacheck_executable* Type: |String| - Default: '`lacheck`' + Default: `'lacheck'` This variable can be changed to change the path to lacheck. - =============================================================================== -latexindent *ale-tex-latexindent* +latexindent *ale-tex-latexindent* -g:ale_tex_latexindent_executable *g:ale_tex_latexindent_executable* - *b:ale_tex_latexindent_executable* +g:ale_tex_latexindent_executable *g:ale_tex_latexindent_executable* + *b:ale_tex_latexindent_executable* Type: |String| Default: `'latexindent'` @@ -52,26 +57,39 @@ g:ale_tex_latexindent_options *g:ale_tex_latexindent_options* This variable can be changed to modify flags given to latexindent. - =============================================================================== -texlab *ale-tex-texlab* +texlab *ale-tex-texlab* -g:ale_tex_texlab_executable *g:ale_tex_texlab_executable* - *b:ale_tex_texlab_executable* +g:ale_tex_texlab_executable *g:ale_tex_texlab_executable* + *b:ale_tex_texlab_executable* Type: |String| Default: `'texlab'` This variable can be changed to change the path to texlab. -g:ale_tex_texlab_options *g:ale_tex_texlab_options* - *b:ale_tex_texlab_options* +g:ale_tex_texlab_options *g:ale_tex_texlab_options* + *b:ale_tex_texlab_options* Type: |String| Default: `''` - This variable can be changed to modify flags given to texlab. + This variable can be changed to modify flags given to texlab command. + +g:ale_tex_texlab_config *g:ale_tex_texlab_config* + *b:ale_tex_texlab_config* + Type: |Dictionary| + Default: `{}` + + Dictionary containing LSP configuration settings used to initialize texlab + language server. Refer to texlab documentation for possible settings: + + https://github.com/latex-lsp/texlab/blob/master/docs/options.md + For example to set build onSave initialization setting: +> + let g:ale_tex_texlab_config = {"build":{"onSave":v:true}} +< =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-texinfo.txt b/vim-config/plugins/ale/doc/ale-texinfo.txt index f8ed342d..53d42b69 100644 --- a/vim-config/plugins/ale/doc/ale-texinfo.txt +++ b/vim-config/plugins/ale/doc/ale-texinfo.txt @@ -2,6 +2,12 @@ ALE Texinfo Integration *ale-texinfo-options* +=============================================================================== +cspell *ale-texinfo-cspell* + +See |ale-cspell-options| + + =============================================================================== write-good *ale-texinfo-write-good* @@ -9,4 +15,4 @@ See |ale-write-good-options| =============================================================================== -vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-text.txt b/vim-config/plugins/ale/doc/ale-text.txt index 913d7e61..4e4d0b2e 100644 --- a/vim-config/plugins/ale/doc/ale-text.txt +++ b/vim-config/plugins/ale/doc/ale-text.txt @@ -2,6 +2,12 @@ ALE Text Integration *ale-text-options* +============================================================================== +cspell *ale-text-cspell* + +See |ale-cspell-options| + + =============================================================================== textlint *ale-text-textlint* @@ -39,4 +45,4 @@ See |ale-write-good-options| =============================================================================== -vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-toml.txt b/vim-config/plugins/ale/doc/ale-toml.txt new file mode 100644 index 00000000..222a91f4 --- /dev/null +++ b/vim-config/plugins/ale/doc/ale-toml.txt @@ -0,0 +1,12 @@ +=============================================================================== +ALE TOML Integration *ale-toml-options* + + +=============================================================================== +dprint *ale-toml-dprint* + +See |ale-dprint-options| and https://dprint.dev/plugins/toml + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-typescript.txt b/vim-config/plugins/ale/doc/ale-typescript.txt index 8984e183..4a993793 100644 --- a/vim-config/plugins/ale/doc/ale-typescript.txt +++ b/vim-config/plugins/ale/doc/ale-typescript.txt @@ -2,6 +2,12 @@ ALE TypeScript Integration *ale-typescript-options* +=============================================================================== +cspell *ale-typescript-cspell* + +See |ale-cspell-options| + + =============================================================================== deno *ale-typescript-deno* @@ -23,10 +29,11 @@ g:ale_deno_lsp_project_root *g:ale_deno_lsp_project_root* executing the following steps in the given order: 1. Find an ancestor directory containing a tsconfig.json. - 2. Find an ancestory directory containing a .git folder. + 2. Find an ancestor directory containing a .git folder. 3. Use the directory of the current buffer (if the buffer was opened from a file). + g:ale_deno_unstable *g:ale_deno_unstable* *b:ale_deno_unstable* Type: |Number| @@ -34,13 +41,21 @@ g:ale_deno_unstable *g:ale_deno_unstable* Enable or disable unstable Deno features and APIs. -g:ale_deno_importMap *g:ale_deno_importMap* - *b:ale_deno_importMap* + +g:ale_deno_importMap *g:ale_deno_importMap* + *b:ale_deno_importMap* Type: |String| Default: `'import_map.json'` Specify the import map filename to load url maps in a deno project. + +=============================================================================== +dprint *ale-typescript-dprint* + +See |ale-dprint-options| and https://dprint.dev/plugins/typescript + + =============================================================================== eslint *ale-typescript-eslint* diff --git a/vim-config/plugins/ale/doc/ale-verilog.txt b/vim-config/plugins/ale/doc/ale-verilog.txt index 11e988bb..611ed2f9 100644 --- a/vim-config/plugins/ale/doc/ale-verilog.txt +++ b/vim-config/plugins/ale/doc/ale-verilog.txt @@ -134,7 +134,7 @@ g:ale_verilog_yosys_options *g:ale_verilog_yosys_options* Default: `'-Q -T -p ''read_verilog %s'''` This variable can be changed to modify the flags/options passed to 'yosys'. - By default, Yosys is an interative program. To obtain linting functionality, + By default, Yosys is an interactive program. To obtain linting functionality, the `'read_verilog'` command is used. diff --git a/vim-config/plugins/ale/doc/ale-vue.txt b/vim-config/plugins/ale/doc/ale-vue.txt index a2c2786f..40106b2b 100644 --- a/vim-config/plugins/ale/doc/ale-vue.txt +++ b/vim-config/plugins/ale/doc/ale-vue.txt @@ -2,6 +2,12 @@ ALE Vue Integration *ale-vue-options* +=============================================================================== +cspell *ale-vue-cspell* + +See |ale-cspell-options| + + =============================================================================== prettier *ale-vue-prettier* @@ -27,5 +33,36 @@ g:ale_vue_vls_use_global *g:ale_vue_vls_use_global* See |ale-integrations-local-executables| +=============================================================================== +volar *ale-vue-volar* + + It is required to have typescript installed in your project as your dev + dependency: `npm i -D typescript` + +g:ale_vue_volar_executable *g:ale_vue_volar_executable* + *b:ale_vue_volar_executable* + Type: |String| + Default: `'vue-language-server'` + + See |ale-integrations-local-executables| + + +g:ale_vue_volar_use_global *g:ale_vue_volar_use_global* + *b:ale_vue_volar_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:vue_volar_init_options *g:ale_vue_volar_init_options* + *b:ale_vue_volar_init_options* + Type: |Dictionary| + Default: `{ ... }` + + Default is too long to show here, take a look at it over + `ale_linters/vue/volar.vim` + + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-wgsl.txt b/vim-config/plugins/ale/doc/ale-wgsl.txt new file mode 100644 index 00000000..5254f43b --- /dev/null +++ b/vim-config/plugins/ale/doc/ale-wgsl.txt @@ -0,0 +1,17 @@ +=============================================================================== +ALE WGSL Integration *ale-wgsl-options* + + +=============================================================================== +naga *ale-wgsl-naga* + +g:ale_wgsl_naga_executable *g:ale_wgsl_naga_executable* + *b:ale_wgsl_naga_executable* + Type: |String| + Default: `'naga'` + + The executable that will be run for the `naga` linter. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-xhtml.txt b/vim-config/plugins/ale/doc/ale-xhtml.txt index 3cc639ef..10ca5b82 100644 --- a/vim-config/plugins/ale/doc/ale-xhtml.txt +++ b/vim-config/plugins/ale/doc/ale-xhtml.txt @@ -2,6 +2,12 @@ ALE XHTML Integration *ale-xhtml-options* +=============================================================================== +cspell *ale-xhtml-cspell* + +See |ale-cspell-options| + + =============================================================================== write-good *ale-xhtml-write-good* @@ -9,4 +15,4 @@ See |ale-write-good-options| =============================================================================== -vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-xml.txt b/vim-config/plugins/ale/doc/ale-xml.txt index e43fdefd..a7180df8 100644 --- a/vim-config/plugins/ale/doc/ale-xml.txt +++ b/vim-config/plugins/ale/doc/ale-xml.txt @@ -24,7 +24,7 @@ g:ale_xml_xmllint_options *g:ale_xml_xmllint_options* g:ale_xml_xmllint_indentsize *g:ale_xml_xmllint_indentsize* *b:ale_xml_xmllint_indentsize* Type: |Number| - Default: 2 + Default: `2` This variable can be sent to specify the amount of spaces used for indentation. diff --git a/vim-config/plugins/ale/doc/ale-yaml.txt b/vim-config/plugins/ale/doc/ale-yaml.txt index 65e0d069..b3450b87 100644 --- a/vim-config/plugins/ale/doc/ale-yaml.txt +++ b/vim-config/plugins/ale/doc/ale-yaml.txt @@ -2,6 +2,51 @@ ALE YAML Integration *ale-yaml-options* +=============================================================================== +actionlint *ale-yaml-actionlint* + +Website: https://github.com/rhysd/actionlint + + +Installation +------------------------------------------------------------------------------- + +See installation guide: https://github.com/rhysd/actionlint#quick-start + +This linter is disabled by default and must be enabled by setting `g:ale_linters`. +To enable it only for Github Action YAML files a configuration like this is +better: + +> + au BufRead,BufNewFile */.github/*/*.y{,a}ml + \ let b:ale_linters = {'yaml': ['actionlint']} +< + +Options +------------------------------------------------------------------------------- + +g:ale_yaml_actionlint_executable *g:ale_yaml_actionlint_executable* + *b:ale_yaml_actionlint_executable* + Type: |String| + Default: `'actionlint'` + + This variable can be set to change the path to actionlint. + +g:ale_yaml_actionlint_options *g:ale_yaml_actionlint_options* + *b:ale_yaml_actionlint_options* + + Type: |String| + Default: `''` + + This variable can be set to add extra options to actionlint executable. + + For example, to disable running `shellcheck` and `pyflakes` external commands, + you may want to set: +> + let g:ale_yaml_actionlint_options = '-shellcheck= -pyflakes=' +< + Please note that passing `-format` as option is not supported at the moment. + =============================================================================== circleci *ale-yaml-circleci* @@ -105,6 +150,59 @@ g:ale_yaml_swaglint_use_global *g:ale_yaml_swaglint_use_global* See |ale-integrations-local-executables| +=============================================================================== +yaml-language-server *ale-yaml-language-server* + +Website: https://github.com/redhat-developer/yaml-language-server + + +Installation +------------------------------------------------------------------------------- + +Install yaml-language-server either globally or locally: > + + npm install yaml-language-server -g # global + npm install yaml-language-server # local + + +Options +------------------------------------------------------------------------------- + +g:ale_yaml_ls_executable *g:ale_yaml_ls_executable* + *b:ale_yaml_ls_executable* + Type: |String| + Default: `'yaml-language-server'` + + This variable can be set to change the path to yaml-language-server. + + +g:ale_yaml_ls_config *g:ale_yaml_ls_config* + *b:ale_yaml_ls_config* + Type: |Dictionary| + Default: `{}` + + Dictionary containing configuration settings that will be passed to the + language server. For example, to enable schema store: > + { + \ 'yaml': { + \ 'schemaStore': { + \ 'enable': v:true, + \ }, + \ }, + \ } +< + Consult the yaml-language-server documentation for more information about + settings. + + +g:ale_yaml_ls_use_global *g:ale_yaml_ls_use_global* + *b:ale_yaml_ls_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + =============================================================================== yamlfix *ale-yaml-yamlfix* @@ -182,5 +280,52 @@ g:ale_yaml_yamllint_options *g:ale_yaml_yamllint_options* This variable can be set to pass additional options to yamllint. +=============================================================================== +gitlablint *ale-yaml-gitlablint* + +Website: https://github.com/elijah-roberts/gitlab-lint + + +Installation +------------------------------------------------------------------------------- + +Install yamllint in your a virtualenv directory, locally, or globally: > + + pip3 install gitlab_lint # After activating virtualenv + pip3 install --user gitlab_lint # Install to ~/.local/bin + sudo pip3 install gitlab_lint # Install globally + +See |g:ale_virtualenv_dir_names| for configuring how ALE searches for +virtualenv directories. + +Is recommended to use |g:ale_pattern_options| to enable this linter so it only +applies to 'gitlab-ci.yml' files and not all yaml files: +> + let g:ale_pattern_options = { + \ '.gitlab-ci\.yml$': { + \ 'ale_linters': ['gitlablint'], + \ }, + \} +< + +Options +------------------------------------------------------------------------------- + +g:ale_yaml_gitlablint_executable *g:ale_yaml_gitlablint_executable* + *b:ale_yaml_gitlablint_executable* + Type: |String| + Default: `'gll'` + + This variable can be set to change the path to gll. + + +g:ale_yaml_gitlablint_options *g:ale_yaml_gitlablint_options* + *b:ale_yaml_gitlablint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to gll. + + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/vim-config/plugins/ale/doc/ale-zig.txt b/vim-config/plugins/ale/doc/ale-zig.txt index 70a53bbb..cafa12a1 100644 --- a/vim-config/plugins/ale/doc/ale-zig.txt +++ b/vim-config/plugins/ale/doc/ale-zig.txt @@ -7,6 +7,18 @@ Integration Information Currently, the only supported linter for zig is zls. + +=============================================================================== +zigfmt *ale-zig-zigfmt* + +g:ale_zig_zigfmt_executable *g:ale_zig_zigfmt_executable* + *b:ale_zig_zigfmt_executable* + Type: |String| + Default: `'zig'` + + The executable that will be run for the `zig fmt` fixer. + + =============================================================================== zls *ale-zig-zls* diff --git a/vim-config/plugins/ale/doc/ale.txt b/vim-config/plugins/ale/doc/ale.txt index 6cc81784..949ceae0 100644 --- a/vim-config/plugins/ale/doc/ale.txt +++ b/vim-config/plugins/ale/doc/ale.txt @@ -17,17 +17,19 @@ CONTENTS *ale-contents* 5.1 Completion........................|ale-completion| 5.2 Go To Definition..................|ale-go-to-definition| 5.3 Go To Type Definition.............|ale-go-to-type-definition| - 5.4 Find References...................|ale-find-references| - 5.5 Hovering..........................|ale-hover| - 5.6 Symbol Search.....................|ale-symbol-search| - 5.7 Refactoring: Rename, Actions......|ale-refactor| + 5.4 Go To Implementation..............|ale-go-to-type-implementation| + 5.5 Find References...................|ale-find-references| + 5.6 Hovering..........................|ale-hover| + 5.7 Symbol Search.....................|ale-symbol-search| + 5.8 Refactoring: Rename, Actions......|ale-refactor| 6. Global Options.......................|ale-options| 6.1 Highlights........................|ale-highlights| 7. Linter/Fixer Options.................|ale-integration-options| 7.1 Options for alex..................|ale-alex-options| - 7.2 Options for languagetool..........|ale-languagetool-options| - 7.3 Options for write-good............|ale-write-good-options| - 7.4 Other Linter/Fixer Options........|ale-other-integration-options| + 7.2 Options for cspell................|ale-cspell-options| + 7.3 Options for languagetool..........|ale-languagetool-options| + 7.4 Options for write-good............|ale-write-good-options| + 7.5 Other Linter/Fixer Options........|ale-other-integration-options| 8. Commands/Keybinds....................|ale-commands| 9. API..................................|ale-api| 10. Special Thanks......................|ale-special-thanks| @@ -286,6 +288,12 @@ number of the buffer that ALE wants to check. sources should perform their checks on a buffer in the background asynchronously, so they don't interrupt editing. +|ale#other_source#ShowResults()| must not be called synchronously before +ALE's engine executes its code after the |ALEWantResults| event runs. If +there are immediate results to provide to ALE, a 0 millisecond timer with +|timer_start()| can be set instead up to call |ale#other_source#ShowResults()| +after ALE has first executed its engine code for its own sources. + A plugin might integrate its own checks with ALE like so: > augroup SomeGroupName @@ -363,12 +371,16 @@ are supported for running the commands. `process_with` An optional callback for post-processing. - The callback must accept two arguments, - `(buffer, output)`, which can be used for converting - the output from a command into lines to replace the - buffer's contents with. + The callback must accept arguments `(bufnr, output)`: + the buffer number undergoing fixing and the fixer's + output as a |List| of |String|s. It must return a |List| + of |String|s that will be the new contents of the + buffer. + + This callback is useful to remove excess lines from the + command's output or apply additional changes to the + output. - A |List| of |String|s must be returned. `read_buffer` An optional key for disabling reading the buffer. @@ -535,8 +547,10 @@ The |ALEComplete| command can be used to show completion suggestions manually, even when |g:ale_completion_enabled| is set to `0`. For manually requesting completion information with Deoplete, consult Deoplete's documentation. -ALE by can support automatic imports from external modules. This behavior can -be enabled by setting the |g:ale_completion_autoimport| variable to `1`. +ALE supports automatic imports from external modules. This behavior can be +disabled by setting the |g:ale_completion_autoimport| variable to `0`. +Disabling automatic imports can drop some or all completion items from +some LSP servers (e.g. eclipselsp). You can manually request imports for symbols at the cursor with the |ALEImport| command. The word at the cursor must be an exact match for some @@ -624,14 +638,23 @@ documentation for the command for configuring how the location will be displayed. ------------------------------------------------------------------------------- -5.4 Find References *ale-find-references* +5.4 Go To Implementation *ale-go-to-implementation* + +ALE supports jumping to the files and locations where symbols are implemented +through any enabled LSP linters. The locations ALE will jump to depend on the +information returned by LSP servers. The |ALEGoToImplementation| command will +jump to the implementation of symbols under the cursor. See the documentation +for the command for configuring how the location will be displayed. + +------------------------------------------------------------------------------- +5.5 Find References *ale-find-references* ALE supports finding references for symbols though any enabled LSP linters with the |ALEFindReferences| command. See the documentation for the command for a full list of options. ------------------------------------------------------------------------------- -5.5 Hovering *ale-hover* +5.6 Hovering *ale-hover* ALE supports "hover" information for printing brief information about symbols at the cursor taken from LSP linters. The following commands are supported: @@ -653,7 +676,8 @@ Hover information can be displayed in the preview window instead by setting When using Neovim or Vim with |popupwin|, if |g:ale_hover_to_floating_preview| or |g:ale_floating_preview| is set to 1, the hover information will show in a -floating window. And |g:ale_floating_window_border| for the border setting. +floating window. The borders of the floating preview window can be customized +by setting |g:ale_floating_window_border|. For Vim 8.1+ terminals, mouse hovering is disabled by default. Enabling |balloonexpr| commands in terminals can cause scrolling issues in terminals, @@ -673,18 +697,20 @@ Documentation for symbols at the cursor can be retrieved using the |ALEDocumentation| command. This command is only available for `tsserver`. ------------------------------------------------------------------------------- -5.6 Symbol Search *ale-symbol-search* +5.7 Symbol Search *ale-symbol-search* ALE supports searching for workspace symbols via LSP linters with the |ALESymbolSearch| command. See the documentation for the command for a full list of options. ------------------------------------------------------------------------------- -5.7 Refactoring: Rename, Actions *ale-refactor* +5.8 Refactoring: Rename, Actions *ale-refactor* 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 only). + |ALECodeAction| will execute actions on the cursor or applied to a visual range selection, such as automatically fixing errors. @@ -724,7 +750,7 @@ g:airline#extensions#ale#enabled *g:airline#extensions#ale#enabled* g:ale_cache_executable_check_failures *g:ale_cache_executable_check_failures* Type: |Number| - Default: undefined + Default: not set When set to `1`, ALE will cache failing executable checks for linters. By default, only executable checks which succeed will be cached. @@ -838,7 +864,7 @@ g:ale_completion_enabled *g:ale_completion_enabled* *g:ale_completion_tsserver_remove_warnings* g:ale_completion_tsserver_remove_warnings - Type: Number + Type: |Number| Default: `0` When this option is set to `0`, ALE will return all completion items, @@ -848,12 +874,14 @@ g:ale_completion_tsserver_remove_warnings g:ale_completion_autoimport *g:ale_completion_autoimport* - Type: Number - Default: `0` + Type: |Number| + Default: `1` - When this option is set to `0`, ALE will not try to automatically import - completion results from external modules. It can be enabled by setting it - to `1`. + When this option is set to `1`, ALE will try to automatically import + completion results from external modules. It can be disabled by setting it + to `0`. Some LSP servers include auto imports on every completion item so + disabling automatic imports may drop some or all completion items returnend + by it (e.g. eclipselsp). g:ale_completion_excluded_words *g:ale_completion_excluded_words* @@ -1035,7 +1063,8 @@ g:ale_echo_msg_format *g:ale_echo_msg_format* `%s` - replaced with the text for the problem `%...code...% `- replaced with the error code `%linter%` - replaced with the name of the linter - `%severity%` - replaced with the severity of the problem + `%severity%` - replaced with the severity of the problem (e.g. `Error`) + `%type%` - replaced with the type of the problem (e.g. `E`) The strings for `%severity%` can be configured with the following options. @@ -1206,17 +1235,45 @@ g:ale_floating_preview *g:ale_floating_preview* |g:ale_detail_to_floating_preview| to `1`. +g:ale_floating_preview_popup_opts *g:ale_floating_preview_popup_opts* + + Type: |String| or |Dictionary| + Default: `''` + + Either a dictionary of options or the string name of a function that returns a + dictionary of options. This will be used as an argument to |popup_create| for + Vim users or |nvim_open_win| for NeoVim users. Note that in either case, the + resulting dictionary is merged with ALE defaults rather than expliciting overriding + them. This only takes effect if |g:ale_floating_preview| is enabled. + + NOTE: for Vim users see |popup_create-arguments|, for NeoVim users see + |nvim_open_win| for argument details + + For example, to enhance popups with a title: > + + function! CustomOpts() abort { + let [l:info, l:loc] = ale#util#FindItemAtCursor(bufnr('')) + return {'title': ' ALE: ' . (l:loc.linter_name) . ' '} + endfunction +< + + g:ale_floating_window_border *g:ale_floating_window_border* Type: |List| - Default: `['|', '-', '+', '+', '+', '+']` + Default: `['|', '-', '+', '+', '+', '+', '|', '-']` When set to `[]`, window borders are disabled. The elements in the list set - the horizontal, top, top-left, top-right, bottom-right and bottom-left - border characters, respectively. + the the characters for the left side, top, top-left corner, top-right + corner, bottom-right corner, bottom-left corner, right side, and bottom of + the floating window, respectively. If the terminal supports Unicode, you might try setting the value to - ` ['│', '─', '╭', '╮', '╯', '╰']`, to make it look nicer. + ` ['│', '─', '╭', '╮', '╯', '╰', '│', '─']`, to make it look nicer. + + NOTE: For compatibility with previous versions, if the list does not have + elements for the right side and bottom, the left side and top will be used + instead. g:ale_history_enabled *g:ale_history_enabled* @@ -1439,9 +1496,9 @@ g:ale_linter_aliases *g:ale_linter_aliases* \ 'ps1': 'powershell', \ 'rmarkdown': 'r', \ 'rmd': 'r', - \ 'svelte': ['svelte', 'javascript'], \ 'systemverilog': 'verilog', \ 'typescriptreact': ['typescript', 'tsx'], + \ 'vader': ['vim', 'vader'], \ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'], \ 'vimwiki': 'markdown', \ 'vue': ['vue', 'javascript'], @@ -1585,16 +1642,21 @@ g:ale_linters *g:ale_linters* \ 'hack': ['hack'], \ 'help': [], \ 'inko': ['inko'], + \ 'json': ['jsonlint', 'spectral'], + \ 'json': ['jsonlint', 'spectral', 'vscodejson'], + \ 'json5': [], + \ 'jsonc': [], \ 'perl': ['perlcritic'], \ 'perl6': [], - \ 'python': ['flake8', 'mypy', 'pylint', 'pyright'], + \ 'python': ['flake8', 'mypy', 'pylint', 'pyright', 'ruff'], \ 'rust': ['cargo', 'rls'], \ 'spec': [], - \ 'svelte': ['eslint', 'svelteserver'], \ 'text': [], + \ 'vader': ['vimls'], \ 'vue': ['eslint', 'vls'], \ 'zsh': ['shell'], \ 'v': ['v'], + \ 'yaml': ['spectral', 'yaml-language-server', 'yamllint'], \} < This option can be used to enable only a particular set of linters for a @@ -1775,7 +1837,7 @@ g:ale_max_signs *g:ale_max_signs* g:ale_maximum_file_size *g:ale_maximum_file_size* *b:ale_maximum_file_size* Type: |Number| - Default: undefined + Default: not set A maximum file size in bytes for ALE to check. If set to any positive number, ALE will skip checking files larger than the given size. @@ -1790,6 +1852,9 @@ g:ale_open_list *g:ale_open_list* loclist (|lopen|) or for the quickfix list instead if |g:ale_set_quickfix| is `1`. (|copen|) + When set to any higher numberical value, ALE will only open the window when + the number of warnings or errors are at least that many. + When set to `'on_save'`, ALE will only open the loclist after buffers have been saved. The list will be opened some time after buffers are saved and any linter for a buffer returns results. @@ -1810,12 +1875,12 @@ g:ale_open_list *g:ale_open_list* autocmd! autocmd QuitPre * if empty(&buftype) | lclose | endif augroup END -< +< g:ale_pattern_options *g:ale_pattern_options* Type: |Dictionary| - Default: undefined + Default: not set This option maps regular expression patterns to |Dictionary| values for buffer variables. This option can be set to automatically configure @@ -1844,7 +1909,7 @@ g:ale_pattern_options *g:ale_pattern_options* g:ale_pattern_options_enabled *g:ale_pattern_options_enabled* Type: |Number| - Default: undefined + Default: not set This option can be used for disabling pattern options. If set to `0`, ALE will not set buffer variables per |g:ale_pattern_options|. @@ -1890,7 +1955,7 @@ g:ale_root *g:ale_root* *b:ale_root* Type: |Dictionary| or |String| - Default: {} + Default: `{}` This option is used to determine the project root for a linter. If the value is a |Dictionary|, it maps a linter to either a |String| containing the @@ -1942,7 +2007,7 @@ g:ale_set_balloons *g:ale_set_balloons* g:ale_set_balloons_legacy_echo *g:ale_set_balloons_legacy_echo* *b:ale_set_balloons_legacy_echo* Type: |Number| - Default: undefined + Default: not set If set to `1`, moving your mouse over documents in Vim will make ALE ask `tsserver` or `LSP` servers for information about the symbol where the mouse @@ -2008,7 +2073,7 @@ g:ale_set_quickfix *g:ale_set_quickfix* This feature should not be used in combination with tools for searching for matches and commands like |:cfdo|, as ALE will replace the quickfix list pretty frequently. If you wish to use such tools, you should populate the - loclist instead. + loclist or use |ALEPopulateQuickfix| instead. g:ale_set_signs *g:ale_set_signs* @@ -2071,6 +2136,7 @@ g:ale_sign_priority *g:ale_sign_priority* g:ale_shell *g:ale_shell* + *b:ale_shell* Type: |String| Default: not set @@ -2088,6 +2154,7 @@ g:ale_shell *g:ale_shell* g:ale_shell_arguments *g:ale_shell_arguments* + *b:ale_shell_arguments* Type: |String| Default: not set @@ -2174,10 +2241,10 @@ g:ale_sign_highlight_linenrs *g:ale_sign_highlight_linenrs* g:ale_update_tagstack *g:ale_update_tagstack* *b:ale_update_tagstack* - Type: |Number| - Default: `1` + Type: |Number| + Default: `1` - This option can be set to disable updating Vim's |tagstack| automatically. + This option can be set to disable updating Vim's |tagstack| automatically. g:ale_type_map *g:ale_type_map* @@ -2224,13 +2291,14 @@ g:ale_use_global_executables *g:ale_use_global_executables* g:ale_virtualtext_cursor *g:ale_virtualtext_cursor* Type: |Number| - Default: `0` + Default: `'all'` (if supported, otherwise `'disabled'`) + + This option controls how ALE will display problems using |virtual-text|. + The following values can be used. - When this option is set to `1`, a message will be shown when a cursor is - near a warning or error. ALE will attempt to find the warning or error at a - column nearest to the cursor when the cursor is resting on a line which - contains a warning or error. This option can be set to `0` to disable this - behavior. + `'all'`, `'2'`, or `2` - Show problems for all lines. + `'current'`, `'1'`, or `1` - Show problems for the current line. + `'disabled'`, `'0'`, or `0` - Do not show problems with virtual-text. Messages are only displayed after a short delay. See |g:ale_virtualtext_delay|. @@ -2247,7 +2315,6 @@ g:ale_virtualtext_cursor *g:ale_virtualtext_cursor* g:ale_virtualtext_delay *g:ale_virtualtext_delay* *b:ale_virtualtext_delay* - Type: |Number| Default: `10` @@ -2259,12 +2326,24 @@ g:ale_virtualtext_delay *g:ale_virtualtext_delay* g:ale_virtualtext_prefix *g:ale_virtualtext_prefix* - + *b:ale_virtualtext_prefix* Type: |String| - Default: `'> '` + Default: `'%comment% %type%: '` Prefix to be used with |g:ale_virtualtext_cursor|. + This setting can be changed in each buffer with `b:ale_virtualtext_prefix`. + + All of the same format markers used for |g:ale_echo_msg_format| can be used + for defining the prefix, including some additional sequences of characters. + + `%comment%` - replaced with comment characters in the current language + + ALE will read the comment characters from |&commentstring|, reading only the + part before `%s`, with whitespace trimmed. If comment syntax cannot be + pulled from |&commentstring|, ALE will default to `'#'`. + + g:ale_virtualenv_dir_names *g:ale_virtualenv_dir_names* *b:ale_virtualenv_dir_names* @@ -2441,7 +2520,7 @@ ALEStyleWarningSignLineNr *ALEStyleWarningSignLineNr* ALEVirtualTextError *ALEVirtualTextError* - Default: `highlight link ALEVirtualTextError ALEError` + Default: `highlight link ALEVirtualTextError Comment` The highlight for virtualtext errors. See |g:ale_virtualtext_cursor|. @@ -2469,7 +2548,7 @@ ALEVirtualTextStyleWarning *ALEVirtualTextStyleWarning* ALEVirtualTextWarning *ALEVirtualTextWarning* - Default: `highlight link ALEVirtualTextWarning ALEWarning` + Default: `highlight link ALEVirtualTextWarning Comment` The highlight for virtualtext errors. See |g:ale_virtualtext_cursor|. @@ -2564,7 +2643,80 @@ g:ale_alex_use_global *g:ale_alex_use_global* ------------------------------------------------------------------------------- -7.2. Options for languagetool *ale-languagetool-options* +7.2. Options for cspell *ale-cspell-options* + +The options for `cspell` are shared between all filetypes, so options can be +configured only once. + +g:ale_cspell_executable *g:ale_cspell_executable* + *b:ale_cspell_executable* + Type: |String| + Default: `'cspell'` + + See |ale-integrations-local-executables| + + +g:ale_cspell_options *g:ale_cspell_options* + *b:ale_cspell_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to `cspell`. + + +g:ale_cspell_use_global *g:ale_cspell_use_global* + *b:ale_cspell_use_global* + Type: |Number| + Default: `get(g: 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +------------------------------------------------------------------------------- +7.3. Options for dprint *ale-dprint-options* + +`dprint` is a fixer for many file types, including: (java|type)script, +json(c?), markdown, and more. See https://dprint.dev/plugins for an up-to-date +list of supported plugins and their configuration options. + +g:ale_dprint_executable *g:ale_dprint_executable* + *b:ale_dprint_executable* + Type: |String| + Default: `'dprint'` + + See |ale-integrations-local-executables| + + +g:ale_dprint_config *g:ale_dprint_config* + *b:ale_dprint_config* + Type: |String| + Default: `'dprint.json'` + + This variable can be changed to provide a config file to `dprint`. The + default is the nearest `dprint.json` searching upward from the current + buffer. + + See https://dprint.dev/config and https://plugins.dprint.dev + + +g:ale_dprint_options *g:ale_dprint_options* + *b:ale_dprint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to `dprint`. + + +g:ale_dprint_use_global *g:ale_dprint_use_global* + *b:ale_dprint_use_global* + Type: |Number| + Default: `get(g: 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +------------------------------------------------------------------------------- +7.4. Options for languagetool *ale-languagetool-options* g:ale_languagetool_executable *g:ale_languagetool_executable* *b:ale_languagetool_executable* @@ -2584,7 +2736,7 @@ g:ale_languagetool_options *g:ale_languagetool_options* ------------------------------------------------------------------------------- -7.3. Options for write-good *ale-write-good-options* +7.5. Options for write-good *ale-write-good-options* The options for `write-good` are shared between all filetypes, so options can be configured once. @@ -2614,25 +2766,30 @@ g:ale_writegood_use_global *g:ale_writegood_use_global* ------------------------------------------------------------------------------- -7.4. Other Linter/Fixer Options *ale-other-integration-options* +7.6. Other Linter/Fixer Options *ale-other-integration-options* ALE supports a very wide variety of tools. Other linter or fixer options are documented in additional help files. ada.....................................|ale-ada-options| + cspell................................|ale-ada-cspell| gcc...................................|ale-ada-gcc| gnatpp................................|ale-ada-gnatpp| ada-language-server...................|ale-ada-language-server| ansible.................................|ale-ansible-options| + ansible-language-server...............|ale-ansible-language-server| ansible-lint..........................|ale-ansible-ansible-lint| apkbuild................................|ale-apkbuild-options| apkbuild-lint.........................|ale-apkbuild-apkbuild-lint| secfixes-check........................|ale-apkbuild-secfixes-check| asciidoc................................|ale-asciidoc-options| + cspell................................|ale-asciidoc-cspell| write-good............................|ale-asciidoc-write-good| textlint..............................|ale-asciidoc-textlint| asm.....................................|ale-asm-options| gcc...................................|ale-asm-gcc| + avra....................................|ale-avra-options| + avra..................................|ale-avra-avra| awk.....................................|ale-awk-options| gawk..................................|ale-awk-gawk| bats....................................|ale-bats-options| @@ -2641,6 +2798,10 @@ documented in additional help files. buildifier............................|ale-bazel-buildifier| bib.....................................|ale-bib-options| bibclean..............................|ale-bib-bibclean| + bicep...................................|ale-bicep-options| + bicep.................................|ale-bicep-bicep| + bitbake.................................|ale-bitbake-options| + oelint-adv............................|ale-bitbake-oelint_adv| c.......................................|ale-c-options| astyle................................|ale-c-astyle| cc....................................|ale-c-cc| @@ -2650,8 +2811,11 @@ documented in additional help files. clangtidy.............................|ale-c-clangtidy| cppcheck..............................|ale-c-cppcheck| cquery................................|ale-c-cquery| + cspell................................|ale-c-cspell| flawfinder............................|ale-c-flawfinder| uncrustify............................|ale-c-uncrustify| + cairo...................................|ale-cairo-options| + starknet..............................|ale-cairo-starknet| chef....................................|ale-chef-options| cookstyle.............................|ale-chef-cookstyle| foodcritic............................|ale-chef-foodcritic| @@ -2662,6 +2826,7 @@ documented in additional help files. cfn-python-lint.......................|ale-cloudformation-cfn-python-lint| cmake...................................|ale-cmake-options| cmakelint.............................|ale-cmake-cmakelint| + cmake-lint............................|ale-cmake-cmake-lint| cmake-format..........................|ale-cmake-cmakeformat| cpp.....................................|ale-cpp-options| astyle................................|ale-cpp-astyle| @@ -2675,22 +2840,28 @@ documented in additional help files. cppcheck..............................|ale-cpp-cppcheck| cpplint...............................|ale-cpp-cpplint| cquery................................|ale-cpp-cquery| + cspell................................|ale-cpp-cspell| flawfinder............................|ale-cpp-flawfinder| uncrustify............................|ale-cpp-uncrustify| c#......................................|ale-cs-options| + clang-format..........................|ale-cs-clangformat| csc...................................|ale-cs-csc| + cspell................................|ale-cs-cspell| dotnet-format.........................|ale-cs-dotnet-format| mcs...................................|ale-cs-mcs| mcsc..................................|ale-cs-mcsc| uncrustify............................|ale-cs-uncrustify| css.....................................|ale-css-options| + cspell................................|ale-css-cspell| + css-beautify..........................|ale-css-css-beautify| fecs..................................|ale-css-fecs| prettier..............................|ale-css-prettier| stylelint.............................|ale-css-stylelint| + vscodecss.............................|ale-css-vscode| cuda....................................|ale-cuda-options| - nvcc..................................|ale-cuda-nvcc| - clangd................................|ale-cuda-clangd| clang-format..........................|ale-cuda-clangformat| + clangd................................|ale-cuda-clangd| + nvcc..................................|ale-cuda-nvcc| d.......................................|ale-d-options| dfmt..................................|ale-d-dfmt| dls...................................|ale-d-dls| @@ -2701,7 +2872,6 @@ documented in additional help files. analysis_server.......................|ale-dart-analysis_server| dart-analyze..........................|ale-dart-analyze| dart-format...........................|ale-dart-format| - dartanalyzer..........................|ale-dart-dartanalyzer| dartfmt...............................|ale-dart-dartfmt| desktop.................................|ale-desktop-options| desktop-file-validate.................|ale-desktop-desktop-file-validate| @@ -2711,6 +2881,7 @@ documented in additional help files. dhall-lint............................|ale-dhall-lint| dockerfile..............................|ale-dockerfile-options| dockerfile_lint.......................|ale-dockerfile-dockerfile_lint| + dprint................................|ale-dockerfile-dprint| hadolint..............................|ale-dockerfile-hadolint| elixir..................................|ale-elixir-options| mix...................................|ale-elixir-mix| @@ -2718,6 +2889,7 @@ documented in additional help files. dialyxir..............................|ale-elixir-dialyxir| elixir-ls.............................|ale-elixir-elixir-ls| credo.................................|ale-elixir-credo| + cspell................................|ale-elixir-cspell| elm.....................................|ale-elm-options| elm-format............................|ale-elm-elm-format| elm-ls................................|ale-elm-elm-ls| @@ -2725,6 +2897,7 @@ documented in additional help files. erlang..................................|ale-erlang-options| dialyzer..............................|ale-erlang-dialyzer| elvis.................................|ale-erlang-elvis| + erlang_ls.............................|ale-erlang-erlang_ls| erlc..................................|ale-erlang-erlc| erlfmt................................|ale-erlang-erlfmt| syntaxerl.............................|ale-erlang-syntaxerl| @@ -2746,8 +2919,10 @@ documented in additional help files. glslls................................|ale-glsl-glslls| go......................................|ale-go-options| bingo.................................|ale-go-bingo| + cspell................................|ale-go-cspell| gobuild...............................|ale-go-gobuild| gofmt.................................|ale-go-gofmt| + gofumpt...............................|ale-go-gofumpt| golangci-lint.........................|ale-go-golangci-lint| golangserver..........................|ale-go-golangserver| golines...............................|ale-go-golines| @@ -2770,6 +2945,7 @@ documented in additional help files. ember-template-lint...................|ale-handlebars-embertemplatelint| haskell.................................|ale-haskell-options| brittany..............................|ale-haskell-brittany| + cspell................................|ale-haskell-cspell| floskell..............................|ale-haskell-floskell| ghc...................................|ale-haskell-ghc| ghc-mod...............................|ale-haskell-ghc-mod| @@ -2785,15 +2961,20 @@ documented in additional help files. hie...................................|ale-haskell-hie| ormolu................................|ale-haskell-ormolu| hcl.....................................|ale-hcl-options| + packer-fmt............................|ale-hcl-packer-fmt| terraform-fmt.........................|ale-hcl-terraform-fmt| + help....................................|ale-help-options| + cspell................................|ale-help-cspell| html....................................|ale-html-options| angular...............................|ale-html-angular| + cspell................................|ale-html-cspell| fecs..................................|ale-html-fecs| html-beautify.........................|ale-html-beautify| htmlhint..............................|ale-html-htmlhint| prettier..............................|ale-html-prettier| stylelint.............................|ale-html-stylelint| tidy..................................|ale-html-tidy| + vscodehtml............................|ale-html-vscode| write-good............................|ale-html-write-good| idris...................................|ale-idris-options| idris.................................|ale-idris-idris| @@ -2805,6 +2986,8 @@ documented in additional help files. ispc..................................|ale-ispc-ispc| java....................................|ale-java-options| checkstyle............................|ale-java-checkstyle| + clang-format..........................|ale-java-clangformat| + cspell................................|ale-java-cspell| javac.................................|ale-java-javac| google-java-format....................|ale-java-google-java-format| pmd...................................|ale-java-pmd| @@ -2812,7 +2995,10 @@ documented in additional help files. eclipselsp............................|ale-java-eclipselsp| uncrustify............................|ale-java-uncrustify| javascript..............................|ale-javascript-options| + clang-format..........................|ale-javascript-clangformat| + cspell................................|ale-javascript-cspell| deno..................................|ale-javascript-deno| + dprint................................|ale-javascript-dprint| eslint................................|ale-javascript-eslint| fecs..................................|ale-javascript-fecs| flow..................................|ale-javascript-flow| @@ -2825,12 +3011,16 @@ documented in additional help files. standard..............................|ale-javascript-standard| xo....................................|ale-javascript-xo| json....................................|ale-json-options| + clang-format..........................|ale-json-clangformat| + cspell................................|ale-json-cspell| + dprint................................|ale-json-dprint| eslint................................|ale-json-eslint| fixjson...............................|ale-json-fixjson| jsonlint..............................|ale-json-jsonlint| jq....................................|ale-json-jq| prettier..............................|ale-json-prettier| spectral..............................|ale-json-spectral| + vscodejson............................|ale-json-vscode| jsonc...................................|ale-jsonc-options| eslint................................|ale-jsonc-eslint| jsonnet.................................|ale-jsonnet-options| @@ -2845,6 +3035,7 @@ documented in additional help files. ktlint................................|ale-kotlin-ktlint| languageserver........................|ale-kotlin-languageserver| latex...................................|ale-latex-options| + cspell................................|ale-latex-cspell| write-good............................|ale-latex-write-good| textlint..............................|ale-latex-textlint| less....................................|ale-less-options| @@ -2854,12 +3045,18 @@ documented in additional help files. llvm....................................|ale-llvm-options| llc...................................|ale-llvm-llc| lua.....................................|ale-lua-options| + cspell................................|ale-lua-cspell| lua-format............................|ale-lua-lua-format| luac..................................|ale-lua-luac| luacheck..............................|ale-lua-luacheck| luafmt................................|ale-lua-luafmt| + selene................................|ale-lua-selene| stylua................................|ale-lua-stylua| + make....................................|ale-make-options| + checkmake.............................|ale-make-checkmake| markdown................................|ale-markdown-options| + cspell................................|ale-markdown-cspell| + dprint................................|ale-markdown-dprint| markdownlint..........................|ale-markdown-markdownlint| mdl...................................|ale-markdown-mdl| pandoc................................|ale-markdown-pandoc| @@ -2878,18 +3075,21 @@ documented in additional help files. nix.....................................|ale-nix-options| nixfmt................................|ale-nix-nixfmt| nixpkgs-fmt...........................|ale-nix-nixpkgs-fmt| + statix................................|ale-nix-statix| nroff...................................|ale-nroff-options| write-good............................|ale-nroff-write-good| objc....................................|ale-objc-options| + ccls..................................|ale-objc-ccls| clang.................................|ale-objc-clang| + clang-format..........................|ale-objc-clangformat| clangd................................|ale-objc-clangd| uncrustify............................|ale-objc-uncrustify| - ccls..................................|ale-objc-ccls| objcpp..................................|ale-objcpp-options| clang.................................|ale-objcpp-clang| clangd................................|ale-objcpp-clangd| uncrustify............................|ale-objcpp-uncrustify| ocaml...................................|ale-ocaml-options| + dune..................................|ale-ocaml-dune| merlin................................|ale-ocaml-merlin| ocamllsp..............................|ale-ocaml-ocamllsp| ols...................................|ale-ocaml-ols| @@ -2899,6 +3099,10 @@ documented in additional help files. ibm_validator.........................|ale-openapi-ibm-validator| prettier..............................|ale-openapi-prettier| yamllint..............................|ale-openapi-yamllint| + openscad................................|ale-openscad-options| + sca2d.................................|ale-openscad-sca2d| + packer..................................|ale-packer-options| + packer-fmt-fixer......................|ale-packer-fmt-fixer| pascal..................................|ale-pascal-options| ptop..................................|ale-pascal-ptop| pawn....................................|ale-pawn-options| @@ -2910,6 +3114,7 @@ documented in additional help files. perl6...................................|ale-perl6-options| perl6.................................|ale-perl6-perl6| php.....................................|ale-php-options| + cspell................................|ale-php-cspell| langserver............................|ale-php-langserver| phan..................................|ale-php-phan| phpcbf................................|ale-php-phpcbf| @@ -2919,6 +3124,7 @@ documented in additional help files. psalm.................................|ale-php-psalm| php-cs-fixer..........................|ale-php-php-cs-fixer| php...................................|ale-php-php| + pint..................................|ale-php-pint| tlint.................................|ale-php-tlint| intelephense..........................|ale-php-intelephense| po......................................|ale-po-options| @@ -2927,12 +3133,16 @@ documented in additional help files. write-good............................|ale-pod-write-good| pony....................................|ale-pony-options| ponyc.................................|ale-pony-ponyc| - powershell............................|ale-powershell-options| - powershell..........................|ale-powershell-powershell| - psscriptanalyzer....................|ale-powershell-psscriptanalyzer| + powershell..............................|ale-powershell-options| + cspell................................|ale-powershell-cspell| + powershell............................|ale-powershell-powershell| + psscriptanalyzer......................|ale-powershell-psscriptanalyzer| prolog..................................|ale-prolog-options| swipl.................................|ale-prolog-swipl| proto...................................|ale-proto-options| + buf-format............................|ale-proto-buf-format| + buf-lint..............................|ale-proto-buf-lint| + clang-format..........................|ale-proto-clangformat| protoc-gen-lint.......................|ale-proto-protoc-gen-lint| protolint.............................|ale-proto-protolint| pug.....................................|ale-pug-options| @@ -2953,6 +3163,7 @@ documented in additional help files. autopep8..............................|ale-python-autopep8| bandit................................|ale-python-bandit| black.................................|ale-python-black| + cspell................................|ale-python-cspell| flake8................................|ale-python-flake8| flakehell.............................|ale-python-flakehell| isort.................................|ale-python-isort| @@ -2961,12 +3172,16 @@ documented in additional help files. pycodestyle...........................|ale-python-pycodestyle| pydocstyle............................|ale-python-pydocstyle| pyflakes..............................|ale-python-pyflakes| + pyflyby...............................|ale-python-pyflyby| pylama................................|ale-python-pylama| pylint................................|ale-python-pylint| pylsp.................................|ale-python-pylsp| pyre..................................|ale-python-pyre| pyright...............................|ale-python-pyright| + refurb................................|ale-python-refurb| reorder-python-imports................|ale-python-reorder_python_imports| + ruff..................................|ale-python-ruff| + unimport..............................|ale-python-unimport| vulture...............................|ale-python-vulture| yapf..................................|ale-python-yapf| qml.....................................|ale-qml-options| @@ -2975,18 +3190,27 @@ documented in additional help files. languageserver........................|ale-r-languageserver| lintr.................................|ale-r-lintr| styler................................|ale-r-styler| + racket..................................|ale-racket-options| + racket_langserver.....................|ale-racket-langserver| + raco_fmt..............................|ale-racket-raco-fmt| reasonml................................|ale-reasonml-options| merlin................................|ale-reasonml-merlin| ols...................................|ale-reasonml-ols| reason-language-server................|ale-reasonml-language-server| refmt.................................|ale-reasonml-refmt| + rego....................................|ale-rego-options| + cspell................................|ale-rego-cspell| + opacheck..............................|ale-rego-opa-check| + opafmt................................|ale-rego-opa-fmt-fixer| restructuredtext........................|ale-restructuredtext-options| + cspell................................|ale-restructuredtext-cspell| textlint..............................|ale-restructuredtext-textlint| write-good............................|ale-restructuredtext-write-good| robot...................................|ale-robot-options| rflint................................|ale-robot-rflint| ruby....................................|ale-ruby-options| brakeman..............................|ale-ruby-brakeman| + cspell................................|ale-ruby-cspell| debride...............................|ale-ruby-debride| prettier..............................|ale-ruby-prettier| rails_best_practices..................|ale-ruby-rails_best_practices| @@ -2997,9 +3221,11 @@ documented in additional help files. solargraph............................|ale-ruby-solargraph| sorbet................................|ale-ruby-sorbet| standardrb............................|ale-ruby-standardrb| + syntax_tree...........................|ale-ruby-syntax_tree| rust....................................|ale-rust-options| analyzer..............................|ale-rust-analyzer| cargo.................................|ale-rust-cargo| + cspell................................|ale-rust-cspell| rls...................................|ale-rust-rls| rustc.................................|ale-rust-rustc| rustfmt...............................|ale-rust-rustfmt| @@ -3009,6 +3235,7 @@ documented in additional help files. sasslint..............................|ale-sass-sasslint| stylelint.............................|ale-sass-stylelint| scala...................................|ale-scala-options| + cspell................................|ale-scala-cspell| metals................................|ale-scala-metals| sbtserver.............................|ale-scala-sbtserver| scalafmt..............................|ale-scala-scalafmt| @@ -3019,6 +3246,7 @@ documented in additional help files. stylelint.............................|ale-scss-stylelint| sh......................................|ale-sh-options| bashate...............................|ale-sh-bashate| + cspell................................|ale-sh-cspell| sh-language-server....................|ale-sh-language-server| shell.................................|ale-sh-shell| shellcheck............................|ale-sh-shellcheck| @@ -3032,7 +3260,9 @@ documented in additional help files. spec....................................|ale-spec-options| rpmlint...............................|ale-spec-rpmlint| sql.....................................|ale-sql-options| + dprint................................|ale-sql-dprint| pgformatter...........................|ale-sql-pgformatter| + sqlfluff..............................|ale-sql-sqlfluff| sqlfmt................................|ale-sql-sqlfmt| sqlformat.............................|ale-sql-sqlformat| stylus..................................|ale-stylus-options| @@ -3044,32 +3274,42 @@ documented in additional help files. svelteserver..........................|ale-svelte-svelteserver| swift...................................|ale-swift-options| apple-swift-format....................|ale-swift-apple-swift-format| + cspell................................|ale-swift-cspell| sourcekitlsp..........................|ale-swift-sourcekitlsp| systemd.................................|ale-systemd-options| systemd-analyze.......................|ale-systemd-analyze| tcl.....................................|ale-tcl-options| nagelfar..............................|ale-tcl-nagelfar| terraform...............................|ale-terraform-options| + checkov...............................|ale-terraform-checkov| terraform-fmt-fixer...................|ale-terraform-fmt-fixer| terraform.............................|ale-terraform-terraform| terraform-ls..........................|ale-terraform-terraform-ls| terraform-lsp.........................|ale-terraform-terraform-lsp| tflint................................|ale-terraform-tflint| + tfsec.................................|ale-terraform-tfsec| tex.....................................|ale-tex-options| chktex................................|ale-tex-chktex| + cspell................................|ale-tex-cspell| lacheck...............................|ale-tex-lacheck| latexindent...........................|ale-tex-latexindent| texlab................................|ale-tex-texlab| texinfo.................................|ale-texinfo-options| + cspell................................|ale-texinfo-cspell| write-good............................|ale-texinfo-write-good| text....................................|ale-text-options| + cspell................................|ale-text-cspell| textlint..............................|ale-text-textlint| write-good............................|ale-text-write-good| thrift..................................|ale-thrift-options| thrift................................|ale-thrift-thrift| thriftcheck...........................|ale-thrift-thriftcheck| + toml....................................|ale-toml-options| + dprint................................|ale-toml-dprint| typescript..............................|ale-typescript-options| + cspell................................|ale-typescript-cspell| deno..................................|ale-typescript-deno| + dprint................................|ale-typescript-dprint| eslint................................|ale-typescript-eslint| prettier..............................|ale-typescript-prettier| standard..............................|ale-typescript-standard| @@ -3099,24 +3339,33 @@ documented in additional help files. vimls.................................|ale-vim-vimls| vint..................................|ale-vim-vint| vue.....................................|ale-vue-options| + cspell................................|ale-vue-cspell| prettier..............................|ale-vue-prettier| vls...................................|ale-vue-vls| + volar.................................|ale-vue-volar| + wgsl....................................|ale-wgsl-options| + naga..................................|ale-wgsl-naga| xhtml...................................|ale-xhtml-options| + cspell................................|ale-xhtml-cspell| write-good............................|ale-xhtml-write-good| xml.....................................|ale-xml-options| xmllint...............................|ale-xml-xmllint| yaml....................................|ale-yaml-options| + actionlint............................|ale-yaml-actionlint| circleci..............................|ale-yaml-circleci| prettier..............................|ale-yaml-prettier| spectral..............................|ale-yaml-spectral| swaglint..............................|ale-yaml-swaglint| + yaml-language-server..................|ale-yaml-language-server| yamlfix...............................|ale-yaml-yamlfix| yamllint..............................|ale-yaml-yamllint| + gitlablint............................|ale-yaml-gitlablint| yang....................................|ale-yang-options| yang-lsp..............................|ale-yang-lsp| zeek....................................|ale-zeek-options| zeek..................................|ale-zeek-zeek| zig.....................................|ale-zig-options| + zigfmt................................|ale-zig-zigfmt| zls...................................|ale-zig-zls| @@ -3157,15 +3406,16 @@ ALEFindReferences *ALEFindReferences* The locations opened in different ways using the following variations. - `:ALEFindReferences -tab` - Open the location in a new tab. - `:ALEFindReferences -split` - Open the location in a horizontal split. - `:ALEFindReferences -vsplit` - Open the location in a vertical split. + `:ALEFindReferences -tab` - Open the location in a new tab. + `:ALEFindReferences -split` - Open the location in a horizontal split. + `:ALEFindReferences -vsplit` - Open the location in a vertical split. + `:ALEFindReferences -quickfix` - Put the locations into quickfix list. The default method used for navigating to a new location can be changed by modifying |g:ale_default_navigation|. You can add `-relative` to the command to view results with relatives paths, - instead of absolute paths. + instead of absolute paths. This option has no effect if `-quickfix` is used. The selection can be opened again with the |ALERepeatSelection| command. @@ -3256,6 +3506,33 @@ ALEGoToTypeDefinition *ALEGoToTypeDefinition* `(ale_go_to_type_definition_in_vsplit)` - `:ALEGoToTypeDefinition -vsplit` +ALEGoToImplementation *ALEGoToImplementation* + + This works similar to |ALEGoToDefinition| but instead jumps to the + implementation of symbol under the cursor. ALE will jump to a definition if + an LSP server provides a location to jump to. Otherwise, ALE will do nothing. + + The locations opened in different ways using the following variations. + + `:ALEGoToImplementation -tab` - Open the location in a new tab. + `:ALEGoToImplementation -split` - Open the location in a horizontal split. + `:ALEGoToImplementation -vsplit` - Open the location in a vertical split. + + The default method used for navigating to a new location can be changed + by modifying |g:ale_default_navigation|. + + You can jump back to the position you were at before going to the definition + of something with jump motions like CTRL-O. See |jump-motions|. + + The following Plug mappings are defined for this command, which correspond + to the following commands. + + `(ale_go_to_implementation)` - `:ALEGoToImplementation` + `(ale_go_to_implementation_in_tab)` - `:ALEGoToImplementation -tab` + `(ale_go_to_implementation_in_split)` - `:ALEGoToImplementation -split` + `(ale_go_to_implementation_in_vsplit)` - `:ALEGoToImplementation -vsplit` + + ALEHover *ALEHover* Print brief information about the symbol under the cursor, taken from any @@ -3298,6 +3575,13 @@ ALERename *ALERename* The symbol where the cursor is resting will be the symbol renamed, and a prompt will open to request a new name. + The rename operation will save all modified buffers when `set nohidden` is + set, because that disables leaving unsaved buffers in the background. See + `:help hidden` for more details. + +ALEFileRename *ALEFileRename* + + Rename a file and fix imports using `tsserver`. ALECodeAction *ALECodeAction* @@ -3345,6 +3629,20 @@ ALELintStop *ALELintStop* Any problems from previous linter results will continue to be shown. +ALEPopulateQuickfix *ALEPopulateQuickfix* +ALEPopulateLocList *ALEPopulateLocList* + + Manually populate the |quickfix| or |location-list| and show the + corresponding list. Useful when you have other uses for both the |quickfix| + and |location-list| and don't want them automatically populated. Be sure to + disable auto populating: > + + let g:ale_set_quickfix = 0 + let g:ale_set_loclist = 0 +< + With these settings, ALE will still run checking and display it with signs, + highlighting, and other output described in |ale-lint-file-linters|. + ALEPrevious *ALEPrevious* ALEPreviousWrap *ALEPreviousWrap* ALENext *ALENext* @@ -4286,7 +4584,7 @@ ALEFixPost *ALEFixPost-autocmd* These |User| autocommands are triggered before and after every lint or fix cycle. They can be used to update statuslines, send notifications, etc. The autocmd commands are run with |:silent|, so |:unsilent| is required for - echoing messges. + echoing messages. For example to change the color of the statusline while the linter is running: @@ -4319,7 +4617,7 @@ ALEJobStarted *ALEJobStarted-autocmd* ALELSPStarted *ALELSPStarted-autocmd* *ALELSPStarted* - This |User| autocommand is trigged immediately after an LSP connection is + This |User| autocommand is triggered immediately after an LSP connection is successfully initialized. This provides a way to perform any additional initialization work, such as setting up buffer-level mappings. diff --git a/vim-config/plugins/ale/doc/tags b/vim-config/plugins/ale/doc/tags deleted file mode 100644 index 3cf2bcb4..00000000 --- a/vim-config/plugins/ale/doc/tags +++ /dev/null @@ -1,2242 +0,0 @@ -:ALEDetail ale.txt /*:ALEDetail* -:ALEInfo ale.txt /*:ALEInfo* -:ALELint ale.txt /*:ALELint* -ALECodeAction ale.txt /*ALECodeAction* -ALEComplete ale.txt /*ALEComplete* -ALECompletePost ale.txt /*ALECompletePost* -ALECompletePost-autocmd ale.txt /*ALECompletePost-autocmd* -ALEDetail ale.txt /*ALEDetail* -ALEDisable ale.txt /*ALEDisable* -ALEDisableBuffer ale.txt /*ALEDisableBuffer* -ALEDocumentation ale.txt /*ALEDocumentation* -ALEEnable ale.txt /*ALEEnable* -ALEEnableBuffer ale.txt /*ALEEnableBuffer* -ALEError ale.txt /*ALEError* -ALEErrorLine ale.txt /*ALEErrorLine* -ALEErrorSign ale.txt /*ALEErrorSign* -ALEErrorSignLineNr ale.txt /*ALEErrorSignLineNr* -ALEFindReferences ale.txt /*ALEFindReferences* -ALEFirst ale.txt /*ALEFirst* -ALEFix ale.txt /*ALEFix* -ALEFixPost ale.txt /*ALEFixPost* -ALEFixPost-autocmd ale.txt /*ALEFixPost-autocmd* -ALEFixPre ale.txt /*ALEFixPre* -ALEFixPre-autocmd ale.txt /*ALEFixPre-autocmd* -ALEFixSuggest ale.txt /*ALEFixSuggest* -ALEGoToDefinition ale.txt /*ALEGoToDefinition* -ALEGoToTypeDefinition ale.txt /*ALEGoToTypeDefinition* -ALEHover ale.txt /*ALEHover* -ALEImport ale.txt /*ALEImport* -ALEInfo ale.txt /*ALEInfo* -ALEInfo-highlight ale.txt /*ALEInfo-highlight* -ALEInfo. ale.txt /*ALEInfo.* -ALEInfoLine ale.txt /*ALEInfoLine* -ALEInfoSign ale.txt /*ALEInfoSign* -ALEInfoSignLineNr ale.txt /*ALEInfoSignLineNr* -ALEInfoToClipboard ale.txt /*ALEInfoToClipboard* -ALEJobStarted ale.txt /*ALEJobStarted* -ALEJobStarted-autocmd ale.txt /*ALEJobStarted-autocmd* -ALELSPStarted ale.txt /*ALELSPStarted* -ALELSPStarted-autocmd ale.txt /*ALELSPStarted-autocmd* -ALELast ale.txt /*ALELast* -ALELint ale.txt /*ALELint* -ALELintPost ale.txt /*ALELintPost* -ALELintPost-autocmd ale.txt /*ALELintPost-autocmd* -ALELintPre ale.txt /*ALELintPre* -ALELintPre-autocmd ale.txt /*ALELintPre-autocmd* -ALELintStop ale.txt /*ALELintStop* -ALENext ale.txt /*ALENext* -ALENextWrap ale.txt /*ALENextWrap* -ALEOrganizeImports ale.txt /*ALEOrganizeImports* -ALEPrevious ale.txt /*ALEPrevious* -ALEPreviousWrap ale.txt /*ALEPreviousWrap* -ALERename ale.txt /*ALERename* -ALERepeatSelection ale.txt /*ALERepeatSelection* -ALEReset ale.txt /*ALEReset* -ALEResetBuffer ale.txt /*ALEResetBuffer* -ALEStopAllLSPs ale.txt /*ALEStopAllLSPs* -ALEStyleError ale.txt /*ALEStyleError* -ALEStyleErrorSign ale.txt /*ALEStyleErrorSign* -ALEStyleErrorSignLineNr ale.txt /*ALEStyleErrorSignLineNr* -ALEStyleWarning ale.txt /*ALEStyleWarning* -ALEStyleWarningSign ale.txt /*ALEStyleWarningSign* -ALEStyleWarningSignLineNr ale.txt /*ALEStyleWarningSignLineNr* -ALESymbolSearch ale.txt /*ALESymbolSearch* -ALEToggle ale.txt /*ALEToggle* -ALEToggleBuffer ale.txt /*ALEToggleBuffer* -ALEVirtualTextError ale.txt /*ALEVirtualTextError* -ALEVirtualTextInfo ale.txt /*ALEVirtualTextInfo* -ALEVirtualTextStyleError ale.txt /*ALEVirtualTextStyleError* -ALEVirtualTextStyleWarning ale.txt /*ALEVirtualTextStyleWarning* -ALEVirtualTextWarning ale.txt /*ALEVirtualTextWarning* -ALEWantResults ale.txt /*ALEWantResults* -ALEWantResults-autocmd ale.txt /*ALEWantResults-autocmd* -ALEWarning ale.txt /*ALEWarning* -ALEWarningLine ale.txt /*ALEWarningLine* -ALEWarningSign ale.txt /*ALEWarningSign* -ALEWarningSignLineNr ale.txt /*ALEWarningSignLineNr* -ale ale.txt /*ale* -ale#Env() ale.txt /*ale#Env()* -ale#GetFilenameMappings() ale.txt /*ale#GetFilenameMappings()* -ale#Has() ale.txt /*ale#Has()* -ale#Pad() ale.txt /*ale#Pad()* -ale#Queue() ale.txt /*ale#Queue()* -ale#command#CreateDirectory() ale.txt /*ale#command#CreateDirectory()* -ale#command#CreateFile() ale.txt /*ale#command#CreateFile()* -ale#command#EscapeCommandPart() ale.txt /*ale#command#EscapeCommandPart()* -ale#command#ManageDirectory() ale.txt /*ale#command#ManageDirectory()* -ale#command#ManageFile() ale.txt /*ale#command#ManageFile()* -ale#command#Run() ale.txt /*ale#command#Run()* -ale#completion#OmniFunc() ale.txt /*ale#completion#OmniFunc()* -ale#engine#GetLoclist() ale.txt /*ale#engine#GetLoclist()* -ale#engine#IsCheckingBuffer() ale.txt /*ale#engine#IsCheckingBuffer()* -ale#fix#registry#Add() ale.txt /*ale#fix#registry#Add()* -ale#linter#Define() ale.txt /*ale#linter#Define()* -ale#linter#Get() ale.txt /*ale#linter#Get()* -ale#linter#PreventLoading() ale.txt /*ale#linter#PreventLoading()* -ale#lsp_linter#SendRequest() ale.txt /*ale#lsp_linter#SendRequest()* -ale#other_source#ShowResults() ale.txt /*ale#other_source#ShowResults()* -ale#other_source#StartChecking() ale.txt /*ale#other_source#StartChecking()* -ale#statusline#Count() ale.txt /*ale#statusline#Count()* -ale#statusline#FirstProblem() ale.txt /*ale#statusline#FirstProblem()* -ale-ada-gcc ale-ada.txt /*ale-ada-gcc* -ale-ada-gnatpp ale-ada.txt /*ale-ada-gnatpp* -ale-ada-language-server ale-ada.txt /*ale-ada-language-server* -ale-ada-options ale-ada.txt /*ale-ada-options* -ale-alex-options ale.txt /*ale-alex-options* -ale-ansible-ansible-lint ale-ansible.txt /*ale-ansible-ansible-lint* -ale-ansible-options ale-ansible.txt /*ale-ansible-options* -ale-api ale.txt /*ale-api* -ale-apkbuild-apkbuild-lint ale-apkbuild.txt /*ale-apkbuild-apkbuild-lint* -ale-apkbuild-options ale-apkbuild.txt /*ale-apkbuild-options* -ale-apkbuild-secfixes-check ale-apkbuild.txt /*ale-apkbuild-secfixes-check* -ale-asciidoc-options ale-asciidoc.txt /*ale-asciidoc-options* -ale-asciidoc-textlint ale-asciidoc.txt /*ale-asciidoc-textlint* -ale-asciidoc-write-good ale-asciidoc.txt /*ale-asciidoc-write-good* -ale-asm-gcc ale-asm.txt /*ale-asm-gcc* -ale-asm-options ale-asm.txt /*ale-asm-options* -ale-asyncomplete-integration ale.txt /*ale-asyncomplete-integration* -ale-awk-gawk ale-awk.txt /*ale-awk-gawk* -ale-awk-options ale-awk.txt /*ale-awk-options* -ale-bats-options ale-bats.txt /*ale-bats-options* -ale-bats-shellcheck ale-bats.txt /*ale-bats-shellcheck* -ale-bazel-buildifier ale-bazel.txt /*ale-bazel-buildifier* -ale-bazel-options ale-bazel.txt /*ale-bazel-options* -ale-bib-bibclean ale-bib.txt /*ale-bib-bibclean* -ale-bib-options ale-bib.txt /*ale-bib-options* -ale-c-astyle ale-c.txt /*ale-c-astyle* -ale-c-cc ale-c.txt /*ale-c-cc* -ale-c-ccls ale-c.txt /*ale-c-ccls* -ale-c-clang ale-c.txt /*ale-c-clang* -ale-c-clangd ale-c.txt /*ale-c-clangd* -ale-c-clangformat ale-c.txt /*ale-c-clangformat* -ale-c-clangtidy ale-c.txt /*ale-c-clangtidy* -ale-c-cppcheck ale-c.txt /*ale-c-cppcheck* -ale-c-cquery ale-c.txt /*ale-c-cquery* -ale-c-flawfinder ale-c.txt /*ale-c-flawfinder* -ale-c-gcc ale-c.txt /*ale-c-gcc* -ale-c-options ale-c.txt /*ale-c-options* -ale-c-uncrustify ale-c.txt /*ale-c-uncrustify* -ale-chef-cookstyle ale-chef.txt /*ale-chef-cookstyle* -ale-chef-foodcritic ale-chef.txt /*ale-chef-foodcritic* -ale-chef-options ale-chef.txt /*ale-chef-options* -ale-clojure-clj-kondo ale-clojure.txt /*ale-clojure-clj-kondo* -ale-clojure-joker ale-clojure.txt /*ale-clojure-joker* -ale-clojure-options ale-clojure.txt /*ale-clojure-options* -ale-cloudformation-cfn-python-lint ale-cloudformation.txt /*ale-cloudformation-cfn-python-lint* -ale-cloudformation-options ale-cloudformation.txt /*ale-cloudformation-options* -ale-cmake-cmakeformat ale-cmake.txt /*ale-cmake-cmakeformat* -ale-cmake-cmakelint ale-cmake.txt /*ale-cmake-cmakelint* -ale-cmake-options ale-cmake.txt /*ale-cmake-options* -ale-coding-standards ale-development.txt /*ale-coding-standards* -ale-command-format-strings ale.txt /*ale-command-format-strings* -ale-commands ale.txt /*ale-commands* -ale-completion ale.txt /*ale-completion* -ale-completion-completeopt-bug ale.txt /*ale-completion-completeopt-bug* -ale-completion-fallback ale.txt /*ale-completion-fallback* -ale-contact ale.txt /*ale-contact* -ale-contents ale.txt /*ale-contents* -ale-cool-down ale.txt /*ale-cool-down* -ale-cpp-astyle ale-cpp.txt /*ale-cpp-astyle* -ale-cpp-cc ale-cpp.txt /*ale-cpp-cc* -ale-cpp-ccls ale-cpp.txt /*ale-cpp-ccls* -ale-cpp-clang ale-cpp.txt /*ale-cpp-clang* -ale-cpp-clangcheck ale-cpp.txt /*ale-cpp-clangcheck* -ale-cpp-clangd ale-cpp.txt /*ale-cpp-clangd* -ale-cpp-clangformat ale-cpp.txt /*ale-cpp-clangformat* -ale-cpp-clangtidy ale-cpp.txt /*ale-cpp-clangtidy* -ale-cpp-clazy ale-cpp.txt /*ale-cpp-clazy* -ale-cpp-cppcheck ale-cpp.txt /*ale-cpp-cppcheck* -ale-cpp-cpplint ale-cpp.txt /*ale-cpp-cpplint* -ale-cpp-cquery ale-cpp.txt /*ale-cpp-cquery* -ale-cpp-flawfinder ale-cpp.txt /*ale-cpp-flawfinder* -ale-cpp-gcc ale-cpp.txt /*ale-cpp-gcc* -ale-cpp-options ale-cpp.txt /*ale-cpp-options* -ale-cpp-uncrustify ale-cpp.txt /*ale-cpp-uncrustify* -ale-cs-csc ale-cs.txt /*ale-cs-csc* -ale-cs-dotnet-format ale-cs.txt /*ale-cs-dotnet-format* -ale-cs-mcs ale-cs.txt /*ale-cs-mcs* -ale-cs-mcsc ale-cs.txt /*ale-cs-mcsc* -ale-cs-options ale-cs.txt /*ale-cs-options* -ale-cs-uncrustify ale-cs.txt /*ale-cs-uncrustify* -ale-css-fecs ale-css.txt /*ale-css-fecs* -ale-css-options ale-css.txt /*ale-css-options* -ale-css-prettier ale-css.txt /*ale-css-prettier* -ale-css-stylelint ale-css.txt /*ale-css-stylelint* -ale-cuda-clangd ale-cuda.txt /*ale-cuda-clangd* -ale-cuda-clangformat ale-cuda.txt /*ale-cuda-clangformat* -ale-cuda-nvcc ale-cuda.txt /*ale-cuda-nvcc* -ale-cuda-options ale-cuda.txt /*ale-cuda-options* -ale-d-dfmt ale-d.txt /*ale-d-dfmt* -ale-d-dls ale-d.txt /*ale-d-dls* -ale-d-options ale-d.txt /*ale-d-options* -ale-d-uncrustify ale-d.txt /*ale-d-uncrustify* -ale-dafny-dafny ale-dafny.txt /*ale-dafny-dafny* -ale-dafny-options ale-dafny.txt /*ale-dafny-options* -ale-dart-analysis_server ale-dart.txt /*ale-dart-analysis_server* -ale-dart-analyze ale-dart.txt /*ale-dart-analyze* -ale-dart-dartanalyzer ale-dart.txt /*ale-dart-dartanalyzer* -ale-dart-dartfmt ale-dart.txt /*ale-dart-dartfmt* -ale-dart-format ale-dart.txt /*ale-dart-format* -ale-dart-options ale-dart.txt /*ale-dart-options* -ale-deoplete-integration ale.txt /*ale-deoplete-integration* -ale-design-goals ale-development.txt /*ale-design-goals* -ale-desktop-desktop-file-validate ale-desktop.txt /*ale-desktop-desktop-file-validate* -ale-desktop-options ale-desktop.txt /*ale-desktop-options* -ale-dev ale-development.txt /*ale-dev* -ale-dev-tests ale-development.txt /*ale-dev-tests* -ale-development ale-development.txt /*ale-development* -ale-development-contents ale-development.txt /*ale-development-contents* -ale-development-fixer-tests ale-development.txt /*ale-development-fixer-tests* -ale-development-introduction ale-development.txt /*ale-development-introduction* -ale-development-linter-tests ale-development.txt /*ale-development-linter-tests* -ale-development-tests ale-development.txt /*ale-development-tests* -ale-development-windows-tests ale-development.txt /*ale-development-windows-tests* -ale-development.txt ale-development.txt /*ale-development.txt* -ale-dhall-format ale-dhall.txt /*ale-dhall-format* -ale-dhall-freeze ale-dhall.txt /*ale-dhall-freeze* -ale-dhall-lint ale-dhall.txt /*ale-dhall-lint* -ale-dhall-options ale-dhall.txt /*ale-dhall-options* -ale-dockerfile-dockerfile_lint ale-dockerfile.txt /*ale-dockerfile-dockerfile_lint* -ale-dockerfile-hadolint ale-dockerfile.txt /*ale-dockerfile-hadolint* -ale-dockerfile-options ale-dockerfile.txt /*ale-dockerfile-options* -ale-elixir-credo ale-elixir.txt /*ale-elixir-credo* -ale-elixir-dialyxir ale-elixir.txt /*ale-elixir-dialyxir* -ale-elixir-elixir-ls ale-elixir.txt /*ale-elixir-elixir-ls* -ale-elixir-mix ale-elixir.txt /*ale-elixir-mix* -ale-elixir-mix-format ale-elixir.txt /*ale-elixir-mix-format* -ale-elixir-options ale-elixir.txt /*ale-elixir-options* -ale-elm-elm-format ale-elm.txt /*ale-elm-elm-format* -ale-elm-elm-ls ale-elm.txt /*ale-elm-elm-ls* -ale-elm-elm-make ale-elm.txt /*ale-elm-elm-make* -ale-elm-options ale-elm.txt /*ale-elm-options* -ale-erlang-dialyzer ale-erlang.txt /*ale-erlang-dialyzer* -ale-erlang-elvis ale-erlang.txt /*ale-erlang-elvis* -ale-erlang-erlc ale-erlang.txt /*ale-erlang-erlc* -ale-erlang-erlfmt ale-erlang.txt /*ale-erlang-erlfmt* -ale-erlang-options ale-erlang.txt /*ale-erlang-options* -ale-erlang-syntaxerl ale-erlang.txt /*ale-erlang-syntaxerl* -ale-eruby-erblint ale-eruby.txt /*ale-eruby-erblint* -ale-eruby-options ale-eruby.txt /*ale-eruby-options* -ale-eruby-ruumba ale-eruby.txt /*ale-eruby-ruumba* -ale-eslint-nested-configuration-files ale-javascript.txt /*ale-eslint-nested-configuration-files* -ale-find-references ale.txt /*ale-find-references* -ale-fish-fish_indent ale-fish.txt /*ale-fish-fish_indent* -ale-fish-options ale-fish.txt /*ale-fish-options* -ale-fix ale.txt /*ale-fix* -ale-fix-configuration ale.txt /*ale-fix-configuration* -ale-fortran-gcc ale-fortran.txt /*ale-fortran-gcc* -ale-fortran-language-server ale-fortran.txt /*ale-fortran-language-server* -ale-fortran-options ale-fortran.txt /*ale-fortran-options* -ale-fountain-options ale-fountain.txt /*ale-fountain-options* -ale-fuse-fusionlint ale-fuse.txt /*ale-fuse-fusionlint* -ale-fuse-options ale-fuse.txt /*ale-fuse-options* -ale-gitcommit-gitlint ale-gitcommit.txt /*ale-gitcommit-gitlint* -ale-gitcommit-options ale-gitcommit.txt /*ale-gitcommit-options* -ale-glsl-glslang ale-glsl.txt /*ale-glsl-glslang* -ale-glsl-glslls ale-glsl.txt /*ale-glsl-glslls* -ale-glsl-options ale-glsl.txt /*ale-glsl-options* -ale-go-bingo ale-go.txt /*ale-go-bingo* -ale-go-gobuild ale-go.txt /*ale-go-gobuild* -ale-go-gofmt ale-go.txt /*ale-go-gofmt* -ale-go-golangci-lint ale-go.txt /*ale-go-golangci-lint* -ale-go-golangserver ale-go.txt /*ale-go-golangserver* -ale-go-golines ale-go.txt /*ale-go-golines* -ale-go-golint ale-go.txt /*ale-go-golint* -ale-go-gometalinter ale-go.txt /*ale-go-gometalinter* -ale-go-gopls ale-go.txt /*ale-go-gopls* -ale-go-govet ale-go.txt /*ale-go-govet* -ale-go-options ale-go.txt /*ale-go-options* -ale-go-revive ale-go.txt /*ale-go-revive* -ale-go-staticcheck ale-go.txt /*ale-go-staticcheck* -ale-go-to-definition ale.txt /*ale-go-to-definition* -ale-go-to-type-definition ale.txt /*ale-go-to-type-definition* -ale-graphql-eslint ale-graphql.txt /*ale-graphql-eslint* -ale-graphql-gqlint ale-graphql.txt /*ale-graphql-gqlint* -ale-graphql-options ale-graphql.txt /*ale-graphql-options* -ale-graphql-prettier ale-graphql.txt /*ale-graphql-prettier* -ale-hack-hack ale-hack.txt /*ale-hack-hack* -ale-hack-hackfmt ale-hack.txt /*ale-hack-hackfmt* -ale-hack-hhast ale-hack.txt /*ale-hack-hhast* -ale-hack-options ale-hack.txt /*ale-hack-options* -ale-handlebars-embertemplatelint ale-handlebars.txt /*ale-handlebars-embertemplatelint* -ale-handlebars-options ale-handlebars.txt /*ale-handlebars-options* -ale-handlebars-prettier ale-handlebars.txt /*ale-handlebars-prettier* -ale-haskell-brittany ale-haskell.txt /*ale-haskell-brittany* -ale-haskell-cabal-ghc ale-haskell.txt /*ale-haskell-cabal-ghc* -ale-haskell-floskell ale-haskell.txt /*ale-haskell-floskell* -ale-haskell-ghc ale-haskell.txt /*ale-haskell-ghc* -ale-haskell-ghc-mod ale-haskell.txt /*ale-haskell-ghc-mod* -ale-haskell-hdevtools ale-haskell.txt /*ale-haskell-hdevtools* -ale-haskell-hfmt ale-haskell.txt /*ale-haskell-hfmt* -ale-haskell-hie ale-haskell.txt /*ale-haskell-hie* -ale-haskell-hindent ale-haskell.txt /*ale-haskell-hindent* -ale-haskell-hlint ale-haskell.txt /*ale-haskell-hlint* -ale-haskell-hls ale-haskell.txt /*ale-haskell-hls* -ale-haskell-options ale-haskell.txt /*ale-haskell-options* -ale-haskell-ormolu ale-haskell.txt /*ale-haskell-ormolu* -ale-haskell-stack-build ale-haskell.txt /*ale-haskell-stack-build* -ale-haskell-stack-ghc ale-haskell.txt /*ale-haskell-stack-ghc* -ale-haskell-stylish-haskell ale-haskell.txt /*ale-haskell-stylish-haskell* -ale-hcl-options ale-hcl.txt /*ale-hcl-options* -ale-hcl-terraform-fmt ale-hcl.txt /*ale-hcl-terraform-fmt* -ale-highlights ale.txt /*ale-highlights* -ale-hover ale.txt /*ale-hover* -ale-html-angular ale-html.txt /*ale-html-angular* -ale-html-beautify ale-html.txt /*ale-html-beautify* -ale-html-fecs ale-html.txt /*ale-html-fecs* -ale-html-htmlhint ale-html.txt /*ale-html-htmlhint* -ale-html-options ale-html.txt /*ale-html-options* -ale-html-prettier ale-html.txt /*ale-html-prettier* -ale-html-stylelint ale-html.txt /*ale-html-stylelint* -ale-html-tidy ale-html.txt /*ale-html-tidy* -ale-html-write-good ale-html.txt /*ale-html-write-good* -ale-idris-idris ale-idris.txt /*ale-idris-idris* -ale-idris-options ale-idris.txt /*ale-idris-options* -ale-ink-language-server ale-ink.txt /*ale-ink-language-server* -ale-ink-options ale-ink.txt /*ale-ink-options* -ale-inko-inko ale-inko.txt /*ale-inko-inko* -ale-inko-options ale-inko.txt /*ale-inko-options* -ale-integration-glsl ale-glsl.txt /*ale-integration-glsl* -ale-integration-hack ale-hack.txt /*ale-integration-hack* -ale-integration-inko ale-inko.txt /*ale-integration-inko* -ale-integration-kotlin ale-kotlin.txt /*ale-integration-kotlin* -ale-integration-options ale.txt /*ale-integration-options* -ale-integration-rust ale-rust.txt /*ale-integration-rust* -ale-integration-spec ale-spec.txt /*ale-integration-spec* -ale-integration-zeek ale-zeek.txt /*ale-integration-zeek* -ale-integration-zig ale-zig.txt /*ale-integration-zig* -ale-integrations-local-executables ale.txt /*ale-integrations-local-executables* -ale-introduction ale.txt /*ale-introduction* -ale-ispc-ispc ale-ispc.txt /*ale-ispc-ispc* -ale-ispc-options ale-ispc.txt /*ale-ispc-options* -ale-java-checkstyle ale-java.txt /*ale-java-checkstyle* -ale-java-eclipselsp ale-java.txt /*ale-java-eclipselsp* -ale-java-google-java-format ale-java.txt /*ale-java-google-java-format* -ale-java-javac ale-java.txt /*ale-java-javac* -ale-java-javalsp ale-java.txt /*ale-java-javalsp* -ale-java-options ale-java.txt /*ale-java-options* -ale-java-pmd ale-java.txt /*ale-java-pmd* -ale-java-uncrustify ale-java.txt /*ale-java-uncrustify* -ale-javascript-deno ale-javascript.txt /*ale-javascript-deno* -ale-javascript-eslint ale-javascript.txt /*ale-javascript-eslint* -ale-javascript-fecs ale-javascript.txt /*ale-javascript-fecs* -ale-javascript-flow ale-javascript.txt /*ale-javascript-flow* -ale-javascript-importjs ale-javascript.txt /*ale-javascript-importjs* -ale-javascript-jscs ale-javascript.txt /*ale-javascript-jscs* -ale-javascript-jshint ale-javascript.txt /*ale-javascript-jshint* -ale-javascript-options ale-javascript.txt /*ale-javascript-options* -ale-javascript-prettier ale-javascript.txt /*ale-javascript-prettier* -ale-javascript-prettier-eslint ale-javascript.txt /*ale-javascript-prettier-eslint* -ale-javascript-prettier-standard ale-javascript.txt /*ale-javascript-prettier-standard* -ale-javascript-standard ale-javascript.txt /*ale-javascript-standard* -ale-javascript-xo ale-javascript.txt /*ale-javascript-xo* -ale-json-eslint ale-json.txt /*ale-json-eslint* -ale-json-fixjson ale-json.txt /*ale-json-fixjson* -ale-json-jq ale-json.txt /*ale-json-jq* -ale-json-jsonlint ale-json.txt /*ale-json-jsonlint* -ale-json-options ale-json.txt /*ale-json-options* -ale-json-prettier ale-json.txt /*ale-json-prettier* -ale-json-spectral ale-json.txt /*ale-json-spectral* -ale-json5-eslint ale-json5.txt /*ale-json5-eslint* -ale-json5-options ale-json5.txt /*ale-json5-options* -ale-jsonc-eslint ale-jsonc.txt /*ale-jsonc-eslint* -ale-jsonc-options ale-jsonc.txt /*ale-jsonc-options* -ale-jsonnet-jsonnet-lint ale-jsonnet.txt /*ale-jsonnet-jsonnet-lint* -ale-jsonnet-jsonnetfmt ale-jsonnet.txt /*ale-jsonnet-jsonnetfmt* -ale-jsonnet-options ale-jsonnet.txt /*ale-jsonnet-options* -ale-julia-languageserver ale-julia.txt /*ale-julia-languageserver* -ale-julia-options ale-julia.txt /*ale-julia-options* -ale-kotlin-kotlinc ale-kotlin.txt /*ale-kotlin-kotlinc* -ale-kotlin-ktlint ale-kotlin.txt /*ale-kotlin-ktlint* -ale-kotlin-languageserver ale-kotlin.txt /*ale-kotlin-languageserver* -ale-kotlin-options ale-kotlin.txt /*ale-kotlin-options* -ale-languagetool-options ale.txt /*ale-languagetool-options* -ale-latex-options ale-latex.txt /*ale-latex-options* -ale-latex-textlint ale-latex.txt /*ale-latex-textlint* -ale-latex-write-good ale-latex.txt /*ale-latex-write-good* -ale-less-lessc ale-less.txt /*ale-less-lessc* -ale-less-options ale-less.txt /*ale-less-options* -ale-less-prettier ale-less.txt /*ale-less-prettier* -ale-less-stylelint ale-less.txt /*ale-less-stylelint* -ale-lint ale.txt /*ale-lint* -ale-lint-file ale.txt /*ale-lint-file* -ale-lint-file-linters ale.txt /*ale-lint-file-linters* -ale-lint-language-servers ale.txt /*ale-lint-language-servers* -ale-lint-other-machines ale.txt /*ale-lint-other-machines* -ale-lint-other-sources ale.txt /*ale-lint-other-sources* -ale-lint-settings-on-startup ale.txt /*ale-lint-settings-on-startup* -ale-linter-loading-behavior ale.txt /*ale-linter-loading-behavior* -ale-linting-interrupts-mapping ale.txt /*ale-linting-interrupts-mapping* -ale-llvm-llc ale-llvm.txt /*ale-llvm-llc* -ale-llvm-options ale-llvm.txt /*ale-llvm-options* -ale-loclist-format ale.txt /*ale-loclist-format* -ale-lsp ale.txt /*ale-lsp* -ale-lsp-linters ale.txt /*ale-lsp-linters* -ale-lua-lua-format ale-lua.txt /*ale-lua-lua-format* -ale-lua-luac ale-lua.txt /*ale-lua-luac* -ale-lua-luacheck ale-lua.txt /*ale-lua-luacheck* -ale-lua-luafmt ale-lua.txt /*ale-lua-luafmt* -ale-lua-options ale-lua.txt /*ale-lua-options* -ale-lua-stylua ale-lua.txt /*ale-lua-stylua* -ale-markdown-markdownlint ale-markdown.txt /*ale-markdown-markdownlint* -ale-markdown-mdl ale-markdown.txt /*ale-markdown-mdl* -ale-markdown-options ale-markdown.txt /*ale-markdown-options* -ale-markdown-pandoc ale-markdown.txt /*ale-markdown-pandoc* -ale-markdown-prettier ale-markdown.txt /*ale-markdown-prettier* -ale-markdown-remark-lint ale-markdown.txt /*ale-markdown-remark-lint* -ale-markdown-textlint ale-markdown.txt /*ale-markdown-textlint* -ale-markdown-write-good ale-markdown.txt /*ale-markdown-write-good* -ale-mercury-mmc ale-mercury.txt /*ale-mercury-mmc* -ale-mercury-options ale-mercury.txt /*ale-mercury-options* -ale-nasm-nasm ale-nasm.txt /*ale-nasm-nasm* -ale-nasm-options ale-nasm.txt /*ale-nasm-options* -ale-navigation-commands ale.txt /*ale-navigation-commands* -ale-nim-nimcheck ale-nim.txt /*ale-nim-nimcheck* -ale-nim-nimlsp ale-nim.txt /*ale-nim-nimlsp* -ale-nim-nimpretty ale-nim.txt /*ale-nim-nimpretty* -ale-nim-options ale-nim.txt /*ale-nim-options* -ale-nix-nixfmt ale-nix.txt /*ale-nix-nixfmt* -ale-nix-nixpkgs-fmt ale-nix.txt /*ale-nix-nixpkgs-fmt* -ale-nix-options ale-nix.txt /*ale-nix-options* -ale-nroff-options ale-nroff.txt /*ale-nroff-options* -ale-nroff-write-good ale-nroff.txt /*ale-nroff-write-good* -ale-objc-ccls ale-objc.txt /*ale-objc-ccls* -ale-objc-clang ale-objc.txt /*ale-objc-clang* -ale-objc-clangd ale-objc.txt /*ale-objc-clangd* -ale-objc-options ale-objc.txt /*ale-objc-options* -ale-objc-uncrustify ale-objc.txt /*ale-objc-uncrustify* -ale-objcpp-clang ale-objcpp.txt /*ale-objcpp-clang* -ale-objcpp-clangd ale-objcpp.txt /*ale-objcpp-clangd* -ale-objcpp-options ale-objcpp.txt /*ale-objcpp-options* -ale-objcpp-uncrustify ale-objcpp.txt /*ale-objcpp-uncrustify* -ale-ocaml-merlin ale-ocaml.txt /*ale-ocaml-merlin* -ale-ocaml-ocamlformat ale-ocaml.txt /*ale-ocaml-ocamlformat* -ale-ocaml-ocamllsp ale-ocaml.txt /*ale-ocaml-ocamllsp* -ale-ocaml-ocp-indent ale-ocaml.txt /*ale-ocaml-ocp-indent* -ale-ocaml-ols ale-ocaml.txt /*ale-ocaml-ols* -ale-ocaml-options ale-ocaml.txt /*ale-ocaml-options* -ale-openapi-ibm-validator ale-openapi.txt /*ale-openapi-ibm-validator* -ale-openapi-options ale-openapi.txt /*ale-openapi-options* -ale-openapi-prettier ale-openapi.txt /*ale-openapi-prettier* -ale-openapi-yamllint ale-openapi.txt /*ale-openapi-yamllint* -ale-options ale.txt /*ale-options* -ale-other-integration-options ale.txt /*ale-other-integration-options* -ale-pascal-options ale-pascal.txt /*ale-pascal-options* -ale-pascal-ptop ale-pascal.txt /*ale-pascal-ptop* -ale-pawn-options ale-pawn.txt /*ale-pawn-options* -ale-pawn-uncrustify ale-pawn.txt /*ale-pawn-uncrustify* -ale-perl-options ale-perl.txt /*ale-perl-options* -ale-perl-perl ale-perl.txt /*ale-perl-perl* -ale-perl-perlcritic ale-perl.txt /*ale-perl-perlcritic* -ale-perl-perltidy ale-perl.txt /*ale-perl-perltidy* -ale-perl6-options ale-perl6.txt /*ale-perl6-options* -ale-perl6-perl6 ale-perl6.txt /*ale-perl6-perl6* -ale-php-intelephense ale-php.txt /*ale-php-intelephense* -ale-php-langserver ale-php.txt /*ale-php-langserver* -ale-php-options ale-php.txt /*ale-php-options* -ale-php-phan ale-php.txt /*ale-php-phan* -ale-php-php ale-php.txt /*ale-php-php* -ale-php-php-cs-fixer ale-php.txt /*ale-php-php-cs-fixer* -ale-php-phpcbf ale-php.txt /*ale-php-phpcbf* -ale-php-phpcs ale-php.txt /*ale-php-phpcs* -ale-php-phpmd ale-php.txt /*ale-php-phpmd* -ale-php-phpstan ale-php.txt /*ale-php-phpstan* -ale-php-psalm ale-php.txt /*ale-php-psalm* -ale-php-tlint ale-php.txt /*ale-php-tlint* -ale-po-options ale-po.txt /*ale-po-options* -ale-po-write-good ale-po.txt /*ale-po-write-good* -ale-pod-options ale-pod.txt /*ale-pod-options* -ale-pod-write-good ale-pod.txt /*ale-pod-write-good* -ale-pony-options ale-pony.txt /*ale-pony-options* -ale-pony-ponyc ale-pony.txt /*ale-pony-ponyc* -ale-powershell-options ale-powershell.txt /*ale-powershell-options* -ale-powershell-powershell ale-powershell.txt /*ale-powershell-powershell* -ale-powershell-psscriptanalyzer ale-powershell.txt /*ale-powershell-psscriptanalyzer* -ale-prolog-options ale-prolog.txt /*ale-prolog-options* -ale-prolog-swipl ale-prolog.txt /*ale-prolog-swipl* -ale-proto-options ale-proto.txt /*ale-proto-options* -ale-proto-protoc-gen-lint ale-proto.txt /*ale-proto-protoc-gen-lint* -ale-proto-protolint ale-proto.txt /*ale-proto-protolint* -ale-pug-options ale-pug.txt /*ale-pug-options* -ale-pug-puglint ale-pug.txt /*ale-pug-puglint* -ale-puppet-languageserver ale-puppet.txt /*ale-puppet-languageserver* -ale-puppet-options ale-puppet.txt /*ale-puppet-options* -ale-puppet-puppet ale-puppet.txt /*ale-puppet-puppet* -ale-puppet-puppetlint ale-puppet.txt /*ale-puppet-puppetlint* -ale-purescript-language-server ale-purescript.txt /*ale-purescript-language-server* -ale-purescript-options ale-purescript.txt /*ale-purescript-options* -ale-purescript-purty ale-purescript.txt /*ale-purescript-purty* -ale-purescript-tidy ale-purescript.txt /*ale-purescript-tidy* -ale-pyrex-cython ale-pyrex.txt /*ale-pyrex-cython* -ale-pyrex-options ale-pyrex.txt /*ale-pyrex-options* -ale-python-autoflake ale-python.txt /*ale-python-autoflake* -ale-python-autoimport ale-python.txt /*ale-python-autoimport* -ale-python-autopep8 ale-python.txt /*ale-python-autopep8* -ale-python-bandit ale-python.txt /*ale-python-bandit* -ale-python-black ale-python.txt /*ale-python-black* -ale-python-flake8 ale-python.txt /*ale-python-flake8* -ale-python-flakehell ale-python.txt /*ale-python-flakehell* -ale-python-isort ale-python.txt /*ale-python-isort* -ale-python-mypy ale-python.txt /*ale-python-mypy* -ale-python-options ale-python.txt /*ale-python-options* -ale-python-prospector ale-python.txt /*ale-python-prospector* -ale-python-pycodestyle ale-python.txt /*ale-python-pycodestyle* -ale-python-pydocstyle ale-python.txt /*ale-python-pydocstyle* -ale-python-pyflakes ale-python.txt /*ale-python-pyflakes* -ale-python-pylama ale-python.txt /*ale-python-pylama* -ale-python-pylint ale-python.txt /*ale-python-pylint* -ale-python-pylsp ale-python.txt /*ale-python-pylsp* -ale-python-pyre ale-python.txt /*ale-python-pyre* -ale-python-pyright ale-python.txt /*ale-python-pyright* -ale-python-reorder_python_imports ale-python.txt /*ale-python-reorder_python_imports* -ale-python-root ale-python.txt /*ale-python-root* -ale-python-vulture ale-python.txt /*ale-python-vulture* -ale-python-yapf ale-python.txt /*ale-python-yapf* -ale-qml-options ale-qml.txt /*ale-qml-options* -ale-qml-qmlfmt ale-qml.txt /*ale-qml-qmlfmt* -ale-r-languageserver ale-r.txt /*ale-r-languageserver* -ale-r-lintr ale-r.txt /*ale-r-lintr* -ale-r-options ale-r.txt /*ale-r-options* -ale-r-styler ale-r.txt /*ale-r-styler* -ale-reasonml-language-server ale-reasonml.txt /*ale-reasonml-language-server* -ale-reasonml-merlin ale-reasonml.txt /*ale-reasonml-merlin* -ale-reasonml-ols ale-reasonml.txt /*ale-reasonml-ols* -ale-reasonml-options ale-reasonml.txt /*ale-reasonml-options* -ale-reasonml-refmt ale-reasonml.txt /*ale-reasonml-refmt* -ale-refactor ale.txt /*ale-refactor* -ale-restructuredtext-options ale-restructuredtext.txt /*ale-restructuredtext-options* -ale-restructuredtext-textlint ale-restructuredtext.txt /*ale-restructuredtext-textlint* -ale-restructuredtext-write-good ale-restructuredtext.txt /*ale-restructuredtext-write-good* -ale-robot-options ale-robot.txt /*ale-robot-options* -ale-robot-rflint ale-robot.txt /*ale-robot-rflint* -ale-ruby-brakeman ale-ruby.txt /*ale-ruby-brakeman* -ale-ruby-debride ale-ruby.txt /*ale-ruby-debride* -ale-ruby-options ale-ruby.txt /*ale-ruby-options* -ale-ruby-prettier ale-ruby.txt /*ale-ruby-prettier* -ale-ruby-rails_best_practices ale-ruby.txt /*ale-ruby-rails_best_practices* -ale-ruby-reek ale-ruby.txt /*ale-ruby-reek* -ale-ruby-rubocop ale-ruby.txt /*ale-ruby-rubocop* -ale-ruby-ruby ale-ruby.txt /*ale-ruby-ruby* -ale-ruby-rufo ale-ruby.txt /*ale-ruby-rufo* -ale-ruby-solargraph ale-ruby.txt /*ale-ruby-solargraph* -ale-ruby-sorbet ale-ruby.txt /*ale-ruby-sorbet* -ale-ruby-standardrb ale-ruby.txt /*ale-ruby-standardrb* -ale-rust-analyzer ale-rust.txt /*ale-rust-analyzer* -ale-rust-cargo ale-rust.txt /*ale-rust-cargo* -ale-rust-options ale-rust.txt /*ale-rust-options* -ale-rust-rls ale-rust.txt /*ale-rust-rls* -ale-rust-rustc ale-rust.txt /*ale-rust-rustc* -ale-rust-rustfmt ale-rust.txt /*ale-rust-rustfmt* -ale-sass-options ale-sass.txt /*ale-sass-options* -ale-sass-sasslint ale-sass.txt /*ale-sass-sasslint* -ale-sass-stylelint ale-sass.txt /*ale-sass-stylelint* -ale-scala-metals ale-scala.txt /*ale-scala-metals* -ale-scala-options ale-scala.txt /*ale-scala-options* -ale-scala-sbtserver ale-scala.txt /*ale-scala-sbtserver* -ale-scala-scalafmt ale-scala.txt /*ale-scala-scalafmt* -ale-scala-scalastyle ale-scala.txt /*ale-scala-scalastyle* -ale-scss-options ale-scss.txt /*ale-scss-options* -ale-scss-prettier ale-scss.txt /*ale-scss-prettier* -ale-scss-sasslint ale-scss.txt /*ale-scss-sasslint* -ale-scss-stylelint ale-scss.txt /*ale-scss-stylelint* -ale-sh-bashate ale-sh.txt /*ale-sh-bashate* -ale-sh-language-server ale-sh.txt /*ale-sh-language-server* -ale-sh-options ale-sh.txt /*ale-sh-options* -ale-sh-shell ale-sh.txt /*ale-sh-shell* -ale-sh-shellcheck ale-sh.txt /*ale-sh-shellcheck* -ale-sh-shfmt ale-sh.txt /*ale-sh-shfmt* -ale-sml-options ale-sml.txt /*ale-sml-options* -ale-sml-smlnj ale-sml.txt /*ale-sml-smlnj* -ale-sml-smlnj-cm ale-sml.txt /*ale-sml-smlnj-cm* -ale-solidity-options ale-solidity.txt /*ale-solidity-options* -ale-solidity-solc ale-solidity.txt /*ale-solidity-solc* -ale-solidity-solhint ale-solidity.txt /*ale-solidity-solhint* -ale-solidity-solium ale-solidity.txt /*ale-solidity-solium* -ale-spec-options ale-spec.txt /*ale-spec-options* -ale-spec-rpmlint ale-spec.txt /*ale-spec-rpmlint* -ale-special-thanks ale.txt /*ale-special-thanks* -ale-sql-options ale-sql.txt /*ale-sql-options* -ale-sql-pgformatter ale-sql.txt /*ale-sql-pgformatter* -ale-sql-sqlfmt ale-sql.txt /*ale-sql-sqlfmt* -ale-sql-sqlformat ale-sql.txt /*ale-sql-sqlformat* -ale-stylus-options ale-stylus.txt /*ale-stylus-options* -ale-stylus-stylelint ale-stylus.txt /*ale-stylus-stylelint* -ale-sugarss-options ale-sugarss.txt /*ale-sugarss-options* -ale-sugarss-stylelint ale-sugarss.txt /*ale-sugarss-stylelint* -ale-support ale.txt /*ale-support* -ale-supported-languages-and-tools.txt ale-supported-languages-and-tools.txt /*ale-supported-languages-and-tools.txt* -ale-supported-list ale-supported-languages-and-tools.txt /*ale-supported-list* -ale-svelte-options ale-svelte.txt /*ale-svelte-options* -ale-svelte-prettier ale-svelte.txt /*ale-svelte-prettier* -ale-svelte-svelteserver ale-svelte.txt /*ale-svelte-svelteserver* -ale-swift-apple-swift-format ale-swift.txt /*ale-swift-apple-swift-format* -ale-swift-options ale-swift.txt /*ale-swift-options* -ale-swift-sourcekitlsp ale-swift.txt /*ale-swift-sourcekitlsp* -ale-symbol-search ale.txt /*ale-symbol-search* -ale-symbols ale.txt /*ale-symbols* -ale-systemd-analyze ale-systemd.txt /*ale-systemd-analyze* -ale-systemd-options ale-systemd.txt /*ale-systemd-options* -ale-tcl-nagelfar ale-tcl.txt /*ale-tcl-nagelfar* -ale-tcl-options ale-tcl.txt /*ale-tcl-options* -ale-terraform-fmt-fixer ale-terraform.txt /*ale-terraform-fmt-fixer* -ale-terraform-options ale-terraform.txt /*ale-terraform-options* -ale-terraform-terraform ale-terraform.txt /*ale-terraform-terraform* -ale-terraform-terraform-ls ale-terraform.txt /*ale-terraform-terraform-ls* -ale-terraform-terraform-lsp ale-terraform.txt /*ale-terraform-terraform-lsp* -ale-terraform-tflint ale-terraform.txt /*ale-terraform-tflint* -ale-tests ale-development.txt /*ale-tests* -ale-tex-chktex ale-tex.txt /*ale-tex-chktex* -ale-tex-lacheck ale-tex.txt /*ale-tex-lacheck* -ale-tex-latexindent ale-tex.txt /*ale-tex-latexindent* -ale-tex-options ale-tex.txt /*ale-tex-options* -ale-tex-texlab ale-tex.txt /*ale-tex-texlab* -ale-texinfo-options ale-texinfo.txt /*ale-texinfo-options* -ale-texinfo-write-good ale-texinfo.txt /*ale-texinfo-write-good* -ale-text-options ale-text.txt /*ale-text-options* -ale-text-textlint ale-text.txt /*ale-text-textlint* -ale-text-write-good ale-text.txt /*ale-text-write-good* -ale-thrift-options ale-thrift.txt /*ale-thrift-options* -ale-thrift-thrift ale-thrift.txt /*ale-thrift-thrift* -ale-thrift-thriftcheck ale-thrift.txt /*ale-thrift-thriftcheck* -ale-typescript-deno ale-typescript.txt /*ale-typescript-deno* -ale-typescript-eslint ale-typescript.txt /*ale-typescript-eslint* -ale-typescript-options ale-typescript.txt /*ale-typescript-options* -ale-typescript-prettier ale-typescript.txt /*ale-typescript-prettier* -ale-typescript-standard ale-typescript.txt /*ale-typescript-standard* -ale-typescript-tslint ale-typescript.txt /*ale-typescript-tslint* -ale-typescript-tsserver ale-typescript.txt /*ale-typescript-tsserver* -ale-typescript-xo ale-typescript.txt /*ale-typescript-xo* -ale-v-options ale-v.txt /*ale-v-options* -ale-v-v ale-v.txt /*ale-v-v* -ale-v-vfmt ale-v.txt /*ale-v-vfmt* -ale-vala-options ale-vala.txt /*ale-vala-options* -ale-vala-uncrustify ale-vala.txt /*ale-vala-uncrustify* -ale-vala-vala-lint ale-vala.txt /*ale-vala-vala-lint* -ale-verilog-hdl-checker ale-verilog.txt /*ale-verilog-hdl-checker* -ale-verilog-iverilog ale-verilog.txt /*ale-verilog-iverilog* -ale-verilog-options ale-verilog.txt /*ale-verilog-options* -ale-verilog-verilator ale-verilog.txt /*ale-verilog-verilator* -ale-verilog-vlog ale-verilog.txt /*ale-verilog-vlog* -ale-verilog-xvlog ale-verilog.txt /*ale-verilog-xvlog* -ale-verilog-yosys ale-verilog.txt /*ale-verilog-yosys* -ale-vhdl-ghdl ale-vhdl.txt /*ale-vhdl-ghdl* -ale-vhdl-hdl-checker ale-vhdl.txt /*ale-vhdl-hdl-checker* -ale-vhdl-options ale-vhdl.txt /*ale-vhdl-options* -ale-vhdl-vcom ale-vhdl.txt /*ale-vhdl-vcom* -ale-vhdl-xvhdl ale-vhdl.txt /*ale-vhdl-xvhdl* -ale-vim-help-options ale-vim-help.txt /*ale-vim-help-options* -ale-vim-help-write-good ale-vim-help.txt /*ale-vim-help-write-good* -ale-vim-options ale-vim.txt /*ale-vim-options* -ale-vim-vimls ale-vim.txt /*ale-vim-vimls* -ale-vim-vint ale-vim.txt /*ale-vim-vint* -ale-vue-options ale-vue.txt /*ale-vue-options* -ale-vue-prettier ale-vue.txt /*ale-vue-prettier* -ale-vue-vls ale-vue.txt /*ale-vue-vls* -ale-write-good-options ale.txt /*ale-write-good-options* -ale-xhtml-options ale-xhtml.txt /*ale-xhtml-options* -ale-xhtml-write-good ale-xhtml.txt /*ale-xhtml-write-good* -ale-xml-options ale-xml.txt /*ale-xml-options* -ale-xml-xmllint ale-xml.txt /*ale-xml-xmllint* -ale-yaml-circleci ale-yaml.txt /*ale-yaml-circleci* -ale-yaml-options ale-yaml.txt /*ale-yaml-options* -ale-yaml-prettier ale-yaml.txt /*ale-yaml-prettier* -ale-yaml-spectral ale-yaml.txt /*ale-yaml-spectral* -ale-yaml-swaglint ale-yaml.txt /*ale-yaml-swaglint* -ale-yaml-yamlfix ale-yaml.txt /*ale-yaml-yamlfix* -ale-yaml-yamllint ale-yaml.txt /*ale-yaml-yamllint* -ale-yang-lsp ale-yang.txt /*ale-yang-lsp* -ale-yang-options ale-yang.txt /*ale-yang-options* -ale-zeek-options ale-zeek.txt /*ale-zeek-options* -ale-zeek-zeek ale-zeek.txt /*ale-zeek-zeek* -ale-zig-options ale-zig.txt /*ale-zig-options* -ale-zig-zls ale-zig.txt /*ale-zig-zls* -ale.txt ale.txt /*ale.txt* -b:ale-c-flawfinder ale-c.txt /*b:ale-c-flawfinder* -b:ale-cpp-flawfinder ale-cpp.txt /*b:ale-cpp-flawfinder* -b:ale_ada_adals_encoding ale-ada.txt /*b:ale_ada_adals_encoding* -b:ale_ada_adals_executable ale-ada.txt /*b:ale_ada_adals_executable* -b:ale_ada_adals_project ale-ada.txt /*b:ale_ada_adals_project* -b:ale_ada_gcc_executable ale-ada.txt /*b:ale_ada_gcc_executable* -b:ale_ada_gcc_options ale-ada.txt /*b:ale_ada_gcc_options* -b:ale_ada_gnatpp_options ale-ada.txt /*b:ale_ada_gnatpp_options* -b:ale_alex_executable ale.txt /*b:ale_alex_executable* -b:ale_alex_use_global ale.txt /*b:ale_alex_use_global* -b:ale_ansible_ansible_lint_executable ale-ansible.txt /*b:ale_ansible_ansible_lint_executable* -b:ale_apkbuild_apkbuild_lint_executable ale-apkbuild.txt /*b:ale_apkbuild_apkbuild_lint_executable* -b:ale_apkbuild_secfixes_check_executable ale-apkbuild.txt /*b:ale_apkbuild_secfixes_check_executable* -b:ale_asm_gcc_executable ale-asm.txt /*b:ale_asm_gcc_executable* -b:ale_asm_gcc_options ale-asm.txt /*b:ale_asm_gcc_options* -b:ale_awk_gawk_executable ale-awk.txt /*b:ale_awk_gawk_executable* -b:ale_awk_gawk_options ale-awk.txt /*b:ale_awk_gawk_options* -b:ale_bazel_buildifier_executable ale-bazel.txt /*b:ale_bazel_buildifier_executable* -b:ale_bazel_buildifier_options ale-bazel.txt /*b:ale_bazel_buildifier_options* -b:ale_bazel_buildifier_use_global ale-bazel.txt /*b:ale_bazel_buildifier_use_global* -b:ale_c_always_make ale-c.txt /*b:ale_c_always_make* -b:ale_c_astyle_executable ale-c.txt /*b:ale_c_astyle_executable* -b:ale_c_astyle_project_options ale-c.txt /*b:ale_c_astyle_project_options* -b:ale_c_build_dir ale-c.txt /*b:ale_c_build_dir* -b:ale_c_build_dir_names ale-c.txt /*b:ale_c_build_dir_names* -b:ale_c_cc_executable ale-c.txt /*b:ale_c_cc_executable* -b:ale_c_cc_options ale-c.txt /*b:ale_c_cc_options* -b:ale_c_ccls_executable ale-c.txt /*b:ale_c_ccls_executable* -b:ale_c_ccls_init_options ale-c.txt /*b:ale_c_ccls_init_options* -b:ale_c_clangd_executable ale-c.txt /*b:ale_c_clangd_executable* -b:ale_c_clangd_options ale-c.txt /*b:ale_c_clangd_options* -b:ale_c_clangformat_executable ale-c.txt /*b:ale_c_clangformat_executable* -b:ale_c_clangformat_options ale-c.txt /*b:ale_c_clangformat_options* -b:ale_c_clangformat_style_option ale-c.txt /*b:ale_c_clangformat_style_option* -b:ale_c_clangformat_use_local_file ale-c.txt /*b:ale_c_clangformat_use_local_file* -b:ale_c_clangtidy_checks ale-c.txt /*b:ale_c_clangtidy_checks* -b:ale_c_clangtidy_executable ale-c.txt /*b:ale_c_clangtidy_executable* -b:ale_c_clangtidy_extra_options ale-c.txt /*b:ale_c_clangtidy_extra_options* -b:ale_c_clangtidy_fix_errors ale-c.txt /*b:ale_c_clangtidy_fix_errors* -b:ale_c_clangtidy_options ale-c.txt /*b:ale_c_clangtidy_options* -b:ale_c_cppcheck_executable ale-c.txt /*b:ale_c_cppcheck_executable* -b:ale_c_cppcheck_options ale-c.txt /*b:ale_c_cppcheck_options* -b:ale_c_cquery_cache_directory ale-c.txt /*b:ale_c_cquery_cache_directory* -b:ale_c_cquery_executable ale-c.txt /*b:ale_c_cquery_executable* -b:ale_c_flawfinder_error_severity ale-c.txt /*b:ale_c_flawfinder_error_severity* -b:ale_c_flawfinder_executable ale-c.txt /*b:ale_c_flawfinder_executable* -b:ale_c_flawfinder_minlevel ale-c.txt /*b:ale_c_flawfinder_minlevel* -b:ale_c_parse_compile_commands ale-c.txt /*b:ale_c_parse_compile_commands* -b:ale_c_parse_makefile ale-c.txt /*b:ale_c_parse_makefile* -b:ale_c_uncrustify_executable ale-c.txt /*b:ale_c_uncrustify_executable* -b:ale_c_uncrustify_options ale-c.txt /*b:ale_c_uncrustify_options* -b:ale_chef_cookstyle_executable ale-chef.txt /*b:ale_chef_cookstyle_executable* -b:ale_chef_cookstyle_options ale-chef.txt /*b:ale_chef_cookstyle_options* -b:ale_chef_foodcritic_executable ale-chef.txt /*b:ale_chef_foodcritic_executable* -b:ale_chef_foodcritic_options ale-chef.txt /*b:ale_chef_foodcritic_options* -b:ale_clojure_clj_kondo_options ale-clojure.txt /*b:ale_clojure_clj_kondo_options* -b:ale_cmake_cmakeformat_executable ale-cmake.txt /*b:ale_cmake_cmakeformat_executable* -b:ale_cmake_cmakeformat_options ale-cmake.txt /*b:ale_cmake_cmakeformat_options* -b:ale_cmake_cmakelint_executable ale-cmake.txt /*b:ale_cmake_cmakelint_executable* -b:ale_cmake_cmakelint_options ale-cmake.txt /*b:ale_cmake_cmakelint_options* -b:ale_command_wrapper ale.txt /*b:ale_command_wrapper* -b:ale_completion_enabled ale.txt /*b:ale_completion_enabled* -b:ale_completion_excluded_words ale.txt /*b:ale_completion_excluded_words* -b:ale_cpp_astyle_executable ale-cpp.txt /*b:ale_cpp_astyle_executable* -b:ale_cpp_astyle_project_options ale-cpp.txt /*b:ale_cpp_astyle_project_options* -b:ale_cpp_cc_executable ale-cpp.txt /*b:ale_cpp_cc_executable* -b:ale_cpp_cc_options ale-cpp.txt /*b:ale_cpp_cc_options* -b:ale_cpp_ccls_executable ale-cpp.txt /*b:ale_cpp_ccls_executable* -b:ale_cpp_ccls_init_options ale-cpp.txt /*b:ale_cpp_ccls_init_options* -b:ale_cpp_clangcheck_executable ale-cpp.txt /*b:ale_cpp_clangcheck_executable* -b:ale_cpp_clangcheck_options ale-cpp.txt /*b:ale_cpp_clangcheck_options* -b:ale_cpp_clangd_executable ale-cpp.txt /*b:ale_cpp_clangd_executable* -b:ale_cpp_clangd_options ale-cpp.txt /*b:ale_cpp_clangd_options* -b:ale_cpp_clangtidy_checks ale-cpp.txt /*b:ale_cpp_clangtidy_checks* -b:ale_cpp_clangtidy_executable ale-cpp.txt /*b:ale_cpp_clangtidy_executable* -b:ale_cpp_clangtidy_extra_options ale-cpp.txt /*b:ale_cpp_clangtidy_extra_options* -b:ale_cpp_clangtidy_fix_errors ale-cpp.txt /*b:ale_cpp_clangtidy_fix_errors* -b:ale_cpp_clangtidy_options ale-cpp.txt /*b:ale_cpp_clangtidy_options* -b:ale_cpp_clazy_checks ale-cpp.txt /*b:ale_cpp_clazy_checks* -b:ale_cpp_clazy_executable ale-cpp.txt /*b:ale_cpp_clazy_executable* -b:ale_cpp_clazy_options ale-cpp.txt /*b:ale_cpp_clazy_options* -b:ale_cpp_cppcheck_executable ale-cpp.txt /*b:ale_cpp_cppcheck_executable* -b:ale_cpp_cppcheck_options ale-cpp.txt /*b:ale_cpp_cppcheck_options* -b:ale_cpp_cpplint_executable ale-cpp.txt /*b:ale_cpp_cpplint_executable* -b:ale_cpp_cpplint_options ale-cpp.txt /*b:ale_cpp_cpplint_options* -b:ale_cpp_cquery_cache_directory ale-cpp.txt /*b:ale_cpp_cquery_cache_directory* -b:ale_cpp_cquery_executable ale-cpp.txt /*b:ale_cpp_cquery_executable* -b:ale_cpp_flawfinder_executable ale-cpp.txt /*b:ale_cpp_flawfinder_executable* -b:ale_cpp_flawfinder_minlevel ale-cpp.txt /*b:ale_cpp_flawfinder_minlevel* -b:ale_cs_csc_assemblies ale-cs.txt /*b:ale_cs_csc_assemblies* -b:ale_cs_csc_assembly_path ale-cs.txt /*b:ale_cs_csc_assembly_path* -b:ale_cs_csc_options ale-cs.txt /*b:ale_cs_csc_options* -b:ale_cs_csc_source ale-cs.txt /*b:ale_cs_csc_source* -b:ale_cs_dotnet_format_executable ale-cs.txt /*b:ale_cs_dotnet_format_executable* -b:ale_cs_dotnet_format_options ale-cs.txt /*b:ale_cs_dotnet_format_options* -b:ale_cs_mcs_options ale-cs.txt /*b:ale_cs_mcs_options* -b:ale_cs_mcsc_assemblies ale-cs.txt /*b:ale_cs_mcsc_assemblies* -b:ale_cs_mcsc_assembly_path ale-cs.txt /*b:ale_cs_mcsc_assembly_path* -b:ale_cs_mcsc_options ale-cs.txt /*b:ale_cs_mcsc_options* -b:ale_cs_mcsc_source ale-cs.txt /*b:ale_cs_mcsc_source* -b:ale_css_stylelint_executable ale-css.txt /*b:ale_css_stylelint_executable* -b:ale_css_stylelint_options ale-css.txt /*b:ale_css_stylelint_options* -b:ale_css_stylelint_use_global ale-css.txt /*b:ale_css_stylelint_use_global* -b:ale_cuda_clangd_executable ale-cuda.txt /*b:ale_cuda_clangd_executable* -b:ale_cuda_clangd_options ale-cuda.txt /*b:ale_cuda_clangd_options* -b:ale_cuda_nvcc_executable ale-cuda.txt /*b:ale_cuda_nvcc_executable* -b:ale_cuda_nvcc_options ale-cuda.txt /*b:ale_cuda_nvcc_options* -b:ale_d_dfmt_options ale-d.txt /*b:ale_d_dfmt_options* -b:ale_d_dls_executable ale-d.txt /*b:ale_d_dls_executable* -b:ale_dafny_dafny_timelimit ale-dafny.txt /*b:ale_dafny_dafny_timelimit* -b:ale_dart_analysis_server_executable ale-dart.txt /*b:ale_dart_analysis_server_executable* -b:ale_dart_analyze_executable ale-dart.txt /*b:ale_dart_analyze_executable* -b:ale_dart_dartanalyzer_executable ale-dart.txt /*b:ale_dart_dartanalyzer_executable* -b:ale_dart_dartfmt_executable ale-dart.txt /*b:ale_dart_dartfmt_executable* -b:ale_dart_dartfmt_options ale-dart.txt /*b:ale_dart_dartfmt_options* -b:ale_dart_format_executable ale-dart.txt /*b:ale_dart_format_executable* -b:ale_dart_format_options ale-dart.txt /*b:ale_dart_format_options* -b:ale_default_navigation ale.txt /*b:ale_default_navigation* -b:ale_deno_executable ale-typescript.txt /*b:ale_deno_executable* -b:ale_deno_importMap ale-typescript.txt /*b:ale_deno_importMap* -b:ale_deno_lsp_project_root ale-typescript.txt /*b:ale_deno_lsp_project_root* -b:ale_deno_unstable ale-typescript.txt /*b:ale_deno_unstable* -b:ale_desktop_desktop_file_validate_options ale-desktop.txt /*b:ale_desktop_desktop_file_validate_options* -b:ale_detail_to_floating_preview ale.txt /*b:ale_detail_to_floating_preview* -b:ale_dhall_executable ale-dhall.txt /*b:ale_dhall_executable* -b:ale_dhall_freeze_options ale-dhall.txt /*b:ale_dhall_freeze_options* -b:ale_dhall_options ale-dhall.txt /*b:ale_dhall_options* -b:ale_disable_lsp ale.txt /*b:ale_disable_lsp* -b:ale_dockerfile_dockerfile_lint_executable ale-dockerfile.txt /*b:ale_dockerfile_dockerfile_lint_executable* -b:ale_dockerfile_dockerfile_lint_options ale-dockerfile.txt /*b:ale_dockerfile_dockerfile_lint_options* -b:ale_dockerfile_hadolint_image ale-dockerfile.txt /*b:ale_dockerfile_hadolint_image* -b:ale_dockerfile_hadolint_use_docker ale-dockerfile.txt /*b:ale_dockerfile_hadolint_use_docker* -b:ale_echo_delay ale.txt /*b:ale_echo_delay* -b:ale_echo_msg_format ale.txt /*b:ale_echo_msg_format* -b:ale_elixir_elixir_ls_config ale-elixir.txt /*b:ale_elixir_elixir_ls_config* -b:ale_elixir_elixir_ls_release ale-elixir.txt /*b:ale_elixir_elixir_ls_release* -b:ale_elixir_mix_format_options ale-elixir.txt /*b:ale_elixir_mix_format_options* -b:ale_elixir_mix_options ale-elixir.txt /*b:ale_elixir_mix_options* -b:ale_elm_format_executable ale-elm.txt /*b:ale_elm_format_executable* -b:ale_elm_format_options ale-elm.txt /*b:ale_elm_format_options* -b:ale_elm_format_use_global ale-elm.txt /*b:ale_elm_format_use_global* -b:ale_elm_ls_elm_analyse_trigger ale-elm.txt /*b:ale_elm_ls_elm_analyse_trigger* -b:ale_elm_ls_elm_format_path ale-elm.txt /*b:ale_elm_ls_elm_format_path* -b:ale_elm_ls_elm_path ale-elm.txt /*b:ale_elm_ls_elm_path* -b:ale_elm_ls_elm_test_path ale-elm.txt /*b:ale_elm_ls_elm_test_path* -b:ale_elm_ls_executable ale-elm.txt /*b:ale_elm_ls_executable* -b:ale_elm_ls_use_global ale-elm.txt /*b:ale_elm_ls_use_global* -b:ale_elm_make_executable ale-elm.txt /*b:ale_elm_make_executable* -b:ale_elm_make_use_global ale-elm.txt /*b:ale_elm_make_use_global* -b:ale_enabled ale.txt /*b:ale_enabled* -b:ale_erlang_dialyzer_executable ale-erlang.txt /*b:ale_erlang_dialyzer_executable* -b:ale_erlang_dialyzer_options ale-erlang.txt /*b:ale_erlang_dialyzer_options* -b:ale_erlang_dialyzer_plt_file ale-erlang.txt /*b:ale_erlang_dialyzer_plt_file* -b:ale_erlang_dialyzer_rebar3_profile ale-erlang.txt /*b:ale_erlang_dialyzer_rebar3_profile* -b:ale_erlang_elvis_executable ale-erlang.txt /*b:ale_erlang_elvis_executable* -b:ale_erlang_erlc_executable ale-erlang.txt /*b:ale_erlang_erlc_executable* -b:ale_erlang_erlc_options ale-erlang.txt /*b:ale_erlang_erlc_options* -b:ale_erlang_erlfmt_executable ale-erlang.txt /*b:ale_erlang_erlfmt_executable* -b:ale_erlang_erlfmt_options ale-erlang.txt /*b:ale_erlang_erlfmt_options* -b:ale_erlang_syntaxerl_executable ale-erlang.txt /*b:ale_erlang_syntaxerl_executable* -b:ale_eruby_erblint_executable ale-eruby.txt /*b:ale_eruby_erblint_executable* -b:ale_eruby_ruumba_executable ale-eruby.txt /*b:ale_eruby_ruumba_executable* -b:ale_exclude_highlights ale.txt /*b:ale_exclude_highlights* -b:ale_filename_mappings ale.txt /*b:ale_filename_mappings* -b:ale_fish_fish_indent_executable ale-fish.txt /*b:ale_fish_fish_indent_executable* -b:ale_fish_fish_indent_options ale-fish.txt /*b:ale_fish_fish_indent_options* -b:ale_fix_on_save ale.txt /*b:ale_fix_on_save* -b:ale_fix_on_save_ignore ale.txt /*b:ale_fix_on_save_ignore* -b:ale_fixers ale.txt /*b:ale_fixers* -b:ale_fortran_gcc_executable ale-fortran.txt /*b:ale_fortran_gcc_executable* -b:ale_fortran_gcc_options ale-fortran.txt /*b:ale_fortran_gcc_options* -b:ale_fortran_gcc_use_free_form ale-fortran.txt /*b:ale_fortran_gcc_use_free_form* -b:ale_fortran_language_server_executable ale-fortran.txt /*b:ale_fortran_language_server_executable* -b:ale_fortran_language_server_use_global ale-fortran.txt /*b:ale_fortran_language_server_use_global* -b:ale_fuse_fusionlint_executable ale-fuse.txt /*b:ale_fuse_fusionlint_executable* -b:ale_fuse_fusionlint_options ale-fuse.txt /*b:ale_fuse_fusionlint_options* -b:ale_gitcommit_gitlint_executable ale-gitcommit.txt /*b:ale_gitcommit_gitlint_executable* -b:ale_gitcommit_gitlint_options ale-gitcommit.txt /*b:ale_gitcommit_gitlint_options* -b:ale_gitcommit_gitlint_use_global ale-gitcommit.txt /*b:ale_gitcommit_gitlint_use_global* -b:ale_glsl_glslang_executable ale-glsl.txt /*b:ale_glsl_glslang_executable* -b:ale_glsl_glslang_options ale-glsl.txt /*b:ale_glsl_glslang_options* -b:ale_glsl_glslls_executable ale-glsl.txt /*b:ale_glsl_glslls_executable* -b:ale_glsl_glslls_logfile ale-glsl.txt /*b:ale_glsl_glslls_logfile* -b:ale_go_bingo_executable ale-go.txt /*b:ale_go_bingo_executable* -b:ale_go_bingo_options ale-go.txt /*b:ale_go_bingo_options* -b:ale_go_go111module ale-go.txt /*b:ale_go_go111module* -b:ale_go_go_executable ale-go.txt /*b:ale_go_go_executable* -b:ale_go_gobuild_options ale-go.txt /*b:ale_go_gobuild_options* -b:ale_go_gofmt_options ale-go.txt /*b:ale_go_gofmt_options* -b:ale_go_golangci_lint_executable ale-go.txt /*b:ale_go_golangci_lint_executable* -b:ale_go_golangci_lint_options ale-go.txt /*b:ale_go_golangci_lint_options* -b:ale_go_golangci_lint_package ale-go.txt /*b:ale_go_golangci_lint_package* -b:ale_go_golines_options ale-go.txt /*b:ale_go_golines_options* -b:ale_go_golint_executable ale-go.txt /*b:ale_go_golint_executable* -b:ale_go_golint_options ale-go.txt /*b:ale_go_golint_options* -b:ale_go_gometalinter_executable ale-go.txt /*b:ale_go_gometalinter_executable* -b:ale_go_gometalinter_lint_package ale-go.txt /*b:ale_go_gometalinter_lint_package* -b:ale_go_gometalinter_options ale-go.txt /*b:ale_go_gometalinter_options* -b:ale_go_gopls_executable ale-go.txt /*b:ale_go_gopls_executable* -b:ale_go_gopls_init_options ale-go.txt /*b:ale_go_gopls_init_options* -b:ale_go_gopls_options ale-go.txt /*b:ale_go_gopls_options* -b:ale_go_gopls_use_global ale-go.txt /*b:ale_go_gopls_use_global* -b:ale_go_govet_options ale-go.txt /*b:ale_go_govet_options* -b:ale_go_langserver_executable ale-go.txt /*b:ale_go_langserver_executable* -b:ale_go_langserver_options ale-go.txt /*b:ale_go_langserver_options* -b:ale_go_lines_executable ale-go.txt /*b:ale_go_lines_executable* -b:ale_go_revive_executable ale-go.txt /*b:ale_go_revive_executable* -b:ale_go_revive_options ale-go.txt /*b:ale_go_revive_options* -b:ale_go_staticcheck_executable ale-go.txt /*b:ale_go_staticcheck_executable* -b:ale_go_staticcheck_lint_package ale-go.txt /*b:ale_go_staticcheck_lint_package* -b:ale_go_staticcheck_options ale-go.txt /*b:ale_go_staticcheck_options* -b:ale_go_staticcheck_use_global ale-go.txt /*b:ale_go_staticcheck_use_global* -b:ale_hack_hack_executable ale-hack.txt /*b:ale_hack_hack_executable* -b:ale_hack_hackfmt_options ale-hack.txt /*b:ale_hack_hackfmt_options* -b:ale_hack_hhast_executable ale-hack.txt /*b:ale_hack_hhast_executable* -b:ale_handlebars_embertemplatelint_executable ale-handlebars.txt /*b:ale_handlebars_embertemplatelint_executable* -b:ale_handlebars_embertemplatelint_use_global ale-handlebars.txt /*b:ale_handlebars_embertemplatelint_use_global* -b:ale_haskell_brittany_executable ale-haskell.txt /*b:ale_haskell_brittany_executable* -b:ale_haskell_cabal_ghc_options ale-haskell.txt /*b:ale_haskell_cabal_ghc_options* -b:ale_haskell_floskell_executable ale-haskell.txt /*b:ale_haskell_floskell_executable* -b:ale_haskell_ghc_mod_executable ale-haskell.txt /*b:ale_haskell_ghc_mod_executable* -b:ale_haskell_ghc_options ale-haskell.txt /*b:ale_haskell_ghc_options* -b:ale_haskell_hdevtools_executable ale-haskell.txt /*b:ale_haskell_hdevtools_executable* -b:ale_haskell_hdevtools_options ale-haskell.txt /*b:ale_haskell_hdevtools_options* -b:ale_haskell_hfmt_executable ale-haskell.txt /*b:ale_haskell_hfmt_executable* -b:ale_haskell_hie_executable ale-haskell.txt /*b:ale_haskell_hie_executable* -b:ale_haskell_hindent_executable ale-haskell.txt /*b:ale_haskell_hindent_executable* -b:ale_haskell_his_executable ale-haskell.txt /*b:ale_haskell_his_executable* -b:ale_haskell_hlint_executable ale-haskell.txt /*b:ale_haskell_hlint_executable* -b:ale_haskell_ormolu_executable ale-haskell.txt /*b:ale_haskell_ormolu_executable* -b:ale_haskell_ormolu_options ale-haskell.txt /*b:ale_haskell_ormolu_options* -b:ale_haskell_stack_build_options ale-haskell.txt /*b:ale_haskell_stack_build_options* -b:ale_haskell_stack_ghc_options ale-haskell.txt /*b:ale_haskell_stack_ghc_options* -b:ale_haskell_stylish_haskell_executable ale-haskell.txt /*b:ale_haskell_stylish_haskell_executable* -b:ale_hdl_checker_config_file ale-vhdl.txt /*b:ale_hdl_checker_config_file* -b:ale_hdl_checker_executable ale-vhdl.txt /*b:ale_hdl_checker_executable* -b:ale_hdl_checker_options ale-vhdl.txt /*b:ale_hdl_checker_options* -b:ale_hover_to_floating_preview ale.txt /*b:ale_hover_to_floating_preview* -b:ale_hover_to_preview ale.txt /*b:ale_hover_to_preview* -b:ale_html_angular_executable ale-html.txt /*b:ale_html_angular_executable* -b:ale_html_angular_use_global ale-html.txt /*b:ale_html_angular_use_global* -b:ale_html_beautify_options ale-html.txt /*b:ale_html_beautify_options* -b:ale_html_htmlhint_executable ale-html.txt /*b:ale_html_htmlhint_executable* -b:ale_html_htmlhint_options ale-html.txt /*b:ale_html_htmlhint_options* -b:ale_html_htmlhint_use_global ale-html.txt /*b:ale_html_htmlhint_use_global* -b:ale_html_stylelint_executable ale-html.txt /*b:ale_html_stylelint_executable* -b:ale_html_stylelint_options ale-html.txt /*b:ale_html_stylelint_options* -b:ale_html_stylelint_use_global ale-html.txt /*b:ale_html_stylelint_use_global* -b:ale_html_tidy_executable ale-html.txt /*b:ale_html_tidy_executable* -b:ale_html_tidy_options ale-html.txt /*b:ale_html_tidy_options* -b:ale_idris_idris_executable ale-idris.txt /*b:ale_idris_idris_executable* -b:ale_idris_idris_options ale-idris.txt /*b:ale_idris_idris_options* -b:ale_inko_inko_executable ale-inko.txt /*b:ale_inko_inko_executable* -b:ale_ispc_ispc_executable ale-ispc.txt /*b:ale_ispc_ispc_executable* -b:ale_ispc_ispc_options ale-ispc.txt /*b:ale_ispc_ispc_options* -b:ale_java_checkstyle_config ale-java.txt /*b:ale_java_checkstyle_config* -b:ale_java_checkstyle_executable ale-java.txt /*b:ale_java_checkstyle_executable* -b:ale_java_checkstyle_options ale-java.txt /*b:ale_java_checkstyle_options* -b:ale_java_eclipse_config_path ale-java.txt /*b:ale_java_eclipse_config_path* -b:ale_java_eclipse_executable ale-java.txt /*b:ale_java_eclipse_executable* -b:ale_java_eclipselsp_javaagent ale-java.txt /*b:ale_java_eclipselsp_javaagent* -b:ale_java_eclipselsp_path ale-java.txt /*b:ale_java_eclipselsp_path* -b:ale_java_eclipselsp_workspace_path ale-java.txt /*b:ale_java_eclipselsp_workspace_path* -b:ale_java_google_java_format_executable ale-java.txt /*b:ale_java_google_java_format_executable* -b:ale_java_google_java_format_options ale-java.txt /*b:ale_java_google_java_format_options* -b:ale_java_javac_classpath ale-java.txt /*b:ale_java_javac_classpath* -b:ale_java_javac_executable ale-java.txt /*b:ale_java_javac_executable* -b:ale_java_javac_options ale-java.txt /*b:ale_java_javac_options* -b:ale_java_javac_sourcepath ale-java.txt /*b:ale_java_javac_sourcepath* -b:ale_java_javalsp_config ale-java.txt /*b:ale_java_javalsp_config* -b:ale_java_javalsp_executable ale-java.txt /*b:ale_java_javalsp_executable* -b:ale_java_pmd_options ale-java.txt /*b:ale_java_pmd_options* -b:ale_javascript_eslint_executable ale-javascript.txt /*b:ale_javascript_eslint_executable* -b:ale_javascript_eslint_options ale-javascript.txt /*b:ale_javascript_eslint_options* -b:ale_javascript_eslint_suppress_eslintignore ale-javascript.txt /*b:ale_javascript_eslint_suppress_eslintignore* -b:ale_javascript_eslint_suppress_missing_config ale-javascript.txt /*b:ale_javascript_eslint_suppress_missing_config* -b:ale_javascript_eslint_use_global ale-javascript.txt /*b:ale_javascript_eslint_use_global* -b:ale_javascript_fecs_executable ale-javascript.txt /*b:ale_javascript_fecs_executable* -b:ale_javascript_fecs_use_global ale-javascript.txt /*b:ale_javascript_fecs_use_global* -b:ale_javascript_flow_executable ale-javascript.txt /*b:ale_javascript_flow_executable* -b:ale_javascript_flow_use_global ale-javascript.txt /*b:ale_javascript_flow_use_global* -b:ale_javascript_flow_use_home_config ale-javascript.txt /*b:ale_javascript_flow_use_home_config* -b:ale_javascript_flow_use_respect_pragma ale-javascript.txt /*b:ale_javascript_flow_use_respect_pragma* -b:ale_javascript_importjs_executable ale-javascript.txt /*b:ale_javascript_importjs_executable* -b:ale_javascript_jscs_executable ale-javascript.txt /*b:ale_javascript_jscs_executable* -b:ale_javascript_jscs_use_global ale-javascript.txt /*b:ale_javascript_jscs_use_global* -b:ale_javascript_jshint_executable ale-javascript.txt /*b:ale_javascript_jshint_executable* -b:ale_javascript_jshint_use_global ale-javascript.txt /*b:ale_javascript_jshint_use_global* -b:ale_javascript_prettier_eslint_executable ale-javascript.txt /*b:ale_javascript_prettier_eslint_executable* -b:ale_javascript_prettier_eslint_options ale-javascript.txt /*b:ale_javascript_prettier_eslint_options* -b:ale_javascript_prettier_eslint_use_global ale-javascript.txt /*b:ale_javascript_prettier_eslint_use_global* -b:ale_javascript_prettier_executable ale-javascript.txt /*b:ale_javascript_prettier_executable* -b:ale_javascript_prettier_options ale-javascript.txt /*b:ale_javascript_prettier_options* -b:ale_javascript_prettier_standard_executable ale-javascript.txt /*b:ale_javascript_prettier_standard_executable* -b:ale_javascript_prettier_standard_options ale-javascript.txt /*b:ale_javascript_prettier_standard_options* -b:ale_javascript_prettier_standard_use_global ale-javascript.txt /*b:ale_javascript_prettier_standard_use_global* -b:ale_javascript_prettier_use_global ale-javascript.txt /*b:ale_javascript_prettier_use_global* -b:ale_javascript_standard_executable ale-javascript.txt /*b:ale_javascript_standard_executable* -b:ale_javascript_standard_options ale-javascript.txt /*b:ale_javascript_standard_options* -b:ale_javascript_standard_use_global ale-javascript.txt /*b:ale_javascript_standard_use_global* -b:ale_javascript_xo_executable ale-javascript.txt /*b:ale_javascript_xo_executable* -b:ale_javascript_xo_options ale-javascript.txt /*b:ale_javascript_xo_options* -b:ale_javascript_xo_use_global ale-javascript.txt /*b:ale_javascript_xo_use_global* -b:ale_json_fixjson_executable ale-json.txt /*b:ale_json_fixjson_executable* -b:ale_json_fixjson_options ale-json.txt /*b:ale_json_fixjson_options* -b:ale_json_fixjson_use_global ale-json.txt /*b:ale_json_fixjson_use_global* -b:ale_json_jq_executable ale-json.txt /*b:ale_json_jq_executable* -b:ale_json_jq_filters ale-json.txt /*b:ale_json_jq_filters* -b:ale_json_jq_options ale-json.txt /*b:ale_json_jq_options* -b:ale_json_jsonlint_executable ale-json.txt /*b:ale_json_jsonlint_executable* -b:ale_json_jsonlint_use_global ale-json.txt /*b:ale_json_jsonlint_use_global* -b:ale_json_spectral_executable ale-json.txt /*b:ale_json_spectral_executable* -b:ale_json_spectral_use_global ale-json.txt /*b:ale_json_spectral_use_global* -b:ale_jsonnet_jsonnet_lint_executable ale-jsonnet.txt /*b:ale_jsonnet_jsonnet_lint_executable* -b:ale_jsonnet_jsonnet_lint_options ale-jsonnet.txt /*b:ale_jsonnet_jsonnet_lint_options* -b:ale_jsonnet_jsonnetfmt_executable ale-jsonnet.txt /*b:ale_jsonnet_jsonnetfmt_executable* -b:ale_jsonnet_jsonnetfmt_options ale-jsonnet.txt /*b:ale_jsonnet_jsonnetfmt_options* -b:ale_julia_executable ale-julia.txt /*b:ale_julia_executable* -b:ale_keep_list_window_open ale.txt /*b:ale_keep_list_window_open* -b:ale_lacheck_executable ale-tex.txt /*b:ale_lacheck_executable* -b:ale_languagetool_executable ale.txt /*b:ale_languagetool_executable* -b:ale_languagetool_options ale.txt /*b:ale_languagetool_options* -b:ale_less_lessc_executable ale-less.txt /*b:ale_less_lessc_executable* -b:ale_less_lessc_options ale-less.txt /*b:ale_less_lessc_options* -b:ale_less_lessc_use_global ale-less.txt /*b:ale_less_lessc_use_global* -b:ale_less_stylelint_executable ale-less.txt /*b:ale_less_stylelint_executable* -b:ale_less_stylelint_options ale-less.txt /*b:ale_less_stylelint_options* -b:ale_less_stylelint_use_global ale-less.txt /*b:ale_less_stylelint_use_global* -b:ale_lint_delay ale.txt /*b:ale_lint_delay* -b:ale_lint_on_insert_leave ale.txt /*b:ale_lint_on_insert_leave* -b:ale_linted ale.txt /*b:ale_linted* -b:ale_linter_aliases ale.txt /*b:ale_linter_aliases* -b:ale_linters ale.txt /*b:ale_linters* -b:ale_linters_ignore ale.txt /*b:ale_linters_ignore* -b:ale_list_vertical ale.txt /*b:ale_list_vertical* -b:ale_list_window_size ale.txt /*b:ale_list_window_size* -b:ale_llvm_llc_executable ale-llvm.txt /*b:ale_llvm_llc_executable* -b:ale_loclist_msg_format ale.txt /*b:ale_loclist_msg_format* -b:ale_lua_lua_format_executable ale-lua.txt /*b:ale_lua_lua_format_executable* -b:ale_lua_lua_format_options ale-lua.txt /*b:ale_lua_lua_format_options* -b:ale_lua_luac_executable ale-lua.txt /*b:ale_lua_luac_executable* -b:ale_lua_luacheck_executable ale-lua.txt /*b:ale_lua_luacheck_executable* -b:ale_lua_luacheck_options ale-lua.txt /*b:ale_lua_luacheck_options* -b:ale_lua_luafmt_executable ale-lua.txt /*b:ale_lua_luafmt_executable* -b:ale_lua_luafmt_options ale-lua.txt /*b:ale_lua_luafmt_options* -b:ale_lua_stylua_executable ale-lua.txt /*b:ale_lua_stylua_executable* -b:ale_lua_stylua_options ale-lua.txt /*b:ale_lua_stylua_options* -b:ale_markdown_markdownlint_options ale-markdown.txt /*b:ale_markdown_markdownlint_options* -b:ale_markdown_mdl_executable ale-markdown.txt /*b:ale_markdown_mdl_executable* -b:ale_markdown_mdl_options ale-markdown.txt /*b:ale_markdown_mdl_options* -b:ale_markdown_pandoc_executable ale-markdown.txt /*b:ale_markdown_pandoc_executable* -b:ale_markdown_pandoc_options ale-markdown.txt /*b:ale_markdown_pandoc_options* -b:ale_markdown_remark_lint_executable ale-markdown.txt /*b:ale_markdown_remark_lint_executable* -b:ale_markdown_remark_lint_options ale-markdown.txt /*b:ale_markdown_remark_lint_options* -b:ale_markdown_remark_lint_use_global ale-markdown.txt /*b:ale_markdown_remark_lint_use_global* -b:ale_max_signs ale.txt /*b:ale_max_signs* -b:ale_maximum_file_size ale.txt /*b:ale_maximum_file_size* -b:ale_mercury_mmc_executable ale-mercury.txt /*b:ale_mercury_mmc_executable* -b:ale_mercury_mmc_options ale-mercury.txt /*b:ale_mercury_mmc_options* -b:ale_nasm_nasm_executable ale-nasm.txt /*b:ale_nasm_nasm_executable* -b:ale_nasm_nasm_options ale-nasm.txt /*b:ale_nasm_nasm_options* -b:ale_nim_nimpretty_executable ale-nim.txt /*b:ale_nim_nimpretty_executable* -b:ale_nim_nimpretty_options ale-nim.txt /*b:ale_nim_nimpretty_options* -b:ale_nix_nixfmt_executable ale-nix.txt /*b:ale_nix_nixfmt_executable* -b:ale_nix_nixfmt_options ale-nix.txt /*b:ale_nix_nixfmt_options* -b:ale_nix_nixpkgsfmt_executable ale-nix.txt /*b:ale_nix_nixpkgsfmt_executable* -b:ale_nix_nixpkgsfmt_options ale-nix.txt /*b:ale_nix_nixpkgsfmt_options* -b:ale_objc_ccls_executable ale-objc.txt /*b:ale_objc_ccls_executable* -b:ale_objc_ccls_init_options ale-objc.txt /*b:ale_objc_ccls_init_options* -b:ale_objc_clang_options ale-objc.txt /*b:ale_objc_clang_options* -b:ale_objc_clangd_executable ale-objc.txt /*b:ale_objc_clangd_executable* -b:ale_objc_clangd_options ale-objc.txt /*b:ale_objc_clangd_options* -b:ale_objcpp_clang_options ale-objcpp.txt /*b:ale_objcpp_clang_options* -b:ale_objcpp_clangd_executable ale-objcpp.txt /*b:ale_objcpp_clangd_executable* -b:ale_objcpp_clangd_options ale-objcpp.txt /*b:ale_objcpp_clangd_options* -b:ale_ocaml_ocamlformat_executable ale-ocaml.txt /*b:ale_ocaml_ocamlformat_executable* -b:ale_ocaml_ocamlformat_options ale-ocaml.txt /*b:ale_ocaml_ocamlformat_options* -b:ale_ocaml_ocamllsp_use_opam ale-ocaml.txt /*b:ale_ocaml_ocamllsp_use_opam* -b:ale_ocaml_ocp_indent_config ale-ocaml.txt /*b:ale_ocaml_ocp_indent_config* -b:ale_ocaml_ocp_indent_executable ale-ocaml.txt /*b:ale_ocaml_ocp_indent_executable* -b:ale_ocaml_ocp_indent_options ale-ocaml.txt /*b:ale_ocaml_ocp_indent_options* -b:ale_ocaml_ols_executable ale-ocaml.txt /*b:ale_ocaml_ols_executable* -b:ale_ocaml_ols_use_global ale-ocaml.txt /*b:ale_ocaml_ols_use_global* -b:ale_open_list ale.txt /*b:ale_open_list* -b:ale_openapi_ibm_validator_executable ale-openapi.txt /*b:ale_openapi_ibm_validator_executable* -b:ale_openapi_ibm_validator_options ale-openapi.txt /*b:ale_openapi_ibm_validator_options* -b:ale_pascal_ptop_executable ale-pascal.txt /*b:ale_pascal_ptop_executable* -b:ale_pascal_ptop_options ale-pascal.txt /*b:ale_pascal_ptop_options* -b:ale_perl6_perl6_executable ale-perl6.txt /*b:ale_perl6_perl6_executable* -b:ale_perl6_perl6_options ale-perl6.txt /*b:ale_perl6_perl6_options* -b:ale_perl_perl_executable ale-perl.txt /*b:ale_perl_perl_executable* -b:ale_perl_perl_options ale-perl.txt /*b:ale_perl_perl_options* -b:ale_perl_perlcritic_executable ale-perl.txt /*b:ale_perl_perlcritic_executable* -b:ale_perl_perlcritic_options ale-perl.txt /*b:ale_perl_perlcritic_options* -b:ale_perl_perlcritic_profile ale-perl.txt /*b:ale_perl_perlcritic_profile* -b:ale_perl_perltidy_options ale-perl.txt /*b:ale_perl_perltidy_options* -b:ale_php_cs_fixer_executable ale-php.txt /*b:ale_php_cs_fixer_executable* -b:ale_php_cs_fixer_options ale-php.txt /*b:ale_php_cs_fixer_options* -b:ale_php_cs_fixer_use_global ale-php.txt /*b:ale_php_cs_fixer_use_global* -b:ale_php_intelephense_config ale-php.txt /*b:ale_php_intelephense_config* -b:ale_php_intelephense_executable ale-php.txt /*b:ale_php_intelephense_executable* -b:ale_php_intelephense_use_global ale-php.txt /*b:ale_php_intelephense_use_global* -b:ale_php_langserver_executable ale-php.txt /*b:ale_php_langserver_executable* -b:ale_php_langserver_use_global ale-php.txt /*b:ale_php_langserver_use_global* -b:ale_php_phan_executable ale-php.txt /*b:ale_php_phan_executable* -b:ale_php_phan_minimum_severity ale-php.txt /*b:ale_php_phan_minimum_severity* -b:ale_php_phan_use_client ale-php.txt /*b:ale_php_phan_use_client* -b:ale_php_php_executable ale-php.txt /*b:ale_php_php_executable* -b:ale_php_phpcbf_executable ale-php.txt /*b:ale_php_phpcbf_executable* -b:ale_php_phpcbf_options ale-php.txt /*b:ale_php_phpcbf_options* -b:ale_php_phpcbf_standard ale-php.txt /*b:ale_php_phpcbf_standard* -b:ale_php_phpcbf_use_global ale-php.txt /*b:ale_php_phpcbf_use_global* -b:ale_php_phpcs_executable ale-php.txt /*b:ale_php_phpcs_executable* -b:ale_php_phpcs_options ale-php.txt /*b:ale_php_phpcs_options* -b:ale_php_phpcs_standard ale-php.txt /*b:ale_php_phpcs_standard* -b:ale_php_phpcs_use_global ale-php.txt /*b:ale_php_phpcs_use_global* -b:ale_php_phpmd_executable ale-php.txt /*b:ale_php_phpmd_executable* -b:ale_php_phpmd_ruleset ale-php.txt /*b:ale_php_phpmd_ruleset* -b:ale_php_phpstan_autoload ale-php.txt /*b:ale_php_phpstan_autoload* -b:ale_php_phpstan_configuration ale-php.txt /*b:ale_php_phpstan_configuration* -b:ale_php_phpstan_executable ale-php.txt /*b:ale_php_phpstan_executable* -b:ale_php_phpstan_level ale-php.txt /*b:ale_php_phpstan_level* -b:ale_php_psalm_executable ale-php.txt /*b:ale_php_psalm_executable* -b:ale_php_psalm_options ale-php.txt /*b:ale_php_psalm_options* -b:ale_php_psalm_use_global ale-php.txt /*b:ale_php_psalm_use_global* -b:ale_php_tlint_executable ale-php.txt /*b:ale_php_tlint_executable* -b:ale_php_tlint_options ale-php.txt /*b:ale_php_tlint_options* -b:ale_php_tlint_use_global ale-php.txt /*b:ale_php_tlint_use_global* -b:ale_pony_ponyc_executable ale-pony.txt /*b:ale_pony_ponyc_executable* -b:ale_pony_ponyc_options ale-pony.txt /*b:ale_pony_ponyc_options* -b:ale_powershell_powershell_executable ale-powershell.txt /*b:ale_powershell_powershell_executable* -b:ale_powershell_psscriptanalyzer_exclusions ale-powershell.txt /*b:ale_powershell_psscriptanalyzer_exclusions* -b:ale_powershell_psscriptanalyzer_executable ale-powershell.txt /*b:ale_powershell_psscriptanalyzer_executable* -b:ale_powershell_psscriptanalyzer_module ale-powershell.txt /*b:ale_powershell_psscriptanalyzer_module* -b:ale_prolog_swipl_alarm ale-prolog.txt /*b:ale_prolog_swipl_alarm* -b:ale_prolog_swipl_alarm_handler ale-prolog.txt /*b:ale_prolog_swipl_alarm_handler* -b:ale_prolog_swipl_executable ale-prolog.txt /*b:ale_prolog_swipl_executable* -b:ale_prolog_swipl_load ale-prolog.txt /*b:ale_prolog_swipl_load* -b:ale_prolog_swipl_timeout ale-prolog.txt /*b:ale_prolog_swipl_timeout* -b:ale_pug_puglint_executable ale-pug.txt /*b:ale_pug_puglint_executable* -b:ale_pug_puglint_options ale-pug.txt /*b:ale_pug_puglint_options* -b:ale_pug_puglint_use_global ale-pug.txt /*b:ale_pug_puglint_use_global* -b:ale_puppet_languageserver_executable ale-puppet.txt /*b:ale_puppet_languageserver_executable* -b:ale_puppet_puppet_executable ale-puppet.txt /*b:ale_puppet_puppet_executable* -b:ale_puppet_puppet_options ale-puppet.txt /*b:ale_puppet_puppet_options* -b:ale_puppet_puppetlint_executable ale-puppet.txt /*b:ale_puppet_puppetlint_executable* -b:ale_puppet_puppetlint_options ale-puppet.txt /*b:ale_puppet_puppetlint_options* -b:ale_purescript_purty_executable ale-purescript.txt /*b:ale_purescript_purty_executable* -b:ale_purescript_tidy_executable ale-purescript.txt /*b:ale_purescript_tidy_executable* -b:ale_purescript_tidy_options ale-purescript.txt /*b:ale_purescript_tidy_options* -b:ale_purescript_tidy_use_global ale-purescript.txt /*b:ale_purescript_tidy_use_global* -b:ale_pyrex_cython_executable ale-pyrex.txt /*b:ale_pyrex_cython_executable* -b:ale_pyrex_cython_options ale-pyrex.txt /*b:ale_pyrex_cython_options* -b:ale_python_auto_pipenv ale-python.txt /*b:ale_python_auto_pipenv* -b:ale_python_auto_poetry ale-python.txt /*b:ale_python_auto_poetry* -b:ale_python_autoflake_executable ale-python.txt /*b:ale_python_autoflake_executable* -b:ale_python_autoflake_options ale-python.txt /*b:ale_python_autoflake_options* -b:ale_python_autoflake_use_global ale-python.txt /*b:ale_python_autoflake_use_global* -b:ale_python_autoimport_executable ale-python.txt /*b:ale_python_autoimport_executable* -b:ale_python_autoimport_options ale-python.txt /*b:ale_python_autoimport_options* -b:ale_python_autoimport_use_global ale-python.txt /*b:ale_python_autoimport_use_global* -b:ale_python_autopep8_executable ale-python.txt /*b:ale_python_autopep8_executable* -b:ale_python_autopep8_options ale-python.txt /*b:ale_python_autopep8_options* -b:ale_python_autopep8_use_global ale-python.txt /*b:ale_python_autopep8_use_global* -b:ale_python_bandit_auto_pipenv ale-python.txt /*b:ale_python_bandit_auto_pipenv* -b:ale_python_bandit_auto_poetry ale-python.txt /*b:ale_python_bandit_auto_poetry* -b:ale_python_bandit_executable ale-python.txt /*b:ale_python_bandit_executable* -b:ale_python_bandit_options ale-python.txt /*b:ale_python_bandit_options* -b:ale_python_bandit_use_config ale-python.txt /*b:ale_python_bandit_use_config* -b:ale_python_bandit_use_global ale-python.txt /*b:ale_python_bandit_use_global* -b:ale_python_black_auto_pipenv ale-python.txt /*b:ale_python_black_auto_pipenv* -b:ale_python_black_auto_poetry ale-python.txt /*b:ale_python_black_auto_poetry* -b:ale_python_black_change_directory ale-python.txt /*b:ale_python_black_change_directory* -b:ale_python_black_executable ale-python.txt /*b:ale_python_black_executable* -b:ale_python_black_options ale-python.txt /*b:ale_python_black_options* -b:ale_python_black_use_global ale-python.txt /*b:ale_python_black_use_global* -b:ale_python_flake8_auto_pipenv ale-python.txt /*b:ale_python_flake8_auto_pipenv* -b:ale_python_flake8_auto_poetry ale-python.txt /*b:ale_python_flake8_auto_poetry* -b:ale_python_flake8_change_directory ale-python.txt /*b:ale_python_flake8_change_directory* -b:ale_python_flake8_executable ale-python.txt /*b:ale_python_flake8_executable* -b:ale_python_flake8_options ale-python.txt /*b:ale_python_flake8_options* -b:ale_python_flake8_use_global ale-python.txt /*b:ale_python_flake8_use_global* -b:ale_python_flakehell_auto_pipenv ale-python.txt /*b:ale_python_flakehell_auto_pipenv* -b:ale_python_flakehell_auto_poetry ale-python.txt /*b:ale_python_flakehell_auto_poetry* -b:ale_python_flakehell_change_directory ale-python.txt /*b:ale_python_flakehell_change_directory* -b:ale_python_flakehell_executable ale-python.txt /*b:ale_python_flakehell_executable* -b:ale_python_flakehell_options ale-python.txt /*b:ale_python_flakehell_options* -b:ale_python_flakehell_use_global ale-python.txt /*b:ale_python_flakehell_use_global* -b:ale_python_isort_auto_pipenv ale-python.txt /*b:ale_python_isort_auto_pipenv* -b:ale_python_isort_auto_poetry ale-python.txt /*b:ale_python_isort_auto_poetry* -b:ale_python_isort_executable ale-python.txt /*b:ale_python_isort_executable* -b:ale_python_isort_options ale-python.txt /*b:ale_python_isort_options* -b:ale_python_isort_use_global ale-python.txt /*b:ale_python_isort_use_global* -b:ale_python_mypy_auto_pipenv ale-python.txt /*b:ale_python_mypy_auto_pipenv* -b:ale_python_mypy_auto_poetry ale-python.txt /*b:ale_python_mypy_auto_poetry* -b:ale_python_mypy_executable ale-python.txt /*b:ale_python_mypy_executable* -b:ale_python_mypy_ignore_invalid_syntax ale-python.txt /*b:ale_python_mypy_ignore_invalid_syntax* -b:ale_python_mypy_options ale-python.txt /*b:ale_python_mypy_options* -b:ale_python_mypy_show_notes ale-python.txt /*b:ale_python_mypy_show_notes* -b:ale_python_mypy_use_global ale-python.txt /*b:ale_python_mypy_use_global* -b:ale_python_prospector_auto_pipenv ale-python.txt /*b:ale_python_prospector_auto_pipenv* -b:ale_python_prospector_auto_poetry ale-python.txt /*b:ale_python_prospector_auto_poetry* -b:ale_python_prospector_executable ale-python.txt /*b:ale_python_prospector_executable* -b:ale_python_prospector_options ale-python.txt /*b:ale_python_prospector_options* -b:ale_python_prospector_use_global ale-python.txt /*b:ale_python_prospector_use_global* -b:ale_python_pycodestyle_auto_pipenv ale-python.txt /*b:ale_python_pycodestyle_auto_pipenv* -b:ale_python_pycodestyle_auto_poetry ale-python.txt /*b:ale_python_pycodestyle_auto_poetry* -b:ale_python_pycodestyle_executable ale-python.txt /*b:ale_python_pycodestyle_executable* -b:ale_python_pycodestyle_options ale-python.txt /*b:ale_python_pycodestyle_options* -b:ale_python_pycodestyle_use_global ale-python.txt /*b:ale_python_pycodestyle_use_global* -b:ale_python_pydocstyle_auto_pipenv ale-python.txt /*b:ale_python_pydocstyle_auto_pipenv* -b:ale_python_pydocstyle_auto_poetry ale-python.txt /*b:ale_python_pydocstyle_auto_poetry* -b:ale_python_pydocstyle_executable ale-python.txt /*b:ale_python_pydocstyle_executable* -b:ale_python_pydocstyle_options ale-python.txt /*b:ale_python_pydocstyle_options* -b:ale_python_pydocstyle_use_global ale-python.txt /*b:ale_python_pydocstyle_use_global* -b:ale_python_pyflakes_auto_pipenv ale-python.txt /*b:ale_python_pyflakes_auto_pipenv* -b:ale_python_pyflakes_auto_poetry ale-python.txt /*b:ale_python_pyflakes_auto_poetry* -b:ale_python_pyflakes_executable ale-python.txt /*b:ale_python_pyflakes_executable* -b:ale_python_pylama_auto_pipenv ale-python.txt /*b:ale_python_pylama_auto_pipenv* -b:ale_python_pylama_auto_poetry ale-python.txt /*b:ale_python_pylama_auto_poetry* -b:ale_python_pylama_change_directory ale-python.txt /*b:ale_python_pylama_change_directory* -b:ale_python_pylama_executable ale-python.txt /*b:ale_python_pylama_executable* -b:ale_python_pylama_options ale-python.txt /*b:ale_python_pylama_options* -b:ale_python_pylama_use_global ale-python.txt /*b:ale_python_pylama_use_global* -b:ale_python_pylint_auto_pipenv ale-python.txt /*b:ale_python_pylint_auto_pipenv* -b:ale_python_pylint_auto_poetry ale-python.txt /*b:ale_python_pylint_auto_poetry* -b:ale_python_pylint_change_directory ale-python.txt /*b:ale_python_pylint_change_directory* -b:ale_python_pylint_executable ale-python.txt /*b:ale_python_pylint_executable* -b:ale_python_pylint_options ale-python.txt /*b:ale_python_pylint_options* -b:ale_python_pylint_use_global ale-python.txt /*b:ale_python_pylint_use_global* -b:ale_python_pylint_use_msg_id ale-python.txt /*b:ale_python_pylint_use_msg_id* -b:ale_python_pylsp_auto_pipenv ale-python.txt /*b:ale_python_pylsp_auto_pipenv* -b:ale_python_pylsp_auto_poetry ale-python.txt /*b:ale_python_pylsp_auto_poetry* -b:ale_python_pylsp_config ale-python.txt /*b:ale_python_pylsp_config* -b:ale_python_pylsp_executable ale-python.txt /*b:ale_python_pylsp_executable* -b:ale_python_pylsp_options ale-python.txt /*b:ale_python_pylsp_options* -b:ale_python_pylsp_use_global ale-python.txt /*b:ale_python_pylsp_use_global* -b:ale_python_pyre_auto_pipenv ale-python.txt /*b:ale_python_pyre_auto_pipenv* -b:ale_python_pyre_auto_poetry ale-python.txt /*b:ale_python_pyre_auto_poetry* -b:ale_python_pyre_executable ale-python.txt /*b:ale_python_pyre_executable* -b:ale_python_pyre_use_global ale-python.txt /*b:ale_python_pyre_use_global* -b:ale_python_pyright_config ale-python.txt /*b:ale_python_pyright_config* -b:ale_python_pyright_executable ale-python.txt /*b:ale_python_pyright_executable* -b:ale_python_reorder_python_imports_executable ale-python.txt /*b:ale_python_reorder_python_imports_executable* -b:ale_python_reorder_python_imports_options ale-python.txt /*b:ale_python_reorder_python_imports_options* -b:ale_python_reorder_python_imports_use_global ale-python.txt /*b:ale_python_reorder_python_imports_use_global* -b:ale_python_vulture_change_directory ale-python.txt /*b:ale_python_vulture_change_directory* -b:ale_python_vulture_executable ale-python.txt /*b:ale_python_vulture_executable* -b:ale_python_vulture_options ale-python.txt /*b:ale_python_vulture_options* -b:ale_python_vulture_use_global ale-python.txt /*b:ale_python_vulture_use_global* -b:ale_python_yapf_executable ale-python.txt /*b:ale_python_yapf_executable* -b:ale_python_yapf_use_global ale-python.txt /*b:ale_python_yapf_use_global* -b:ale_qml_qmlfmt_executable ale-qml.txt /*b:ale_qml_qmlfmt_executable* -b:ale_r_languageserver_cmd ale-r.txt /*b:ale_r_languageserver_cmd* -b:ale_r_languageserver_config ale-r.txt /*b:ale_r_languageserver_config* -b:ale_r_lintr_lint_package ale-r.txt /*b:ale_r_lintr_lint_package* -b:ale_r_lintr_options ale-r.txt /*b:ale_r_lintr_options* -b:ale_r_styler_options ale-r.txt /*b:ale_r_styler_options* -b:ale_reason_ls_executable ale-reasonml.txt /*b:ale_reason_ls_executable* -b:ale_reason_ols_executable ale-reasonml.txt /*b:ale_reason_ols_executable* -b:ale_reason_ols_use_global ale-reasonml.txt /*b:ale_reason_ols_use_global* -b:ale_reasonml_refmt_executable ale-reasonml.txt /*b:ale_reasonml_refmt_executable* -b:ale_reasonml_refmt_options ale-reasonml.txt /*b:ale_reasonml_refmt_options* -b:ale_robot_rflint_executable ale-robot.txt /*b:ale_robot_rflint_executable* -b:ale_root ale.txt /*b:ale_root* -b:ale_ruby_brakeman_executable ale-ruby.txt /*b:ale_ruby_brakeman_executable* -b:ale_ruby_brakeman_options ale-ruby.txt /*b:ale_ruby_brakeman_options* -b:ale_ruby_debride_executable ale-ruby.txt /*b:ale_ruby_debride_executable* -b:ale_ruby_debride_options ale-ruby.txt /*b:ale_ruby_debride_options* -b:ale_ruby_erblint_options ale-eruby.txt /*b:ale_ruby_erblint_options* -b:ale_ruby_rails_best_practices_executable ale-ruby.txt /*b:ale_ruby_rails_best_practices_executable* -b:ale_ruby_rails_best_practices_options ale-ruby.txt /*b:ale_ruby_rails_best_practices_options* -b:ale_ruby_reek_executable ale-ruby.txt /*b:ale_ruby_reek_executable* -b:ale_ruby_reek_show_context ale-ruby.txt /*b:ale_ruby_reek_show_context* -b:ale_ruby_reek_show_wiki_link ale-ruby.txt /*b:ale_ruby_reek_show_wiki_link* -b:ale_ruby_rubocop_auto_correct_all ale-ruby.txt /*b:ale_ruby_rubocop_auto_correct_all* -b:ale_ruby_rubocop_executable ale-ruby.txt /*b:ale_ruby_rubocop_executable* -b:ale_ruby_rubocop_options ale-ruby.txt /*b:ale_ruby_rubocop_options* -b:ale_ruby_ruby_executable ale-ruby.txt /*b:ale_ruby_ruby_executable* -b:ale_ruby_rufo_executable ale-ruby.txt /*b:ale_ruby_rufo_executable* -b:ale_ruby_ruumba_options ale-eruby.txt /*b:ale_ruby_ruumba_options* -b:ale_ruby_solargraph_executable ale-ruby.txt /*b:ale_ruby_solargraph_executable* -b:ale_ruby_sorbet_enable_watchman ale-ruby.txt /*b:ale_ruby_sorbet_enable_watchman* -b:ale_ruby_sorbet_executable ale-ruby.txt /*b:ale_ruby_sorbet_executable* -b:ale_ruby_sorbet_options ale-ruby.txt /*b:ale_ruby_sorbet_options* -b:ale_ruby_standardrb_executable ale-ruby.txt /*b:ale_ruby_standardrb_executable* -b:ale_ruby_standardrb_options ale-ruby.txt /*b:ale_ruby_standardrb_options* -b:ale_rust_analyzer_config ale-rust.txt /*b:ale_rust_analyzer_config* -b:ale_rust_analyzer_executable ale-rust.txt /*b:ale_rust_analyzer_executable* -b:ale_rust_cargo_avoid_whole_workspace ale-rust.txt /*b:ale_rust_cargo_avoid_whole_workspace* -b:ale_rust_cargo_check_all_targets ale-rust.txt /*b:ale_rust_cargo_check_all_targets* -b:ale_rust_cargo_check_examples ale-rust.txt /*b:ale_rust_cargo_check_examples* -b:ale_rust_cargo_check_tests ale-rust.txt /*b:ale_rust_cargo_check_tests* -b:ale_rust_cargo_clippy_options ale-rust.txt /*b:ale_rust_cargo_clippy_options* -b:ale_rust_cargo_default_feature_behavior ale-rust.txt /*b:ale_rust_cargo_default_feature_behavior* -b:ale_rust_cargo_include_features ale-rust.txt /*b:ale_rust_cargo_include_features* -b:ale_rust_cargo_target_dir ale-rust.txt /*b:ale_rust_cargo_target_dir* -b:ale_rust_cargo_use_check ale-rust.txt /*b:ale_rust_cargo_use_check* -b:ale_rust_cargo_use_clippy ale-rust.txt /*b:ale_rust_cargo_use_clippy* -b:ale_rust_ignore_error_codes ale-rust.txt /*b:ale_rust_ignore_error_codes* -b:ale_rust_ignore_secondary_spans ale-rust.txt /*b:ale_rust_ignore_secondary_spans* -b:ale_rust_rls_config ale-rust.txt /*b:ale_rust_rls_config* -b:ale_rust_rls_executable ale-rust.txt /*b:ale_rust_rls_executable* -b:ale_rust_rls_toolchain ale-rust.txt /*b:ale_rust_rls_toolchain* -b:ale_rust_rustc_options ale-rust.txt /*b:ale_rust_rustc_options* -b:ale_rust_rustfmt_options ale-rust.txt /*b:ale_rust_rustfmt_options* -b:ale_sass_stylelint_executable ale-sass.txt /*b:ale_sass_stylelint_executable* -b:ale_sass_stylelint_use_global ale-sass.txt /*b:ale_sass_stylelint_use_global* -b:ale_scala_metals_executable ale-scala.txt /*b:ale_scala_metals_executable* -b:ale_scala_metals_project_root ale-scala.txt /*b:ale_scala_metals_project_root* -b:ale_scala_sbtserver_address ale-scala.txt /*b:ale_scala_sbtserver_address* -b:ale_scala_sbtserver_project_root ale-scala.txt /*b:ale_scala_sbtserver_project_root* -b:ale_scala_scalafmt_executable ale-scala.txt /*b:ale_scala_scalafmt_executable* -b:ale_scala_scalafmt_options ale-scala.txt /*b:ale_scala_scalafmt_options* -b:ale_scala_scalastyle_config ale-scala.txt /*b:ale_scala_scalastyle_config* -b:ale_scala_scalastyle_options ale-scala.txt /*b:ale_scala_scalastyle_options* -b:ale_scss_sasslint_executable ale-scss.txt /*b:ale_scss_sasslint_executable* -b:ale_scss_sasslint_options ale-scss.txt /*b:ale_scss_sasslint_options* -b:ale_scss_sasslint_use_global ale-scss.txt /*b:ale_scss_sasslint_use_global* -b:ale_scss_stylelint_executable ale-scss.txt /*b:ale_scss_stylelint_executable* -b:ale_scss_stylelint_options ale-scss.txt /*b:ale_scss_stylelint_options* -b:ale_scss_stylelint_use_global ale-scss.txt /*b:ale_scss_stylelint_use_global* -b:ale_set_balloons ale.txt /*b:ale_set_balloons* -b:ale_set_balloons_legacy_echo ale.txt /*b:ale_set_balloons_legacy_echo* -b:ale_sh_bashate_executable ale-sh.txt /*b:ale_sh_bashate_executable* -b:ale_sh_bashate_options ale-sh.txt /*b:ale_sh_bashate_options* -b:ale_sh_language_server_executable ale-sh.txt /*b:ale_sh_language_server_executable* -b:ale_sh_language_server_use_global ale-sh.txt /*b:ale_sh_language_server_use_global* -b:ale_sh_shell_default_shell ale-sh.txt /*b:ale_sh_shell_default_shell* -b:ale_sh_shellcheck_change_directory ale-sh.txt /*b:ale_sh_shellcheck_change_directory* -b:ale_sh_shellcheck_dialect ale-sh.txt /*b:ale_sh_shellcheck_dialect* -b:ale_sh_shellcheck_exclusions ale-sh.txt /*b:ale_sh_shellcheck_exclusions* -b:ale_sh_shellcheck_executable ale-sh.txt /*b:ale_sh_shellcheck_executable* -b:ale_sh_shellcheck_options ale-sh.txt /*b:ale_sh_shellcheck_options* -b:ale_sh_shfmt_options ale-sh.txt /*b:ale_sh_shfmt_options* -b:ale_sml_smlnj_cm_file ale-sml.txt /*b:ale_sml_smlnj_cm_file* -b:ale_solidity_solc_executable ale-solidity.txt /*b:ale_solidity_solc_executable* -b:ale_solidity_solc_options ale-solidity.txt /*b:ale_solidity_solc_options* -b:ale_sourcekit_lsp_executable ale-swift.txt /*b:ale_sourcekit_lsp_executable* -b:ale_spec_rpmlint_executable ale-spec.txt /*b:ale_spec_rpmlint_executable* -b:ale_spec_rpmlint_options ale-spec.txt /*b:ale_spec_rpmlint_options* -b:ale_sql_pgformatter_executable ale-sql.txt /*b:ale_sql_pgformatter_executable* -b:ale_sql_pgformatter_options ale-sql.txt /*b:ale_sql_pgformatter_options* -b:ale_sql_sqlfmt_executable ale-sql.txt /*b:ale_sql_sqlfmt_executable* -b:ale_sql_sqlfmt_options ale-sql.txt /*b:ale_sql_sqlfmt_options* -b:ale_sql_sqlformat_executable ale-sql.txt /*b:ale_sql_sqlformat_executable* -b:ale_sql_sqlformat_options ale-sql.txt /*b:ale_sql_sqlformat_options* -b:ale_stylus_stylelint_executable ale-stylus.txt /*b:ale_stylus_stylelint_executable* -b:ale_stylus_stylelint_options ale-stylus.txt /*b:ale_stylus_stylelint_options* -b:ale_stylus_stylelint_use_global ale-stylus.txt /*b:ale_stylus_stylelint_use_global* -b:ale_sugarss_stylelint_executable ale-sugarss.txt /*b:ale_sugarss_stylelint_executable* -b:ale_sugarss_stylelint_options ale-sugarss.txt /*b:ale_sugarss_stylelint_options* -b:ale_sugarss_stylelint_use_global ale-sugarss.txt /*b:ale_sugarss_stylelint_use_global* -b:ale_svelte_svelteserver_executable ale-svelte.txt /*b:ale_svelte_svelteserver_executable* -b:ale_svelte_svelteserver_use_global ale-svelte.txt /*b:ale_svelte_svelteserver_use_global* -b:ale_swift_appleswiftformat_executable ale-swift.txt /*b:ale_swift_appleswiftformat_executable* -b:ale_swift_appleswiftformat_use_swiftpm ale-swift.txt /*b:ale_swift_appleswiftformat_use_swiftpm* -b:ale_tcl_nagelfar_executable ale-tcl.txt /*b:ale_tcl_nagelfar_executable* -b:ale_tcl_nagelfar_options ale-tcl.txt /*b:ale_tcl_nagelfar_options* -b:ale_terraform_fmt_executable ale-terraform.txt /*b:ale_terraform_fmt_executable* -b:ale_terraform_fmt_options ale-terraform.txt /*b:ale_terraform_fmt_options* -b:ale_terraform_langserver_executable ale-terraform.txt /*b:ale_terraform_langserver_executable* -b:ale_terraform_langserver_options ale-terraform.txt /*b:ale_terraform_langserver_options* -b:ale_terraform_ls_executable ale-terraform.txt /*b:ale_terraform_ls_executable* -b:ale_terraform_ls_options ale-terraform.txt /*b:ale_terraform_ls_options* -b:ale_terraform_terraform_executable ale-terraform.txt /*b:ale_terraform_terraform_executable* -b:ale_terraform_tflint_executable ale-terraform.txt /*b:ale_terraform_tflint_executable* -b:ale_terraform_tflint_options ale-terraform.txt /*b:ale_terraform_tflint_options* -b:ale_tex_chktex_executable ale-tex.txt /*b:ale_tex_chktex_executable* -b:ale_tex_chktex_options ale-tex.txt /*b:ale_tex_chktex_options* -b:ale_tex_latexindent_executable ale-tex.txt /*b:ale_tex_latexindent_executable* -b:ale_tex_latexindent_options ale-tex.txt /*b:ale_tex_latexindent_options* -b:ale_tex_texlab_executable ale-tex.txt /*b:ale_tex_texlab_executable* -b:ale_tex_texlab_options ale-tex.txt /*b:ale_tex_texlab_options* -b:ale_textlint_executable ale-text.txt /*b:ale_textlint_executable* -b:ale_textlint_options ale-text.txt /*b:ale_textlint_options* -b:ale_textlint_use_global ale-text.txt /*b:ale_textlint_use_global* -b:ale_thrift_thrift_executable ale-thrift.txt /*b:ale_thrift_thrift_executable* -b:ale_thrift_thrift_generators ale-thrift.txt /*b:ale_thrift_thrift_generators* -b:ale_thrift_thrift_includes ale-thrift.txt /*b:ale_thrift_thrift_includes* -b:ale_thrift_thrift_options ale-thrift.txt /*b:ale_thrift_thrift_options* -b:ale_thrift_thriftcheck_executable ale-thrift.txt /*b:ale_thrift_thriftcheck_executable* -b:ale_thrift_thriftcheck_options ale-thrift.txt /*b:ale_thrift_thriftcheck_options* -b:ale_type_map ale.txt /*b:ale_type_map* -b:ale_typescript_standard_executable ale-typescript.txt /*b:ale_typescript_standard_executable* -b:ale_typescript_standard_options ale-typescript.txt /*b:ale_typescript_standard_options* -b:ale_typescript_standard_use_global ale-typescript.txt /*b:ale_typescript_standard_use_global* -b:ale_typescript_tslint_config_path ale-typescript.txt /*b:ale_typescript_tslint_config_path* -b:ale_typescript_tslint_executable ale-typescript.txt /*b:ale_typescript_tslint_executable* -b:ale_typescript_tslint_ignore_empty_files ale-typescript.txt /*b:ale_typescript_tslint_ignore_empty_files* -b:ale_typescript_tslint_rules_dir ale-typescript.txt /*b:ale_typescript_tslint_rules_dir* -b:ale_typescript_tslint_use_global ale-typescript.txt /*b:ale_typescript_tslint_use_global* -b:ale_typescript_tsserver_config_path ale-typescript.txt /*b:ale_typescript_tsserver_config_path* -b:ale_typescript_tsserver_executable ale-typescript.txt /*b:ale_typescript_tsserver_executable* -b:ale_typescript_tsserver_use_global ale-typescript.txt /*b:ale_typescript_tsserver_use_global* -b:ale_typescript_xo_executable ale-typescript.txt /*b:ale_typescript_xo_executable* -b:ale_typescript_xo_options ale-typescript.txt /*b:ale_typescript_xo_options* -b:ale_typescript_xo_use_global ale-typescript.txt /*b:ale_typescript_xo_use_global* -b:ale_update_tagstack ale.txt /*b:ale_update_tagstack* -b:ale_v_v_executable ale-v.txt /*b:ale_v_v_executable* -b:ale_v_v_options ale-v.txt /*b:ale_v_v_options* -b:ale_v_vfmt_options ale-v.txt /*b:ale_v_vfmt_options* -b:ale_verilog_verilator_options ale-verilog.txt /*b:ale_verilog_verilator_options* -b:ale_verilog_vlog_executable ale-verilog.txt /*b:ale_verilog_vlog_executable* -b:ale_verilog_vlog_options ale-verilog.txt /*b:ale_verilog_vlog_options* -b:ale_verilog_xvlog_executable ale-verilog.txt /*b:ale_verilog_xvlog_executable* -b:ale_verilog_xvlog_options ale-verilog.txt /*b:ale_verilog_xvlog_options* -b:ale_verilog_yosys_executable ale-verilog.txt /*b:ale_verilog_yosys_executable* -b:ale_verilog_yosys_options ale-verilog.txt /*b:ale_verilog_yosys_options* -b:ale_vhdl_ghdl_executable ale-vhdl.txt /*b:ale_vhdl_ghdl_executable* -b:ale_vhdl_ghdl_options ale-vhdl.txt /*b:ale_vhdl_ghdl_options* -b:ale_vhdl_vcom_executable ale-vhdl.txt /*b:ale_vhdl_vcom_executable* -b:ale_vhdl_vcom_options ale-vhdl.txt /*b:ale_vhdl_vcom_options* -b:ale_vhdl_xvhdl_executable ale-vhdl.txt /*b:ale_vhdl_xvhdl_executable* -b:ale_vhdl_xvhdl_options ale-vhdl.txt /*b:ale_vhdl_xvhdl_options* -b:ale_vim_vimls_config ale-vim.txt /*b:ale_vim_vimls_config* -b:ale_vim_vimls_executable ale-vim.txt /*b:ale_vim_vimls_executable* -b:ale_vim_vimls_use_global ale-vim.txt /*b:ale_vim_vimls_use_global* -b:ale_vim_vint_executable ale-vim.txt /*b:ale_vim_vint_executable* -b:ale_vim_vint_show_style_issues ale-vim.txt /*b:ale_vim_vint_show_style_issues* -b:ale_virtualenv_dir_names ale.txt /*b:ale_virtualenv_dir_names* -b:ale_virtualtext_delay ale.txt /*b:ale_virtualtext_delay* -b:ale_vue_vls_executable ale-vue.txt /*b:ale_vue_vls_executable* -b:ale_vue_vls_use_global ale-vue.txt /*b:ale_vue_vls_use_global* -b:ale_warn_about_trailing_blank_lines ale.txt /*b:ale_warn_about_trailing_blank_lines* -b:ale_warn_about_trailing_whitespace ale.txt /*b:ale_warn_about_trailing_whitespace* -b:ale_windows_node_executable_path ale.txt /*b:ale_windows_node_executable_path* -b:ale_writegood_executable ale.txt /*b:ale_writegood_executable* -b:ale_writegood_options ale.txt /*b:ale_writegood_options* -b:ale_writegood_use_global ale.txt /*b:ale_writegood_use_global* -b:ale_xml_xmllint_executable ale-xml.txt /*b:ale_xml_xmllint_executable* -b:ale_xml_xmllint_indentsize ale-xml.txt /*b:ale_xml_xmllint_indentsize* -b:ale_xml_xmllint_options ale-xml.txt /*b:ale_xml_xmllint_options* -b:ale_yaml_spectral_executable ale-yaml.txt /*b:ale_yaml_spectral_executable* -b:ale_yaml_spectral_use_global ale-yaml.txt /*b:ale_yaml_spectral_use_global* -b:ale_yaml_swaglint_executable ale-yaml.txt /*b:ale_yaml_swaglint_executable* -b:ale_yaml_swaglint_use_global ale-yaml.txt /*b:ale_yaml_swaglint_use_global* -b:ale_yaml_yamlfix_executable ale-yaml.txt /*b:ale_yaml_yamlfix_executable* -b:ale_yaml_yamlfix_options ale-yaml.txt /*b:ale_yaml_yamlfix_options* -b:ale_yaml_yamlfix_use_global ale-yaml.txt /*b:ale_yaml_yamlfix_use_global* -b:ale_yaml_yamllint_executable ale-yaml.txt /*b:ale_yaml_yamllint_executable* -b:ale_yaml_yamllint_options ale-yaml.txt /*b:ale_yaml_yamllint_options* -b:ale_yang_lsp_executable ale-yang.txt /*b:ale_yang_lsp_executable* -b:ale_zeek_zeek_executable ale-zeek.txt /*b:ale_zeek_zeek_executable* -b:ale_zig_zls_config ale-zig.txt /*b:ale_zig_zls_config* -b:ale_zig_zls_executable ale-zig.txt /*b:ale_zig_zls_executable* -b:vala_vala_lint_config_filename ale-vala.txt /*b:vala_vala_lint_config_filename* -b:vala_vala_lint_executable ale-vala.txt /*b:vala_vala_lint_executable* -g:airline#extensions#ale#enabled ale.txt /*g:airline#extensions#ale#enabled* -g:ale-c-flawfinder ale-c.txt /*g:ale-c-flawfinder* -g:ale-cpp-flawfinder ale-cpp.txt /*g:ale-cpp-flawfinder* -g:ale_ada_adals_encoding ale-ada.txt /*g:ale_ada_adals_encoding* -g:ale_ada_adals_executable ale-ada.txt /*g:ale_ada_adals_executable* -g:ale_ada_adals_project ale-ada.txt /*g:ale_ada_adals_project* -g:ale_ada_gcc_executable ale-ada.txt /*g:ale_ada_gcc_executable* -g:ale_ada_gcc_options ale-ada.txt /*g:ale_ada_gcc_options* -g:ale_ada_gnatpp_options ale-ada.txt /*g:ale_ada_gnatpp_options* -g:ale_alex_executable ale.txt /*g:ale_alex_executable* -g:ale_alex_use_global ale.txt /*g:ale_alex_use_global* -g:ale_ansible_ansible_lint_executable ale-ansible.txt /*g:ale_ansible_ansible_lint_executable* -g:ale_apkbuild_apkbuild_lint_executable ale-apkbuild.txt /*g:ale_apkbuild_apkbuild_lint_executable* -g:ale_apkbuild_secfixes_check_executable ale-apkbuild.txt /*g:ale_apkbuild_secfixes_check_executable* -g:ale_asm_gcc_executable ale-asm.txt /*g:ale_asm_gcc_executable* -g:ale_asm_gcc_options ale-asm.txt /*g:ale_asm_gcc_options* -g:ale_awk_gawk_executable ale-awk.txt /*g:ale_awk_gawk_executable* -g:ale_awk_gawk_options ale-awk.txt /*g:ale_awk_gawk_options* -g:ale_bazel_buildifier_executable ale-bazel.txt /*g:ale_bazel_buildifier_executable* -g:ale_bazel_buildifier_options ale-bazel.txt /*g:ale_bazel_buildifier_options* -g:ale_bazel_buildifier_use_global ale-bazel.txt /*g:ale_bazel_buildifier_use_global* -g:ale_bib_bibclean_executable ale-bib.txt /*g:ale_bib_bibclean_executable* -g:ale_bib_bibclean_options ale-bib.txt /*g:ale_bib_bibclean_options* -g:ale_c_always_make ale-c.txt /*g:ale_c_always_make* -g:ale_c_astyle_executable ale-c.txt /*g:ale_c_astyle_executable* -g:ale_c_astyle_project_options ale-c.txt /*g:ale_c_astyle_project_options* -g:ale_c_build_dir ale-c.txt /*g:ale_c_build_dir* -g:ale_c_build_dir_names ale-c.txt /*g:ale_c_build_dir_names* -g:ale_c_cc_executable ale-c.txt /*g:ale_c_cc_executable* -g:ale_c_cc_options ale-c.txt /*g:ale_c_cc_options* -g:ale_c_ccls_executable ale-c.txt /*g:ale_c_ccls_executable* -g:ale_c_ccls_init_options ale-c.txt /*g:ale_c_ccls_init_options* -g:ale_c_clangd_executable ale-c.txt /*g:ale_c_clangd_executable* -g:ale_c_clangd_options ale-c.txt /*g:ale_c_clangd_options* -g:ale_c_clangformat_executable ale-c.txt /*g:ale_c_clangformat_executable* -g:ale_c_clangformat_options ale-c.txt /*g:ale_c_clangformat_options* -g:ale_c_clangformat_style_option ale-c.txt /*g:ale_c_clangformat_style_option* -g:ale_c_clangformat_use_local_file ale-c.txt /*g:ale_c_clangformat_use_local_file* -g:ale_c_clangtidy_checks ale-c.txt /*g:ale_c_clangtidy_checks* -g:ale_c_clangtidy_executable ale-c.txt /*g:ale_c_clangtidy_executable* -g:ale_c_clangtidy_extra_options ale-c.txt /*g:ale_c_clangtidy_extra_options* -g:ale_c_clangtidy_fix_errors ale-c.txt /*g:ale_c_clangtidy_fix_errors* -g:ale_c_clangtidy_options ale-c.txt /*g:ale_c_clangtidy_options* -g:ale_c_cppcheck_executable ale-c.txt /*g:ale_c_cppcheck_executable* -g:ale_c_cppcheck_options ale-c.txt /*g:ale_c_cppcheck_options* -g:ale_c_cquery_cache_directory ale-c.txt /*g:ale_c_cquery_cache_directory* -g:ale_c_cquery_executable ale-c.txt /*g:ale_c_cquery_executable* -g:ale_c_flawfinder_error_severity ale-c.txt /*g:ale_c_flawfinder_error_severity* -g:ale_c_flawfinder_executable ale-c.txt /*g:ale_c_flawfinder_executable* -g:ale_c_flawfinder_minlevel ale-c.txt /*g:ale_c_flawfinder_minlevel* -g:ale_c_parse_compile_commands ale-c.txt /*g:ale_c_parse_compile_commands* -g:ale_c_parse_makefile ale-c.txt /*g:ale_c_parse_makefile* -g:ale_c_uncrustify_executable ale-c.txt /*g:ale_c_uncrustify_executable* -g:ale_c_uncrustify_options ale-c.txt /*g:ale_c_uncrustify_options* -g:ale_cache_executable_check_failures ale.txt /*g:ale_cache_executable_check_failures* -g:ale_change_sign_column_color ale.txt /*g:ale_change_sign_column_color* -g:ale_chef_cookstyle_executable ale-chef.txt /*g:ale_chef_cookstyle_executable* -g:ale_chef_cookstyle_options ale-chef.txt /*g:ale_chef_cookstyle_options* -g:ale_chef_foodcritic_executable ale-chef.txt /*g:ale_chef_foodcritic_executable* -g:ale_chef_foodcritic_options ale-chef.txt /*g:ale_chef_foodcritic_options* -g:ale_clojure_clj_kondo_options ale-clojure.txt /*g:ale_clojure_clj_kondo_options* -g:ale_close_preview_on_insert ale.txt /*g:ale_close_preview_on_insert* -g:ale_cmake_cmakeformat_executable ale-cmake.txt /*g:ale_cmake_cmakeformat_executable* -g:ale_cmake_cmakeformat_options ale-cmake.txt /*g:ale_cmake_cmakeformat_options* -g:ale_cmake_cmakelint_executable ale-cmake.txt /*g:ale_cmake_cmakelint_executable* -g:ale_cmake_cmakelint_options ale-cmake.txt /*g:ale_cmake_cmakelint_options* -g:ale_command_wrapper ale.txt /*g:ale_command_wrapper* -g:ale_completion_autoimport ale.txt /*g:ale_completion_autoimport* -g:ale_completion_delay ale.txt /*g:ale_completion_delay* -g:ale_completion_enabled ale.txt /*g:ale_completion_enabled* -g:ale_completion_excluded_words ale.txt /*g:ale_completion_excluded_words* -g:ale_completion_max_suggestions ale.txt /*g:ale_completion_max_suggestions* -g:ale_completion_symbols ale.txt /*g:ale_completion_symbols* -g:ale_completion_tsserver_remove_warnings ale.txt /*g:ale_completion_tsserver_remove_warnings* -g:ale_cpp_astyle_executable ale-cpp.txt /*g:ale_cpp_astyle_executable* -g:ale_cpp_astyle_project_options ale-cpp.txt /*g:ale_cpp_astyle_project_options* -g:ale_cpp_cc_executable ale-cpp.txt /*g:ale_cpp_cc_executable* -g:ale_cpp_cc_options ale-cpp.txt /*g:ale_cpp_cc_options* -g:ale_cpp_ccls_executable ale-cpp.txt /*g:ale_cpp_ccls_executable* -g:ale_cpp_ccls_init_options ale-cpp.txt /*g:ale_cpp_ccls_init_options* -g:ale_cpp_clangcheck_executable ale-cpp.txt /*g:ale_cpp_clangcheck_executable* -g:ale_cpp_clangcheck_options ale-cpp.txt /*g:ale_cpp_clangcheck_options* -g:ale_cpp_clangd_executable ale-cpp.txt /*g:ale_cpp_clangd_executable* -g:ale_cpp_clangd_options ale-cpp.txt /*g:ale_cpp_clangd_options* -g:ale_cpp_clangtidy_checks ale-cpp.txt /*g:ale_cpp_clangtidy_checks* -g:ale_cpp_clangtidy_executable ale-cpp.txt /*g:ale_cpp_clangtidy_executable* -g:ale_cpp_clangtidy_extra_options ale-cpp.txt /*g:ale_cpp_clangtidy_extra_options* -g:ale_cpp_clangtidy_fix_errors ale-cpp.txt /*g:ale_cpp_clangtidy_fix_errors* -g:ale_cpp_clangtidy_options ale-cpp.txt /*g:ale_cpp_clangtidy_options* -g:ale_cpp_clazy_checks ale-cpp.txt /*g:ale_cpp_clazy_checks* -g:ale_cpp_clazy_executable ale-cpp.txt /*g:ale_cpp_clazy_executable* -g:ale_cpp_clazy_options ale-cpp.txt /*g:ale_cpp_clazy_options* -g:ale_cpp_cppcheck_executable ale-cpp.txt /*g:ale_cpp_cppcheck_executable* -g:ale_cpp_cppcheck_options ale-cpp.txt /*g:ale_cpp_cppcheck_options* -g:ale_cpp_cpplint_executable ale-cpp.txt /*g:ale_cpp_cpplint_executable* -g:ale_cpp_cpplint_options ale-cpp.txt /*g:ale_cpp_cpplint_options* -g:ale_cpp_cquery_cache_directory ale-cpp.txt /*g:ale_cpp_cquery_cache_directory* -g:ale_cpp_cquery_executable ale-cpp.txt /*g:ale_cpp_cquery_executable* -g:ale_cpp_flawfinder_executable ale-cpp.txt /*g:ale_cpp_flawfinder_executable* -g:ale_cpp_flawfinder_minlevel ale-cpp.txt /*g:ale_cpp_flawfinder_minlevel* -g:ale_cs_csc_assemblies ale-cs.txt /*g:ale_cs_csc_assemblies* -g:ale_cs_csc_assembly_path ale-cs.txt /*g:ale_cs_csc_assembly_path* -g:ale_cs_csc_options ale-cs.txt /*g:ale_cs_csc_options* -g:ale_cs_csc_source ale-cs.txt /*g:ale_cs_csc_source* -g:ale_cs_dotnet_format_executable ale-cs.txt /*g:ale_cs_dotnet_format_executable* -g:ale_cs_dotnet_format_options ale-cs.txt /*g:ale_cs_dotnet_format_options* -g:ale_cs_mcs_options ale-cs.txt /*g:ale_cs_mcs_options* -g:ale_cs_mcsc_assemblies ale-cs.txt /*g:ale_cs_mcsc_assemblies* -g:ale_cs_mcsc_assembly_path ale-cs.txt /*g:ale_cs_mcsc_assembly_path* -g:ale_cs_mcsc_options ale-cs.txt /*g:ale_cs_mcsc_options* -g:ale_cs_mcsc_source ale-cs.txt /*g:ale_cs_mcsc_source* -g:ale_css_stylelint_executable ale-css.txt /*g:ale_css_stylelint_executable* -g:ale_css_stylelint_options ale-css.txt /*g:ale_css_stylelint_options* -g:ale_css_stylelint_use_global ale-css.txt /*g:ale_css_stylelint_use_global* -g:ale_cuda_clangd_executable ale-cuda.txt /*g:ale_cuda_clangd_executable* -g:ale_cuda_clangd_options ale-cuda.txt /*g:ale_cuda_clangd_options* -g:ale_cuda_nvcc_executable ale-cuda.txt /*g:ale_cuda_nvcc_executable* -g:ale_cuda_nvcc_options ale-cuda.txt /*g:ale_cuda_nvcc_options* -g:ale_cursor_detail ale.txt /*g:ale_cursor_detail* -g:ale_d_dfmt_options ale-d.txt /*g:ale_d_dfmt_options* -g:ale_d_dls_executable ale-d.txt /*g:ale_d_dls_executable* -g:ale_dafny_dafny_timelimit ale-dafny.txt /*g:ale_dafny_dafny_timelimit* -g:ale_dart_analysis_server_executable ale-dart.txt /*g:ale_dart_analysis_server_executable* -g:ale_dart_analyze_executable ale-dart.txt /*g:ale_dart_analyze_executable* -g:ale_dart_dartanalyzer_executable ale-dart.txt /*g:ale_dart_dartanalyzer_executable* -g:ale_dart_dartfmt_executable ale-dart.txt /*g:ale_dart_dartfmt_executable* -g:ale_dart_dartfmt_options ale-dart.txt /*g:ale_dart_dartfmt_options* -g:ale_dart_format_executable ale-dart.txt /*g:ale_dart_format_executable* -g:ale_dart_format_options ale-dart.txt /*g:ale_dart_format_options* -g:ale_default_navigation ale.txt /*g:ale_default_navigation* -g:ale_deno_executable ale-typescript.txt /*g:ale_deno_executable* -g:ale_deno_importMap ale-typescript.txt /*g:ale_deno_importMap* -g:ale_deno_lsp_project_root ale-typescript.txt /*g:ale_deno_lsp_project_root* -g:ale_deno_unstable ale-typescript.txt /*g:ale_deno_unstable* -g:ale_desktop_desktop_file_validate_options ale-desktop.txt /*g:ale_desktop_desktop_file_validate_options* -g:ale_detail_to_floating_preview ale.txt /*g:ale_detail_to_floating_preview* -g:ale_dhall_executable ale-dhall.txt /*g:ale_dhall_executable* -g:ale_dhall_freeze_options ale-dhall.txt /*g:ale_dhall_freeze_options* -g:ale_dhall_options ale-dhall.txt /*g:ale_dhall_options* -g:ale_disable_lsp ale.txt /*g:ale_disable_lsp* -g:ale_dockerfile_dockerfile_lint_executable ale-dockerfile.txt /*g:ale_dockerfile_dockerfile_lint_executable* -g:ale_dockerfile_dockerfile_lint_options ale-dockerfile.txt /*g:ale_dockerfile_dockerfile_lint_options* -g:ale_dockerfile_hadolint_image ale-dockerfile.txt /*g:ale_dockerfile_hadolint_image* -g:ale_dockerfile_hadolint_use_docker ale-dockerfile.txt /*g:ale_dockerfile_hadolint_use_docker* -g:ale_echo_cursor ale.txt /*g:ale_echo_cursor* -g:ale_echo_delay ale.txt /*g:ale_echo_delay* -g:ale_echo_msg_error_str ale.txt /*g:ale_echo_msg_error_str* -g:ale_echo_msg_format ale.txt /*g:ale_echo_msg_format* -g:ale_echo_msg_info_str ale.txt /*g:ale_echo_msg_info_str* -g:ale_echo_msg_log_str ale.txt /*g:ale_echo_msg_log_str* -g:ale_echo_msg_warning_str ale.txt /*g:ale_echo_msg_warning_str* -g:ale_elixir_credo_strict ale-elixir.txt /*g:ale_elixir_credo_strict* -g:ale_elixir_elixir_ls_config ale-elixir.txt /*g:ale_elixir_elixir_ls_config* -g:ale_elixir_elixir_ls_release ale-elixir.txt /*g:ale_elixir_elixir_ls_release* -g:ale_elixir_mix_format_options ale-elixir.txt /*g:ale_elixir_mix_format_options* -g:ale_elixir_mix_options ale-elixir.txt /*g:ale_elixir_mix_options* -g:ale_elm_format_executable ale-elm.txt /*g:ale_elm_format_executable* -g:ale_elm_format_options ale-elm.txt /*g:ale_elm_format_options* -g:ale_elm_format_use_global ale-elm.txt /*g:ale_elm_format_use_global* -g:ale_elm_ls_elm_analyse_trigger ale-elm.txt /*g:ale_elm_ls_elm_analyse_trigger* -g:ale_elm_ls_elm_format_path ale-elm.txt /*g:ale_elm_ls_elm_format_path* -g:ale_elm_ls_elm_path ale-elm.txt /*g:ale_elm_ls_elm_path* -g:ale_elm_ls_elm_test_path ale-elm.txt /*g:ale_elm_ls_elm_test_path* -g:ale_elm_ls_executable ale-elm.txt /*g:ale_elm_ls_executable* -g:ale_elm_ls_use_global ale-elm.txt /*g:ale_elm_ls_use_global* -g:ale_elm_make_executable ale-elm.txt /*g:ale_elm_make_executable* -g:ale_elm_make_use_global ale-elm.txt /*g:ale_elm_make_use_global* -g:ale_enabled ale.txt /*g:ale_enabled* -g:ale_erlang_dialyzer_executable ale-erlang.txt /*g:ale_erlang_dialyzer_executable* -g:ale_erlang_dialyzer_options ale-erlang.txt /*g:ale_erlang_dialyzer_options* -g:ale_erlang_dialyzer_plt_file ale-erlang.txt /*g:ale_erlang_dialyzer_plt_file* -g:ale_erlang_dialyzer_rebar3_profile ale-erlang.txt /*g:ale_erlang_dialyzer_rebar3_profile* -g:ale_erlang_elvis_executable ale-erlang.txt /*g:ale_erlang_elvis_executable* -g:ale_erlang_erlc_executable ale-erlang.txt /*g:ale_erlang_erlc_executable* -g:ale_erlang_erlc_options ale-erlang.txt /*g:ale_erlang_erlc_options* -g:ale_erlang_erlfmt_executable ale-erlang.txt /*g:ale_erlang_erlfmt_executable* -g:ale_erlang_erlfmt_options ale-erlang.txt /*g:ale_erlang_erlfmt_options* -g:ale_erlang_syntaxerl_executable ale-erlang.txt /*g:ale_erlang_syntaxerl_executable* -g:ale_eruby_erblint_executable ale-eruby.txt /*g:ale_eruby_erblint_executable* -g:ale_eruby_ruumba_executable ale-eruby.txt /*g:ale_eruby_ruumba_executable* -g:ale_exclude_highlights ale.txt /*g:ale_exclude_highlights* -g:ale_filename_mappings ale.txt /*g:ale_filename_mappings* -g:ale_fish_fish_indent_executable ale-fish.txt /*g:ale_fish_fish_indent_executable* -g:ale_fish_fish_indent_options ale-fish.txt /*g:ale_fish_fish_indent_options* -g:ale_fix_on_save ale.txt /*g:ale_fix_on_save* -g:ale_fix_on_save_ignore ale.txt /*g:ale_fix_on_save_ignore* -g:ale_fixers ale.txt /*g:ale_fixers* -g:ale_floating_preview ale.txt /*g:ale_floating_preview* -g:ale_floating_window_border ale.txt /*g:ale_floating_window_border* -g:ale_fortran_gcc_executable ale-fortran.txt /*g:ale_fortran_gcc_executable* -g:ale_fortran_gcc_options ale-fortran.txt /*g:ale_fortran_gcc_options* -g:ale_fortran_gcc_use_free_form ale-fortran.txt /*g:ale_fortran_gcc_use_free_form* -g:ale_fortran_language_server_executable ale-fortran.txt /*g:ale_fortran_language_server_executable* -g:ale_fortran_language_server_use_global ale-fortran.txt /*g:ale_fortran_language_server_use_global* -g:ale_fuse_fusionlint_executable ale-fuse.txt /*g:ale_fuse_fusionlint_executable* -g:ale_fuse_fusionlint_options ale-fuse.txt /*g:ale_fuse_fusionlint_options* -g:ale_gitcommit_gitlint_executable ale-gitcommit.txt /*g:ale_gitcommit_gitlint_executable* -g:ale_gitcommit_gitlint_options ale-gitcommit.txt /*g:ale_gitcommit_gitlint_options* -g:ale_gitcommit_gitlint_use_global ale-gitcommit.txt /*g:ale_gitcommit_gitlint_use_global* -g:ale_glsl_glslang_executable ale-glsl.txt /*g:ale_glsl_glslang_executable* -g:ale_glsl_glslang_options ale-glsl.txt /*g:ale_glsl_glslang_options* -g:ale_glsl_glslls_executable ale-glsl.txt /*g:ale_glsl_glslls_executable* -g:ale_glsl_glslls_logfile ale-glsl.txt /*g:ale_glsl_glslls_logfile* -g:ale_go_bingo_executable ale-go.txt /*g:ale_go_bingo_executable* -g:ale_go_bingo_options ale-go.txt /*g:ale_go_bingo_options* -g:ale_go_go111module ale-go.txt /*g:ale_go_go111module* -g:ale_go_go_executable ale-go.txt /*g:ale_go_go_executable* -g:ale_go_gobuild_options ale-go.txt /*g:ale_go_gobuild_options* -g:ale_go_gofmt_options ale-go.txt /*g:ale_go_gofmt_options* -g:ale_go_golangci_lint_executable ale-go.txt /*g:ale_go_golangci_lint_executable* -g:ale_go_golangci_lint_options ale-go.txt /*g:ale_go_golangci_lint_options* -g:ale_go_golangci_lint_package ale-go.txt /*g:ale_go_golangci_lint_package* -g:ale_go_golines_options ale-go.txt /*g:ale_go_golines_options* -g:ale_go_golint_executable ale-go.txt /*g:ale_go_golint_executable* -g:ale_go_golint_options ale-go.txt /*g:ale_go_golint_options* -g:ale_go_gometalinter_executable ale-go.txt /*g:ale_go_gometalinter_executable* -g:ale_go_gometalinter_lint_package ale-go.txt /*g:ale_go_gometalinter_lint_package* -g:ale_go_gometalinter_options ale-go.txt /*g:ale_go_gometalinter_options* -g:ale_go_gopls_executable ale-go.txt /*g:ale_go_gopls_executable* -g:ale_go_gopls_init_options ale-go.txt /*g:ale_go_gopls_init_options* -g:ale_go_gopls_options ale-go.txt /*g:ale_go_gopls_options* -g:ale_go_gopls_use_global ale-go.txt /*g:ale_go_gopls_use_global* -g:ale_go_govet_options ale-go.txt /*g:ale_go_govet_options* -g:ale_go_langserver_executable ale-go.txt /*g:ale_go_langserver_executable* -g:ale_go_langserver_options ale-go.txt /*g:ale_go_langserver_options* -g:ale_go_lines_executable ale-go.txt /*g:ale_go_lines_executable* -g:ale_go_revive_executable ale-go.txt /*g:ale_go_revive_executable* -g:ale_go_revive_options ale-go.txt /*g:ale_go_revive_options* -g:ale_go_staticcheck_executable ale-go.txt /*g:ale_go_staticcheck_executable* -g:ale_go_staticcheck_lint_package ale-go.txt /*g:ale_go_staticcheck_lint_package* -g:ale_go_staticcheck_options ale-go.txt /*g:ale_go_staticcheck_options* -g:ale_go_staticcheck_use_global ale-go.txt /*g:ale_go_staticcheck_use_global* -g:ale_hack_hack_executable ale-hack.txt /*g:ale_hack_hack_executable* -g:ale_hack_hackfmt_options ale-hack.txt /*g:ale_hack_hackfmt_options* -g:ale_hack_hhast_executable ale-hack.txt /*g:ale_hack_hhast_executable* -g:ale_handlebars_embertemplatelint_executable ale-handlebars.txt /*g:ale_handlebars_embertemplatelint_executable* -g:ale_handlebars_embertemplatelint_use_global ale-handlebars.txt /*g:ale_handlebars_embertemplatelint_use_global* -g:ale_haskell_brittany_executable ale-haskell.txt /*g:ale_haskell_brittany_executable* -g:ale_haskell_cabal_ghc_options ale-haskell.txt /*g:ale_haskell_cabal_ghc_options* -g:ale_haskell_floskell_executable ale-haskell.txt /*g:ale_haskell_floskell_executable* -g:ale_haskell_ghc_mod_executable ale-haskell.txt /*g:ale_haskell_ghc_mod_executable* -g:ale_haskell_ghc_options ale-haskell.txt /*g:ale_haskell_ghc_options* -g:ale_haskell_hdevtools_executable ale-haskell.txt /*g:ale_haskell_hdevtools_executable* -g:ale_haskell_hdevtools_options ale-haskell.txt /*g:ale_haskell_hdevtools_options* -g:ale_haskell_hfmt_executable ale-haskell.txt /*g:ale_haskell_hfmt_executable* -g:ale_haskell_hie_executable ale-haskell.txt /*g:ale_haskell_hie_executable* -g:ale_haskell_hindent_executable ale-haskell.txt /*g:ale_haskell_hindent_executable* -g:ale_haskell_hlint_executable ale-haskell.txt /*g:ale_haskell_hlint_executable* -g:ale_haskell_hls_executable ale-haskell.txt /*g:ale_haskell_hls_executable* -g:ale_haskell_ormolu_executable ale-haskell.txt /*g:ale_haskell_ormolu_executable* -g:ale_haskell_ormolu_options ale-haskell.txt /*g:ale_haskell_ormolu_options* -g:ale_haskell_stack_build_options ale-haskell.txt /*g:ale_haskell_stack_build_options* -g:ale_haskell_stack_ghc_options ale-haskell.txt /*g:ale_haskell_stack_ghc_options* -g:ale_haskell_stylish_haskell_executable ale-haskell.txt /*g:ale_haskell_stylish_haskell_executable* -g:ale_hdl_checker_config_file ale-vhdl.txt /*g:ale_hdl_checker_config_file* -g:ale_hdl_checker_executable ale-vhdl.txt /*g:ale_hdl_checker_executable* -g:ale_hdl_checker_options ale-vhdl.txt /*g:ale_hdl_checker_options* -g:ale_history_enabled ale.txt /*g:ale_history_enabled* -g:ale_history_log_output ale.txt /*g:ale_history_log_output* -g:ale_hover_cursor ale.txt /*g:ale_hover_cursor* -g:ale_hover_to_floating_preview ale.txt /*g:ale_hover_to_floating_preview* -g:ale_hover_to_preview ale.txt /*g:ale_hover_to_preview* -g:ale_html_angular_executable ale-html.txt /*g:ale_html_angular_executable* -g:ale_html_angular_use_global ale-html.txt /*g:ale_html_angular_use_global* -g:ale_html_beautify_options ale-html.txt /*g:ale_html_beautify_options* -g:ale_html_htmlhint_executable ale-html.txt /*g:ale_html_htmlhint_executable* -g:ale_html_htmlhint_options ale-html.txt /*g:ale_html_htmlhint_options* -g:ale_html_htmlhint_use_global ale-html.txt /*g:ale_html_htmlhint_use_global* -g:ale_html_stylelint_executable ale-html.txt /*g:ale_html_stylelint_executable* -g:ale_html_stylelint_options ale-html.txt /*g:ale_html_stylelint_options* -g:ale_html_stylelint_use_global ale-html.txt /*g:ale_html_stylelint_use_global* -g:ale_html_tidy_executable ale-html.txt /*g:ale_html_tidy_executable* -g:ale_html_tidy_options ale-html.txt /*g:ale_html_tidy_options* -g:ale_idris_idris_executable ale-idris.txt /*g:ale_idris_idris_executable* -g:ale_idris_idris_options ale-idris.txt /*g:ale_idris_idris_options* -g:ale_inko_inko_executable ale-inko.txt /*g:ale_inko_inko_executable* -g:ale_ispc_ispc_executable ale-ispc.txt /*g:ale_ispc_ispc_executable* -g:ale_ispc_ispc_options ale-ispc.txt /*g:ale_ispc_ispc_options* -g:ale_java_checkstyle_config ale-java.txt /*g:ale_java_checkstyle_config* -g:ale_java_checkstyle_executable ale-java.txt /*g:ale_java_checkstyle_executable* -g:ale_java_checkstyle_options ale-java.txt /*g:ale_java_checkstyle_options* -g:ale_java_eclipse_config_path ale-java.txt /*g:ale_java_eclipse_config_path* -g:ale_java_eclipse_executable ale-java.txt /*g:ale_java_eclipse_executable* -g:ale_java_eclipselsp_javaagent ale-java.txt /*g:ale_java_eclipselsp_javaagent* -g:ale_java_eclipselsp_path ale-java.txt /*g:ale_java_eclipselsp_path* -g:ale_java_eclipselsp_workspace_path ale-java.txt /*g:ale_java_eclipselsp_workspace_path* -g:ale_java_google_java_format_executable ale-java.txt /*g:ale_java_google_java_format_executable* -g:ale_java_google_java_format_options ale-java.txt /*g:ale_java_google_java_format_options* -g:ale_java_javac_classpath ale-java.txt /*g:ale_java_javac_classpath* -g:ale_java_javac_executable ale-java.txt /*g:ale_java_javac_executable* -g:ale_java_javac_options ale-java.txt /*g:ale_java_javac_options* -g:ale_java_javac_sourcepath ale-java.txt /*g:ale_java_javac_sourcepath* -g:ale_java_javalsp_config ale-java.txt /*g:ale_java_javalsp_config* -g:ale_java_javalsp_executable ale-java.txt /*g:ale_java_javalsp_executable* -g:ale_java_pmd_options ale-java.txt /*g:ale_java_pmd_options* -g:ale_javascript_eslint_executable ale-javascript.txt /*g:ale_javascript_eslint_executable* -g:ale_javascript_eslint_options ale-javascript.txt /*g:ale_javascript_eslint_options* -g:ale_javascript_eslint_suppress_eslintignore ale-javascript.txt /*g:ale_javascript_eslint_suppress_eslintignore* -g:ale_javascript_eslint_suppress_missing_config ale-javascript.txt /*g:ale_javascript_eslint_suppress_missing_config* -g:ale_javascript_eslint_use_global ale-javascript.txt /*g:ale_javascript_eslint_use_global* -g:ale_javascript_fecs_executable ale-javascript.txt /*g:ale_javascript_fecs_executable* -g:ale_javascript_fecs_use_global ale-javascript.txt /*g:ale_javascript_fecs_use_global* -g:ale_javascript_flow_executable ale-javascript.txt /*g:ale_javascript_flow_executable* -g:ale_javascript_flow_use_global ale-javascript.txt /*g:ale_javascript_flow_use_global* -g:ale_javascript_flow_use_home_config ale-javascript.txt /*g:ale_javascript_flow_use_home_config* -g:ale_javascript_flow_use_respect_pragma ale-javascript.txt /*g:ale_javascript_flow_use_respect_pragma* -g:ale_javascript_importjs_executable ale-javascript.txt /*g:ale_javascript_importjs_executable* -g:ale_javascript_jscs_executable ale-javascript.txt /*g:ale_javascript_jscs_executable* -g:ale_javascript_jscs_use_global ale-javascript.txt /*g:ale_javascript_jscs_use_global* -g:ale_javascript_jshint_executable ale-javascript.txt /*g:ale_javascript_jshint_executable* -g:ale_javascript_jshint_use_global ale-javascript.txt /*g:ale_javascript_jshint_use_global* -g:ale_javascript_prettier_eslint_executable ale-javascript.txt /*g:ale_javascript_prettier_eslint_executable* -g:ale_javascript_prettier_eslint_options ale-javascript.txt /*g:ale_javascript_prettier_eslint_options* -g:ale_javascript_prettier_eslint_use_global ale-javascript.txt /*g:ale_javascript_prettier_eslint_use_global* -g:ale_javascript_prettier_executable ale-javascript.txt /*g:ale_javascript_prettier_executable* -g:ale_javascript_prettier_options ale-javascript.txt /*g:ale_javascript_prettier_options* -g:ale_javascript_prettier_standard_executable ale-javascript.txt /*g:ale_javascript_prettier_standard_executable* -g:ale_javascript_prettier_standard_options ale-javascript.txt /*g:ale_javascript_prettier_standard_options* -g:ale_javascript_prettier_standard_use_global ale-javascript.txt /*g:ale_javascript_prettier_standard_use_global* -g:ale_javascript_prettier_use_global ale-javascript.txt /*g:ale_javascript_prettier_use_global* -g:ale_javascript_standard_executable ale-javascript.txt /*g:ale_javascript_standard_executable* -g:ale_javascript_standard_options ale-javascript.txt /*g:ale_javascript_standard_options* -g:ale_javascript_standard_use_global ale-javascript.txt /*g:ale_javascript_standard_use_global* -g:ale_javascript_xo_executable ale-javascript.txt /*g:ale_javascript_xo_executable* -g:ale_javascript_xo_options ale-javascript.txt /*g:ale_javascript_xo_options* -g:ale_javascript_xo_use_global ale-javascript.txt /*g:ale_javascript_xo_use_global* -g:ale_json_fixjson_executable ale-json.txt /*g:ale_json_fixjson_executable* -g:ale_json_fixjson_options ale-json.txt /*g:ale_json_fixjson_options* -g:ale_json_fixjson_use_global ale-json.txt /*g:ale_json_fixjson_use_global* -g:ale_json_jq_executable ale-json.txt /*g:ale_json_jq_executable* -g:ale_json_jq_filters ale-json.txt /*g:ale_json_jq_filters* -g:ale_json_jq_options ale-json.txt /*g:ale_json_jq_options* -g:ale_json_jsonlint_executable ale-json.txt /*g:ale_json_jsonlint_executable* -g:ale_json_jsonlint_use_global ale-json.txt /*g:ale_json_jsonlint_use_global* -g:ale_json_spectral_executable ale-json.txt /*g:ale_json_spectral_executable* -g:ale_json_spectral_use_global ale-json.txt /*g:ale_json_spectral_use_global* -g:ale_jsonnet_jsonnet_lint_executable ale-jsonnet.txt /*g:ale_jsonnet_jsonnet_lint_executable* -g:ale_jsonnet_jsonnet_lint_options ale-jsonnet.txt /*g:ale_jsonnet_jsonnet_lint_options* -g:ale_jsonnet_jsonnetfmt_executable ale-jsonnet.txt /*g:ale_jsonnet_jsonnetfmt_executable* -g:ale_jsonnet_jsonnetfmt_options ale-jsonnet.txt /*g:ale_jsonnet_jsonnetfmt_options* -g:ale_julia_executable ale-julia.txt /*g:ale_julia_executable* -g:ale_keep_list_window_open ale.txt /*g:ale_keep_list_window_open* -g:ale_kotlin_kotlinc_classpath ale-kotlin.txt /*g:ale_kotlin_kotlinc_classpath* -g:ale_kotlin_kotlinc_config_file ale-kotlin.txt /*g:ale_kotlin_kotlinc_config_file* -g:ale_kotlin_kotlinc_enable_config ale-kotlin.txt /*g:ale_kotlin_kotlinc_enable_config* -g:ale_kotlin_kotlinc_module_filename ale-kotlin.txt /*g:ale_kotlin_kotlinc_module_filename* -g:ale_kotlin_kotlinc_options ale-kotlin.txt /*g:ale_kotlin_kotlinc_options* -g:ale_kotlin_kotlinc_sourcepath ale-kotlin.txt /*g:ale_kotlin_kotlinc_sourcepath* -g:ale_kotlin_kotlinc_use_module_file ale-kotlin.txt /*g:ale_kotlin_kotlinc_use_module_file* -g:ale_kotlin_ktlint_executable ale-kotlin.txt /*g:ale_kotlin_ktlint_executable* -g:ale_kotlin_ktlint_options ale-kotlin.txt /*g:ale_kotlin_ktlint_options* -g:ale_kotlin_ktlint_rulesets ale-kotlin.txt /*g:ale_kotlin_ktlint_rulesets* -g:ale_kotlin_languageserver_executable ale-kotlin.txt /*g:ale_kotlin_languageserver_executable* -g:ale_lacheck_executable ale-tex.txt /*g:ale_lacheck_executable* -g:ale_languagetool_executable ale.txt /*g:ale_languagetool_executable* -g:ale_languagetool_options ale.txt /*g:ale_languagetool_options* -g:ale_less_lessc_executable ale-less.txt /*g:ale_less_lessc_executable* -g:ale_less_lessc_options ale-less.txt /*g:ale_less_lessc_options* -g:ale_less_lessc_use_global ale-less.txt /*g:ale_less_lessc_use_global* -g:ale_less_stylelint_executable ale-less.txt /*g:ale_less_stylelint_executable* -g:ale_less_stylelint_options ale-less.txt /*g:ale_less_stylelint_options* -g:ale_less_stylelint_use_global ale-less.txt /*g:ale_less_stylelint_use_global* -g:ale_lint_delay ale.txt /*g:ale_lint_delay* -g:ale_lint_on_enter ale.txt /*g:ale_lint_on_enter* -g:ale_lint_on_filetype_changed ale.txt /*g:ale_lint_on_filetype_changed* -g:ale_lint_on_insert_leave ale.txt /*g:ale_lint_on_insert_leave* -g:ale_lint_on_save ale.txt /*g:ale_lint_on_save* -g:ale_lint_on_text_changed ale.txt /*g:ale_lint_on_text_changed* -g:ale_linter_aliases ale.txt /*g:ale_linter_aliases* -g:ale_linters ale.txt /*g:ale_linters* -g:ale_linters_explicit ale.txt /*g:ale_linters_explicit* -g:ale_linters_ignore ale.txt /*g:ale_linters_ignore* -g:ale_list_vertical ale.txt /*g:ale_list_vertical* -g:ale_list_window_size ale.txt /*g:ale_list_window_size* -g:ale_llvm_llc_executable ale-llvm.txt /*g:ale_llvm_llc_executable* -g:ale_loclist_msg_format ale.txt /*g:ale_loclist_msg_format* -g:ale_lsp_show_message_format ale.txt /*g:ale_lsp_show_message_format* -g:ale_lsp_show_message_severity ale.txt /*g:ale_lsp_show_message_severity* -g:ale_lsp_suggestions ale.txt /*g:ale_lsp_suggestions* -g:ale_lua_lua_format_executable ale-lua.txt /*g:ale_lua_lua_format_executable* -g:ale_lua_lua_format_options ale-lua.txt /*g:ale_lua_lua_format_options* -g:ale_lua_luac_executable ale-lua.txt /*g:ale_lua_luac_executable* -g:ale_lua_luacheck_executable ale-lua.txt /*g:ale_lua_luacheck_executable* -g:ale_lua_luacheck_options ale-lua.txt /*g:ale_lua_luacheck_options* -g:ale_lua_luafmt_executable ale-lua.txt /*g:ale_lua_luafmt_executable* -g:ale_lua_luafmt_options ale-lua.txt /*g:ale_lua_luafmt_options* -g:ale_lua_stylua_executable ale-lua.txt /*g:ale_lua_stylua_executable* -g:ale_lua_stylua_options ale-lua.txt /*g:ale_lua_stylua_options* -g:ale_markdown_markdownlint_options ale-markdown.txt /*g:ale_markdown_markdownlint_options* -g:ale_markdown_mdl_executable ale-markdown.txt /*g:ale_markdown_mdl_executable* -g:ale_markdown_mdl_options ale-markdown.txt /*g:ale_markdown_mdl_options* -g:ale_markdown_pandoc_executable ale-markdown.txt /*g:ale_markdown_pandoc_executable* -g:ale_markdown_pandoc_options ale-markdown.txt /*g:ale_markdown_pandoc_options* -g:ale_markdown_remark_lint_executable ale-markdown.txt /*g:ale_markdown_remark_lint_executable* -g:ale_markdown_remark_lint_options ale-markdown.txt /*g:ale_markdown_remark_lint_options* -g:ale_markdown_remark_lint_use_global ale-markdown.txt /*g:ale_markdown_remark_lint_use_global* -g:ale_max_buffer_history_size ale.txt /*g:ale_max_buffer_history_size* -g:ale_max_signs ale.txt /*g:ale_max_signs* -g:ale_maximum_file_size ale.txt /*g:ale_maximum_file_size* -g:ale_mercury_mmc_executable ale-mercury.txt /*g:ale_mercury_mmc_executable* -g:ale_mercury_mmc_options ale-mercury.txt /*g:ale_mercury_mmc_options* -g:ale_nasm_nasm_executable ale-nasm.txt /*g:ale_nasm_nasm_executable* -g:ale_nasm_nasm_options ale-nasm.txt /*g:ale_nasm_nasm_options* -g:ale_nim_nimpretty_executable ale-nim.txt /*g:ale_nim_nimpretty_executable* -g:ale_nim_nimpretty_options ale-nim.txt /*g:ale_nim_nimpretty_options* -g:ale_nix_nixfmt_executable ale-nix.txt /*g:ale_nix_nixfmt_executable* -g:ale_nix_nixfmt_options ale-nix.txt /*g:ale_nix_nixfmt_options* -g:ale_nix_nixpkgsfmt_executable ale-nix.txt /*g:ale_nix_nixpkgsfmt_executable* -g:ale_nix_nixpkgsfmt_options ale-nix.txt /*g:ale_nix_nixpkgsfmt_options* -g:ale_objc_ccls_executable ale-objc.txt /*g:ale_objc_ccls_executable* -g:ale_objc_ccls_init_options ale-objc.txt /*g:ale_objc_ccls_init_options* -g:ale_objc_clang_options ale-objc.txt /*g:ale_objc_clang_options* -g:ale_objc_clangd_executable ale-objc.txt /*g:ale_objc_clangd_executable* -g:ale_objc_clangd_options ale-objc.txt /*g:ale_objc_clangd_options* -g:ale_objcpp_clang_options ale-objcpp.txt /*g:ale_objcpp_clang_options* -g:ale_objcpp_clangd_executable ale-objcpp.txt /*g:ale_objcpp_clangd_executable* -g:ale_objcpp_clangd_options ale-objcpp.txt /*g:ale_objcpp_clangd_options* -g:ale_ocaml_ocamlformat_executable ale-ocaml.txt /*g:ale_ocaml_ocamlformat_executable* -g:ale_ocaml_ocamlformat_options ale-ocaml.txt /*g:ale_ocaml_ocamlformat_options* -g:ale_ocaml_ocamllsp_use_opam ale-ocaml.txt /*g:ale_ocaml_ocamllsp_use_opam* -g:ale_ocaml_ocp_indent_config ale-ocaml.txt /*g:ale_ocaml_ocp_indent_config* -g:ale_ocaml_ocp_indent_executable ale-ocaml.txt /*g:ale_ocaml_ocp_indent_executable* -g:ale_ocaml_ocp_indent_options ale-ocaml.txt /*g:ale_ocaml_ocp_indent_options* -g:ale_ocaml_ols_executable ale-ocaml.txt /*g:ale_ocaml_ols_executable* -g:ale_ocaml_ols_use_global ale-ocaml.txt /*g:ale_ocaml_ols_use_global* -g:ale_open_list ale.txt /*g:ale_open_list* -g:ale_openapi_ibm_validator_executable ale-openapi.txt /*g:ale_openapi_ibm_validator_executable* -g:ale_openapi_ibm_validator_options ale-openapi.txt /*g:ale_openapi_ibm_validator_options* -g:ale_pascal_ptop_executable ale-pascal.txt /*g:ale_pascal_ptop_executable* -g:ale_pascal_ptop_options ale-pascal.txt /*g:ale_pascal_ptop_options* -g:ale_pattern_options ale.txt /*g:ale_pattern_options* -g:ale_pattern_options_enabled ale.txt /*g:ale_pattern_options_enabled* -g:ale_perl6_perl6_executable ale-perl6.txt /*g:ale_perl6_perl6_executable* -g:ale_perl6_perl6_options ale-perl6.txt /*g:ale_perl6_perl6_options* -g:ale_perl_perl_executable ale-perl.txt /*g:ale_perl_perl_executable* -g:ale_perl_perl_options ale-perl.txt /*g:ale_perl_perl_options* -g:ale_perl_perlcritic_executable ale-perl.txt /*g:ale_perl_perlcritic_executable* -g:ale_perl_perlcritic_options ale-perl.txt /*g:ale_perl_perlcritic_options* -g:ale_perl_perlcritic_profile ale-perl.txt /*g:ale_perl_perlcritic_profile* -g:ale_perl_perlcritic_showrules ale-perl.txt /*g:ale_perl_perlcritic_showrules* -g:ale_perl_perltidy_options ale-perl.txt /*g:ale_perl_perltidy_options* -g:ale_php_cs_fixer_executable ale-php.txt /*g:ale_php_cs_fixer_executable* -g:ale_php_cs_fixer_options ale-php.txt /*g:ale_php_cs_fixer_options* -g:ale_php_cs_fixer_use_global ale-php.txt /*g:ale_php_cs_fixer_use_global* -g:ale_php_intelephense_config ale-php.txt /*g:ale_php_intelephense_config* -g:ale_php_intelephense_executable ale-php.txt /*g:ale_php_intelephense_executable* -g:ale_php_intelephense_use_global ale-php.txt /*g:ale_php_intelephense_use_global* -g:ale_php_langserver_executable ale-php.txt /*g:ale_php_langserver_executable* -g:ale_php_langserver_use_global ale-php.txt /*g:ale_php_langserver_use_global* -g:ale_php_phan_executable ale-php.txt /*g:ale_php_phan_executable* -g:ale_php_phan_minimum_severity ale-php.txt /*g:ale_php_phan_minimum_severity* -g:ale_php_phan_use_client ale-php.txt /*g:ale_php_phan_use_client* -g:ale_php_php_executable ale-php.txt /*g:ale_php_php_executable* -g:ale_php_phpcbf_executable ale-php.txt /*g:ale_php_phpcbf_executable* -g:ale_php_phpcbf_options ale-php.txt /*g:ale_php_phpcbf_options* -g:ale_php_phpcbf_standard ale-php.txt /*g:ale_php_phpcbf_standard* -g:ale_php_phpcbf_use_global ale-php.txt /*g:ale_php_phpcbf_use_global* -g:ale_php_phpcs_executable ale-php.txt /*g:ale_php_phpcs_executable* -g:ale_php_phpcs_options ale-php.txt /*g:ale_php_phpcs_options* -g:ale_php_phpcs_standard ale-php.txt /*g:ale_php_phpcs_standard* -g:ale_php_phpcs_use_global ale-php.txt /*g:ale_php_phpcs_use_global* -g:ale_php_phpmd_executable ale-php.txt /*g:ale_php_phpmd_executable* -g:ale_php_phpmd_ruleset ale-php.txt /*g:ale_php_phpmd_ruleset* -g:ale_php_phpstan_autoload ale-php.txt /*g:ale_php_phpstan_autoload* -g:ale_php_phpstan_configuration ale-php.txt /*g:ale_php_phpstan_configuration* -g:ale_php_phpstan_executable ale-php.txt /*g:ale_php_phpstan_executable* -g:ale_php_phpstan_level ale-php.txt /*g:ale_php_phpstan_level* -g:ale_php_psalm_executable ale-php.txt /*g:ale_php_psalm_executable* -g:ale_php_psalm_options ale-php.txt /*g:ale_php_psalm_options* -g:ale_php_psalm_use_global ale-php.txt /*g:ale_php_psalm_use_global* -g:ale_php_tlint_executable ale-php.txt /*g:ale_php_tlint_executable* -g:ale_php_tlint_options ale-php.txt /*g:ale_php_tlint_options* -g:ale_php_tlint_use_global ale-php.txt /*g:ale_php_tlint_use_global* -g:ale_pony_ponyc_executable ale-pony.txt /*g:ale_pony_ponyc_executable* -g:ale_pony_ponyc_options ale-pony.txt /*g:ale_pony_ponyc_options* -g:ale_popup_menu_enabled ale.txt /*g:ale_popup_menu_enabled* -g:ale_powershell_powershell_executable ale-powershell.txt /*g:ale_powershell_powershell_executable* -g:ale_powershell_psscriptanalyzer_exclusions ale-powershell.txt /*g:ale_powershell_psscriptanalyzer_exclusions* -g:ale_powershell_psscriptanalyzer_executable ale-powershell.txt /*g:ale_powershell_psscriptanalyzer_executable* -g:ale_powershell_psscriptanalyzer_module ale-powershell.txt /*g:ale_powershell_psscriptanalyzer_module* -g:ale_prolog_swipl_alarm ale-prolog.txt /*g:ale_prolog_swipl_alarm* -g:ale_prolog_swipl_alarm_handler ale-prolog.txt /*g:ale_prolog_swipl_alarm_handler* -g:ale_prolog_swipl_executable ale-prolog.txt /*g:ale_prolog_swipl_executable* -g:ale_prolog_swipl_load ale-prolog.txt /*g:ale_prolog_swipl_load* -g:ale_prolog_swipl_timeout ale-prolog.txt /*g:ale_prolog_swipl_timeout* -g:ale_proto_protoc_gen_lint_options ale-proto.txt /*g:ale_proto_protoc_gen_lint_options* -g:ale_proto_protolint_config ale-proto.txt /*g:ale_proto_protolint_config* -g:ale_proto_protolint_executable ale-proto.txt /*g:ale_proto_protolint_executable* -g:ale_pug_puglint_executable ale-pug.txt /*g:ale_pug_puglint_executable* -g:ale_pug_puglint_options ale-pug.txt /*g:ale_pug_puglint_options* -g:ale_pug_puglint_use_global ale-pug.txt /*g:ale_pug_puglint_use_global* -g:ale_puppet_languageserver_executable ale-puppet.txt /*g:ale_puppet_languageserver_executable* -g:ale_puppet_puppet_executable ale-puppet.txt /*g:ale_puppet_puppet_executable* -g:ale_puppet_puppet_options ale-puppet.txt /*g:ale_puppet_puppet_options* -g:ale_puppet_puppetlint_executable ale-puppet.txt /*g:ale_puppet_puppetlint_executable* -g:ale_puppet_puppetlint_options ale-puppet.txt /*g:ale_puppet_puppetlint_options* -g:ale_purescript_purty_executable ale-purescript.txt /*g:ale_purescript_purty_executable* -g:ale_purescript_tidy_executable ale-purescript.txt /*g:ale_purescript_tidy_executable* -g:ale_purescript_tidy_options ale-purescript.txt /*g:ale_purescript_tidy_options* -g:ale_purescript_tidy_use_global ale-purescript.txt /*g:ale_purescript_tidy_use_global* -g:ale_pyrex_cython_executable ale-pyrex.txt /*g:ale_pyrex_cython_executable* -g:ale_pyrex_cython_options ale-pyrex.txt /*g:ale_pyrex_cython_options* -g:ale_python_auto_pipenv ale-python.txt /*g:ale_python_auto_pipenv* -g:ale_python_auto_poetry ale-python.txt /*g:ale_python_auto_poetry* -g:ale_python_autoflake_executable ale-python.txt /*g:ale_python_autoflake_executable* -g:ale_python_autoflake_options ale-python.txt /*g:ale_python_autoflake_options* -g:ale_python_autoflake_use_global ale-python.txt /*g:ale_python_autoflake_use_global* -g:ale_python_autoimport_executable ale-python.txt /*g:ale_python_autoimport_executable* -g:ale_python_autoimport_options ale-python.txt /*g:ale_python_autoimport_options* -g:ale_python_autoimport_use_global ale-python.txt /*g:ale_python_autoimport_use_global* -g:ale_python_autopep8_executable ale-python.txt /*g:ale_python_autopep8_executable* -g:ale_python_autopep8_options ale-python.txt /*g:ale_python_autopep8_options* -g:ale_python_autopep8_use_global ale-python.txt /*g:ale_python_autopep8_use_global* -g:ale_python_bandit_auto_pipenv ale-python.txt /*g:ale_python_bandit_auto_pipenv* -g:ale_python_bandit_auto_poetry ale-python.txt /*g:ale_python_bandit_auto_poetry* -g:ale_python_bandit_executable ale-python.txt /*g:ale_python_bandit_executable* -g:ale_python_bandit_options ale-python.txt /*g:ale_python_bandit_options* -g:ale_python_bandit_use_config ale-python.txt /*g:ale_python_bandit_use_config* -g:ale_python_bandit_use_global ale-python.txt /*g:ale_python_bandit_use_global* -g:ale_python_black_auto_pipenv ale-python.txt /*g:ale_python_black_auto_pipenv* -g:ale_python_black_auto_poetry ale-python.txt /*g:ale_python_black_auto_poetry* -g:ale_python_black_change_directory ale-python.txt /*g:ale_python_black_change_directory* -g:ale_python_black_executable ale-python.txt /*g:ale_python_black_executable* -g:ale_python_black_options ale-python.txt /*g:ale_python_black_options* -g:ale_python_black_use_global ale-python.txt /*g:ale_python_black_use_global* -g:ale_python_flake8_auto_pipenv ale-python.txt /*g:ale_python_flake8_auto_pipenv* -g:ale_python_flake8_auto_poetry ale-python.txt /*g:ale_python_flake8_auto_poetry* -g:ale_python_flake8_change_directory ale-python.txt /*g:ale_python_flake8_change_directory* -g:ale_python_flake8_executable ale-python.txt /*g:ale_python_flake8_executable* -g:ale_python_flake8_options ale-python.txt /*g:ale_python_flake8_options* -g:ale_python_flake8_use_global ale-python.txt /*g:ale_python_flake8_use_global* -g:ale_python_flakehell_auto_pipenv ale-python.txt /*g:ale_python_flakehell_auto_pipenv* -g:ale_python_flakehell_auto_poetry ale-python.txt /*g:ale_python_flakehell_auto_poetry* -g:ale_python_flakehell_executable ale-python.txt /*g:ale_python_flakehell_executable* -g:ale_python_flakehell_options ale-python.txt /*g:ale_python_flakehell_options* -g:ale_python_flakehell_use_global ale-python.txt /*g:ale_python_flakehell_use_global* -g:ale_python_isort_auto_pipenv ale-python.txt /*g:ale_python_isort_auto_pipenv* -g:ale_python_isort_auto_poetry ale-python.txt /*g:ale_python_isort_auto_poetry* -g:ale_python_isort_executable ale-python.txt /*g:ale_python_isort_executable* -g:ale_python_isort_options ale-python.txt /*g:ale_python_isort_options* -g:ale_python_isort_use_global ale-python.txt /*g:ale_python_isort_use_global* -g:ale_python_mypy_auto_pipenv ale-python.txt /*g:ale_python_mypy_auto_pipenv* -g:ale_python_mypy_auto_poetry ale-python.txt /*g:ale_python_mypy_auto_poetry* -g:ale_python_mypy_executable ale-python.txt /*g:ale_python_mypy_executable* -g:ale_python_mypy_ignore_invalid_syntax ale-python.txt /*g:ale_python_mypy_ignore_invalid_syntax* -g:ale_python_mypy_options ale-python.txt /*g:ale_python_mypy_options* -g:ale_python_mypy_show_notes ale-python.txt /*g:ale_python_mypy_show_notes* -g:ale_python_mypy_use_global ale-python.txt /*g:ale_python_mypy_use_global* -g:ale_python_prospector_auto_pipenv ale-python.txt /*g:ale_python_prospector_auto_pipenv* -g:ale_python_prospector_auto_poetry ale-python.txt /*g:ale_python_prospector_auto_poetry* -g:ale_python_prospector_executable ale-python.txt /*g:ale_python_prospector_executable* -g:ale_python_prospector_options ale-python.txt /*g:ale_python_prospector_options* -g:ale_python_prospector_use_global ale-python.txt /*g:ale_python_prospector_use_global* -g:ale_python_pycodestyle_auto_pipenv ale-python.txt /*g:ale_python_pycodestyle_auto_pipenv* -g:ale_python_pycodestyle_auto_poetry ale-python.txt /*g:ale_python_pycodestyle_auto_poetry* -g:ale_python_pycodestyle_executable ale-python.txt /*g:ale_python_pycodestyle_executable* -g:ale_python_pycodestyle_options ale-python.txt /*g:ale_python_pycodestyle_options* -g:ale_python_pycodestyle_use_global ale-python.txt /*g:ale_python_pycodestyle_use_global* -g:ale_python_pydocstyle_auto_pipenv ale-python.txt /*g:ale_python_pydocstyle_auto_pipenv* -g:ale_python_pydocstyle_auto_poetry ale-python.txt /*g:ale_python_pydocstyle_auto_poetry* -g:ale_python_pydocstyle_executable ale-python.txt /*g:ale_python_pydocstyle_executable* -g:ale_python_pydocstyle_options ale-python.txt /*g:ale_python_pydocstyle_options* -g:ale_python_pydocstyle_use_global ale-python.txt /*g:ale_python_pydocstyle_use_global* -g:ale_python_pyflakes_auto_pipenv ale-python.txt /*g:ale_python_pyflakes_auto_pipenv* -g:ale_python_pyflakes_auto_poetry ale-python.txt /*g:ale_python_pyflakes_auto_poetry* -g:ale_python_pyflakes_executable ale-python.txt /*g:ale_python_pyflakes_executable* -g:ale_python_pylama_auto_pipenv ale-python.txt /*g:ale_python_pylama_auto_pipenv* -g:ale_python_pylama_auto_poetry ale-python.txt /*g:ale_python_pylama_auto_poetry* -g:ale_python_pylama_change_directory ale-python.txt /*g:ale_python_pylama_change_directory* -g:ale_python_pylama_executable ale-python.txt /*g:ale_python_pylama_executable* -g:ale_python_pylama_options ale-python.txt /*g:ale_python_pylama_options* -g:ale_python_pylama_use_global ale-python.txt /*g:ale_python_pylama_use_global* -g:ale_python_pylint_auto_pipenv ale-python.txt /*g:ale_python_pylint_auto_pipenv* -g:ale_python_pylint_auto_poetry ale-python.txt /*g:ale_python_pylint_auto_poetry* -g:ale_python_pylint_change_directory ale-python.txt /*g:ale_python_pylint_change_directory* -g:ale_python_pylint_executable ale-python.txt /*g:ale_python_pylint_executable* -g:ale_python_pylint_options ale-python.txt /*g:ale_python_pylint_options* -g:ale_python_pylint_use_global ale-python.txt /*g:ale_python_pylint_use_global* -g:ale_python_pylint_use_msg_id ale-python.txt /*g:ale_python_pylint_use_msg_id* -g:ale_python_pylsp_auto_pipenv ale-python.txt /*g:ale_python_pylsp_auto_pipenv* -g:ale_python_pylsp_auto_poetry ale-python.txt /*g:ale_python_pylsp_auto_poetry* -g:ale_python_pylsp_config ale-python.txt /*g:ale_python_pylsp_config* -g:ale_python_pylsp_executable ale-python.txt /*g:ale_python_pylsp_executable* -g:ale_python_pylsp_options ale-python.txt /*g:ale_python_pylsp_options* -g:ale_python_pylsp_use_global ale-python.txt /*g:ale_python_pylsp_use_global* -g:ale_python_pyre_auto_pipenv ale-python.txt /*g:ale_python_pyre_auto_pipenv* -g:ale_python_pyre_auto_poetry ale-python.txt /*g:ale_python_pyre_auto_poetry* -g:ale_python_pyre_executable ale-python.txt /*g:ale_python_pyre_executable* -g:ale_python_pyre_use_global ale-python.txt /*g:ale_python_pyre_use_global* -g:ale_python_pyright_config ale-python.txt /*g:ale_python_pyright_config* -g:ale_python_pyright_executable ale-python.txt /*g:ale_python_pyright_executable* -g:ale_python_reorder_python_imports_executable ale-python.txt /*g:ale_python_reorder_python_imports_executable* -g:ale_python_reorder_python_imports_options ale-python.txt /*g:ale_python_reorder_python_imports_options* -g:ale_python_reorder_python_imports_use_global ale-python.txt /*g:ale_python_reorder_python_imports_use_global* -g:ale_python_vulture_change_directory ale-python.txt /*g:ale_python_vulture_change_directory* -g:ale_python_vulture_executable ale-python.txt /*g:ale_python_vulture_executable* -g:ale_python_vulture_options ale-python.txt /*g:ale_python_vulture_options* -g:ale_python_vulture_use_global ale-python.txt /*g:ale_python_vulture_use_global* -g:ale_python_yapf_executable ale-python.txt /*g:ale_python_yapf_executable* -g:ale_python_yapf_use_global ale-python.txt /*g:ale_python_yapf_use_global* -g:ale_qml_qmlfmt_executable ale-qml.txt /*g:ale_qml_qmlfmt_executable* -g:ale_r_languageserver_cmd ale-r.txt /*g:ale_r_languageserver_cmd* -g:ale_r_languageserver_config ale-r.txt /*g:ale_r_languageserver_config* -g:ale_r_lintr_lint_package ale-r.txt /*g:ale_r_lintr_lint_package* -g:ale_r_lintr_options ale-r.txt /*g:ale_r_lintr_options* -g:ale_r_styler_options ale-r.txt /*g:ale_r_styler_options* -g:ale_reason_ls_executable ale-reasonml.txt /*g:ale_reason_ls_executable* -g:ale_reason_ols_executable ale-reasonml.txt /*g:ale_reason_ols_executable* -g:ale_reason_ols_use_global ale-reasonml.txt /*g:ale_reason_ols_use_global* -g:ale_reasonml_refmt_executable ale-reasonml.txt /*g:ale_reasonml_refmt_executable* -g:ale_reasonml_refmt_options ale-reasonml.txt /*g:ale_reasonml_refmt_options* -g:ale_rename_tsserver_find_in_comments ale.txt /*g:ale_rename_tsserver_find_in_comments* -g:ale_rename_tsserver_find_in_strings ale.txt /*g:ale_rename_tsserver_find_in_strings* -g:ale_robot_rflint_executable ale-robot.txt /*g:ale_robot_rflint_executable* -g:ale_root ale.txt /*g:ale_root* -g:ale_ruby_brakeman_executable ale-ruby.txt /*g:ale_ruby_brakeman_executable* -g:ale_ruby_brakeman_options ale-ruby.txt /*g:ale_ruby_brakeman_options* -g:ale_ruby_debride_executable ale-ruby.txt /*g:ale_ruby_debride_executable* -g:ale_ruby_debride_options ale-ruby.txt /*g:ale_ruby_debride_options* -g:ale_ruby_erblint_options ale-eruby.txt /*g:ale_ruby_erblint_options* -g:ale_ruby_rails_best_practices_executable ale-ruby.txt /*g:ale_ruby_rails_best_practices_executable* -g:ale_ruby_rails_best_practices_options ale-ruby.txt /*g:ale_ruby_rails_best_practices_options* -g:ale_ruby_reek_executable ale-ruby.txt /*g:ale_ruby_reek_executable* -g:ale_ruby_reek_show_context ale-ruby.txt /*g:ale_ruby_reek_show_context* -g:ale_ruby_reek_show_wiki_link ale-ruby.txt /*g:ale_ruby_reek_show_wiki_link* -g:ale_ruby_rubocop_auto_correct_all ale-ruby.txt /*g:ale_ruby_rubocop_auto_correct_all* -g:ale_ruby_rubocop_executable ale-ruby.txt /*g:ale_ruby_rubocop_executable* -g:ale_ruby_rubocop_options ale-ruby.txt /*g:ale_ruby_rubocop_options* -g:ale_ruby_ruby_executable ale-ruby.txt /*g:ale_ruby_ruby_executable* -g:ale_ruby_rufo_executable ale-ruby.txt /*g:ale_ruby_rufo_executable* -g:ale_ruby_ruumba_options ale-eruby.txt /*g:ale_ruby_ruumba_options* -g:ale_ruby_solargraph_executable ale-ruby.txt /*g:ale_ruby_solargraph_executable* -g:ale_ruby_sorbet_enable_watchman ale-ruby.txt /*g:ale_ruby_sorbet_enable_watchman* -g:ale_ruby_sorbet_executable ale-ruby.txt /*g:ale_ruby_sorbet_executable* -g:ale_ruby_sorbet_options ale-ruby.txt /*g:ale_ruby_sorbet_options* -g:ale_ruby_standardrb_executable ale-ruby.txt /*g:ale_ruby_standardrb_executable* -g:ale_ruby_standardrb_options ale-ruby.txt /*g:ale_ruby_standardrb_options* -g:ale_rust_analyzer_config ale-rust.txt /*g:ale_rust_analyzer_config* -g:ale_rust_analyzer_executable ale-rust.txt /*g:ale_rust_analyzer_executable* -g:ale_rust_cargo_avoid_whole_workspace ale-rust.txt /*g:ale_rust_cargo_avoid_whole_workspace* -g:ale_rust_cargo_check_all_targets ale-rust.txt /*g:ale_rust_cargo_check_all_targets* -g:ale_rust_cargo_check_examples ale-rust.txt /*g:ale_rust_cargo_check_examples* -g:ale_rust_cargo_check_tests ale-rust.txt /*g:ale_rust_cargo_check_tests* -g:ale_rust_cargo_clippy_options ale-rust.txt /*g:ale_rust_cargo_clippy_options* -g:ale_rust_cargo_default_feature_behavior ale-rust.txt /*g:ale_rust_cargo_default_feature_behavior* -g:ale_rust_cargo_include_features ale-rust.txt /*g:ale_rust_cargo_include_features* -g:ale_rust_cargo_target_dir ale-rust.txt /*g:ale_rust_cargo_target_dir* -g:ale_rust_cargo_use_check ale-rust.txt /*g:ale_rust_cargo_use_check* -g:ale_rust_cargo_use_clippy ale-rust.txt /*g:ale_rust_cargo_use_clippy* -g:ale_rust_ignore_error_codes ale-rust.txt /*g:ale_rust_ignore_error_codes* -g:ale_rust_ignore_secondary_spans ale-rust.txt /*g:ale_rust_ignore_secondary_spans* -g:ale_rust_rls_config ale-rust.txt /*g:ale_rust_rls_config* -g:ale_rust_rls_executable ale-rust.txt /*g:ale_rust_rls_executable* -g:ale_rust_rls_toolchain ale-rust.txt /*g:ale_rust_rls_toolchain* -g:ale_rust_rustc_options ale-rust.txt /*g:ale_rust_rustc_options* -g:ale_rust_rustfmt_options ale-rust.txt /*g:ale_rust_rustfmt_options* -g:ale_sass_stylelint_executable ale-sass.txt /*g:ale_sass_stylelint_executable* -g:ale_sass_stylelint_use_global ale-sass.txt /*g:ale_sass_stylelint_use_global* -g:ale_scala_metals_executable ale-scala.txt /*g:ale_scala_metals_executable* -g:ale_scala_metals_project_root ale-scala.txt /*g:ale_scala_metals_project_root* -g:ale_scala_sbtserver_address ale-scala.txt /*g:ale_scala_sbtserver_address* -g:ale_scala_sbtserver_project_root ale-scala.txt /*g:ale_scala_sbtserver_project_root* -g:ale_scala_scalafmt_executable ale-scala.txt /*g:ale_scala_scalafmt_executable* -g:ale_scala_scalafmt_options ale-scala.txt /*g:ale_scala_scalafmt_options* -g:ale_scala_scalastyle_config ale-scala.txt /*g:ale_scala_scalastyle_config* -g:ale_scala_scalastyle_options ale-scala.txt /*g:ale_scala_scalastyle_options* -g:ale_scss_sasslint_executable ale-scss.txt /*g:ale_scss_sasslint_executable* -g:ale_scss_sasslint_options ale-scss.txt /*g:ale_scss_sasslint_options* -g:ale_scss_sasslint_use_global ale-scss.txt /*g:ale_scss_sasslint_use_global* -g:ale_scss_stylelint_executable ale-scss.txt /*g:ale_scss_stylelint_executable* -g:ale_scss_stylelint_options ale-scss.txt /*g:ale_scss_stylelint_options* -g:ale_scss_stylelint_use_global ale-scss.txt /*g:ale_scss_stylelint_use_global* -g:ale_set_balloons ale.txt /*g:ale_set_balloons* -g:ale_set_balloons_legacy_echo ale.txt /*g:ale_set_balloons_legacy_echo* -g:ale_set_highlights ale.txt /*g:ale_set_highlights* -g:ale_set_loclist ale.txt /*g:ale_set_loclist* -g:ale_set_quickfix ale.txt /*g:ale_set_quickfix* -g:ale_set_signs ale.txt /*g:ale_set_signs* -g:ale_sh_bashate_executable ale-sh.txt /*g:ale_sh_bashate_executable* -g:ale_sh_bashate_options ale-sh.txt /*g:ale_sh_bashate_options* -g:ale_sh_language_server_executable ale-sh.txt /*g:ale_sh_language_server_executable* -g:ale_sh_language_server_use_global ale-sh.txt /*g:ale_sh_language_server_use_global* -g:ale_sh_shell_default_shell ale-sh.txt /*g:ale_sh_shell_default_shell* -g:ale_sh_shellcheck_change_directory ale-sh.txt /*g:ale_sh_shellcheck_change_directory* -g:ale_sh_shellcheck_dialect ale-sh.txt /*g:ale_sh_shellcheck_dialect* -g:ale_sh_shellcheck_exclusions ale-sh.txt /*g:ale_sh_shellcheck_exclusions* -g:ale_sh_shellcheck_executable ale-sh.txt /*g:ale_sh_shellcheck_executable* -g:ale_sh_shellcheck_options ale-sh.txt /*g:ale_sh_shellcheck_options* -g:ale_sh_shfmt_options ale-sh.txt /*g:ale_sh_shfmt_options* -g:ale_shell ale.txt /*g:ale_shell* -g:ale_shell_arguments ale.txt /*g:ale_shell_arguments* -g:ale_sign_column_always ale.txt /*g:ale_sign_column_always* -g:ale_sign_error ale.txt /*g:ale_sign_error* -g:ale_sign_highlight_linenrs ale.txt /*g:ale_sign_highlight_linenrs* -g:ale_sign_info ale.txt /*g:ale_sign_info* -g:ale_sign_offset ale.txt /*g:ale_sign_offset* -g:ale_sign_priority ale.txt /*g:ale_sign_priority* -g:ale_sign_style_error ale.txt /*g:ale_sign_style_error* -g:ale_sign_style_warning ale.txt /*g:ale_sign_style_warning* -g:ale_sign_warning ale.txt /*g:ale_sign_warning* -g:ale_sml_smlnj_cm_file ale-sml.txt /*g:ale_sml_smlnj_cm_file* -g:ale_solidity_solc_executable ale-solidity.txt /*g:ale_solidity_solc_executable* -g:ale_solidity_solc_options ale-solidity.txt /*g:ale_solidity_solc_options* -g:ale_sourcekit_lsp_executable ale-swift.txt /*g:ale_sourcekit_lsp_executable* -g:ale_spec_rpmlint_executable ale-spec.txt /*g:ale_spec_rpmlint_executable* -g:ale_spec_rpmlint_options ale-spec.txt /*g:ale_spec_rpmlint_options* -g:ale_sql_pgformatter_executable ale-sql.txt /*g:ale_sql_pgformatter_executable* -g:ale_sql_pgformatter_options ale-sql.txt /*g:ale_sql_pgformatter_options* -g:ale_sql_sqlfmt_executable ale-sql.txt /*g:ale_sql_sqlfmt_executable* -g:ale_sql_sqlfmt_options ale-sql.txt /*g:ale_sql_sqlfmt_options* -g:ale_sql_sqlformat_executable ale-sql.txt /*g:ale_sql_sqlformat_executable* -g:ale_sql_sqlformat_options ale-sql.txt /*g:ale_sql_sqlformat_options* -g:ale_stylus_stylelint_executable ale-stylus.txt /*g:ale_stylus_stylelint_executable* -g:ale_stylus_stylelint_options ale-stylus.txt /*g:ale_stylus_stylelint_options* -g:ale_stylus_stylelint_use_global ale-stylus.txt /*g:ale_stylus_stylelint_use_global* -g:ale_sugarss_stylelint_executable ale-sugarss.txt /*g:ale_sugarss_stylelint_executable* -g:ale_sugarss_stylelint_options ale-sugarss.txt /*g:ale_sugarss_stylelint_options* -g:ale_sugarss_stylelint_use_global ale-sugarss.txt /*g:ale_sugarss_stylelint_use_global* -g:ale_svelte_svelteserver_executable ale-svelte.txt /*g:ale_svelte_svelteserver_executable* -g:ale_svelte_svelteserver_use_global ale-svelte.txt /*g:ale_svelte_svelteserver_use_global* -g:ale_swift_appleswiftformat_executable ale-swift.txt /*g:ale_swift_appleswiftformat_executable* -g:ale_swift_appleswiftformat_use_swiftpm ale-swift.txt /*g:ale_swift_appleswiftformat_use_swiftpm* -g:ale_tcl_nagelfar_executable ale-tcl.txt /*g:ale_tcl_nagelfar_executable* -g:ale_tcl_nagelfar_options ale-tcl.txt /*g:ale_tcl_nagelfar_options* -g:ale_terraform_fmt_executable ale-terraform.txt /*g:ale_terraform_fmt_executable* -g:ale_terraform_fmt_options ale-terraform.txt /*g:ale_terraform_fmt_options* -g:ale_terraform_langserver_executable ale-terraform.txt /*g:ale_terraform_langserver_executable* -g:ale_terraform_langserver_options ale-terraform.txt /*g:ale_terraform_langserver_options* -g:ale_terraform_ls_executable ale-terraform.txt /*g:ale_terraform_ls_executable* -g:ale_terraform_ls_options ale-terraform.txt /*g:ale_terraform_ls_options* -g:ale_terraform_terraform_executable ale-terraform.txt /*g:ale_terraform_terraform_executable* -g:ale_terraform_tflint_executable ale-terraform.txt /*g:ale_terraform_tflint_executable* -g:ale_terraform_tflint_options ale-terraform.txt /*g:ale_terraform_tflint_options* -g:ale_tex_chktex_executable ale-tex.txt /*g:ale_tex_chktex_executable* -g:ale_tex_chktex_options ale-tex.txt /*g:ale_tex_chktex_options* -g:ale_tex_latexindent_executable ale-tex.txt /*g:ale_tex_latexindent_executable* -g:ale_tex_latexindent_options ale-tex.txt /*g:ale_tex_latexindent_options* -g:ale_tex_texlab_executable ale-tex.txt /*g:ale_tex_texlab_executable* -g:ale_tex_texlab_options ale-tex.txt /*g:ale_tex_texlab_options* -g:ale_textlint_executable ale-text.txt /*g:ale_textlint_executable* -g:ale_textlint_options ale-text.txt /*g:ale_textlint_options* -g:ale_textlint_use_global ale-text.txt /*g:ale_textlint_use_global* -g:ale_thrift_thrift_executable ale-thrift.txt /*g:ale_thrift_thrift_executable* -g:ale_thrift_thrift_generators ale-thrift.txt /*g:ale_thrift_thrift_generators* -g:ale_thrift_thrift_includes ale-thrift.txt /*g:ale_thrift_thrift_includes* -g:ale_thrift_thrift_options ale-thrift.txt /*g:ale_thrift_thrift_options* -g:ale_thrift_thriftcheck_executable ale-thrift.txt /*g:ale_thrift_thriftcheck_executable* -g:ale_thrift_thriftcheck_options ale-thrift.txt /*g:ale_thrift_thriftcheck_options* -g:ale_type_map ale.txt /*g:ale_type_map* -g:ale_typescript_standard_executable ale-typescript.txt /*g:ale_typescript_standard_executable* -g:ale_typescript_standard_options ale-typescript.txt /*g:ale_typescript_standard_options* -g:ale_typescript_standard_use_global ale-typescript.txt /*g:ale_typescript_standard_use_global* -g:ale_typescript_tslint_config_path ale-typescript.txt /*g:ale_typescript_tslint_config_path* -g:ale_typescript_tslint_executable ale-typescript.txt /*g:ale_typescript_tslint_executable* -g:ale_typescript_tslint_ignore_empty_files ale-typescript.txt /*g:ale_typescript_tslint_ignore_empty_files* -g:ale_typescript_tslint_rules_dir ale-typescript.txt /*g:ale_typescript_tslint_rules_dir* -g:ale_typescript_tslint_use_global ale-typescript.txt /*g:ale_typescript_tslint_use_global* -g:ale_typescript_tsserver_config_path ale-typescript.txt /*g:ale_typescript_tsserver_config_path* -g:ale_typescript_tsserver_executable ale-typescript.txt /*g:ale_typescript_tsserver_executable* -g:ale_typescript_tsserver_use_global ale-typescript.txt /*g:ale_typescript_tsserver_use_global* -g:ale_typescript_xo_executable ale-typescript.txt /*g:ale_typescript_xo_executable* -g:ale_typescript_xo_options ale-typescript.txt /*g:ale_typescript_xo_options* -g:ale_typescript_xo_use_global ale-typescript.txt /*g:ale_typescript_xo_use_global* -g:ale_update_tagstack ale.txt /*g:ale_update_tagstack* -g:ale_use_global_executables ale.txt /*g:ale_use_global_executables* -g:ale_v_v_executable ale-v.txt /*g:ale_v_v_executable* -g:ale_v_v_options ale-v.txt /*g:ale_v_v_options* -g:ale_v_vfmt_options ale-v.txt /*g:ale_v_vfmt_options* -g:ale_verilog_verilator_options ale-verilog.txt /*g:ale_verilog_verilator_options* -g:ale_verilog_vlog_executable ale-verilog.txt /*g:ale_verilog_vlog_executable* -g:ale_verilog_vlog_options ale-verilog.txt /*g:ale_verilog_vlog_options* -g:ale_verilog_xvlog_executable ale-verilog.txt /*g:ale_verilog_xvlog_executable* -g:ale_verilog_xvlog_options ale-verilog.txt /*g:ale_verilog_xvlog_options* -g:ale_verilog_yosys_executable ale-verilog.txt /*g:ale_verilog_yosys_executable* -g:ale_verilog_yosys_options ale-verilog.txt /*g:ale_verilog_yosys_options* -g:ale_vhdl_ghdl_executable ale-vhdl.txt /*g:ale_vhdl_ghdl_executable* -g:ale_vhdl_ghdl_options ale-vhdl.txt /*g:ale_vhdl_ghdl_options* -g:ale_vhdl_vcom_executable ale-vhdl.txt /*g:ale_vhdl_vcom_executable* -g:ale_vhdl_vcom_options ale-vhdl.txt /*g:ale_vhdl_vcom_options* -g:ale_vhdl_xvhdl_executable ale-vhdl.txt /*g:ale_vhdl_xvhdl_executable* -g:ale_vhdl_xvhdl_options ale-vhdl.txt /*g:ale_vhdl_xvhdl_options* -g:ale_vim_vimls_config ale-vim.txt /*g:ale_vim_vimls_config* -g:ale_vim_vimls_executable ale-vim.txt /*g:ale_vim_vimls_executable* -g:ale_vim_vimls_use_global ale-vim.txt /*g:ale_vim_vimls_use_global* -g:ale_vim_vint_executable ale-vim.txt /*g:ale_vim_vint_executable* -g:ale_vim_vint_show_style_issues ale-vim.txt /*g:ale_vim_vint_show_style_issues* -g:ale_virtualenv_dir_names ale.txt /*g:ale_virtualenv_dir_names* -g:ale_virtualtext_cursor ale.txt /*g:ale_virtualtext_cursor* -g:ale_virtualtext_delay ale.txt /*g:ale_virtualtext_delay* -g:ale_virtualtext_prefix ale.txt /*g:ale_virtualtext_prefix* -g:ale_vue_vls_executable ale-vue.txt /*g:ale_vue_vls_executable* -g:ale_vue_vls_use_global ale-vue.txt /*g:ale_vue_vls_use_global* -g:ale_want_results_buffer ale.txt /*g:ale_want_results_buffer* -g:ale_warn_about_trailing_blank_lines ale.txt /*g:ale_warn_about_trailing_blank_lines* -g:ale_warn_about_trailing_whitespace ale.txt /*g:ale_warn_about_trailing_whitespace* -g:ale_windows_node_executable_path ale.txt /*g:ale_windows_node_executable_path* -g:ale_writegood_executable ale.txt /*g:ale_writegood_executable* -g:ale_writegood_options ale.txt /*g:ale_writegood_options* -g:ale_writegood_use_global ale.txt /*g:ale_writegood_use_global* -g:ale_xml_xmllint_executable ale-xml.txt /*g:ale_xml_xmllint_executable* -g:ale_xml_xmllint_indentsize ale-xml.txt /*g:ale_xml_xmllint_indentsize* -g:ale_xml_xmllint_options ale-xml.txt /*g:ale_xml_xmllint_options* -g:ale_yaml_spectral_executable ale-yaml.txt /*g:ale_yaml_spectral_executable* -g:ale_yaml_spectral_use_global ale-yaml.txt /*g:ale_yaml_spectral_use_global* -g:ale_yaml_swaglint_executable ale-yaml.txt /*g:ale_yaml_swaglint_executable* -g:ale_yaml_swaglint_use_global ale-yaml.txt /*g:ale_yaml_swaglint_use_global* -g:ale_yaml_yamlfix_executable ale-yaml.txt /*g:ale_yaml_yamlfix_executable* -g:ale_yaml_yamlfix_options ale-yaml.txt /*g:ale_yaml_yamlfix_options* -g:ale_yaml_yamlfix_use_global ale-yaml.txt /*g:ale_yaml_yamlfix_use_global* -g:ale_yaml_yamllint_executable ale-yaml.txt /*g:ale_yaml_yamllint_executable* -g:ale_yaml_yamllint_options ale-yaml.txt /*g:ale_yaml_yamllint_options* -g:ale_yang_lsp_executable ale-yang.txt /*g:ale_yang_lsp_executable* -g:ale_zeek_zeek_executable ale-zeek.txt /*g:ale_zeek_zeek_executable* -g:ale_zig_zls_config ale-zig.txt /*g:ale_zig_zls_config* -g:ale_zig_zls_executable ale-zig.txt /*g:ale_zig_zls_executable* -g:html_tidy_use_global ale-html.txt /*g:html_tidy_use_global* -g:nim_nimlsp_nim_sources ale-nim.txt /*g:nim_nimlsp_nim_sources* -g:vala_vala_lint_config_filename ale-vala.txt /*g:vala_vala_lint_config_filename* -g:vala_vala_lint_executable ale-vala.txt /*g:vala_vala_lint_executable* -terraform-lsp ale-terraform.txt /*terraform-lsp* diff --git a/vim-config/plugins/ale/plugin/ale.vim b/vim-config/plugins/ale/plugin/ale.vim index d19824b1..6aa115ea 100644 --- a/vim-config/plugins/ale/plugin/ale.vim +++ b/vim-config/plugins/ale/plugin/ale.vim @@ -24,8 +24,10 @@ endif if !s:has_features " Only output a warning if editing some special files. if index(['', 'gitcommit'], &filetype) == -1 - execute 'echoerr ''ALE requires NeoVim >= 0.2.0 or Vim 8 with +timers +job +channel''' - execute 'echoerr ''Please update your editor appropriately.''' + " no-custom-checks + echoerr 'ALE requires NeoVim >= 0.2.0 or Vim 8 with +timers +job +channel' + " no-custom-checks + echoerr 'Please update your editor appropriately.' endif " Stop here, as it won't work. @@ -125,8 +127,8 @@ let g:ale_echo_cursor = get(g:, 'ale_echo_cursor', 1) " This flag can be set to 1 to automatically show errors in the preview window. let g:ale_cursor_detail = get(g:, 'ale_cursor_detail', 0) -" This flag can be set to 1 to enable virtual text when the cursor moves. -let g:ale_virtualtext_cursor = get(g:, 'ale_virtualtext_cursor', 0) +" This flag can be changed to disable/enable virtual text. +let g:ale_virtualtext_cursor = get(g:, 'ale_virtualtext_cursor', (has('nvim-0.3.2') || has('patch-9.0.0297') && has('textprop') && has('popupwin')) ? 'all' : 'disabled') " This flag can be set to 1 to enable LSP hover messages at the cursor. let g:ale_hover_cursor = get(g:, 'ale_hover_cursor', 1) @@ -150,10 +152,11 @@ let g:ale_hover_to_floating_preview = get(g:, 'ale_hover_to_floating_preview', 0 " Detail uses floating windows in Neovim let g:ale_detail_to_floating_preview = get(g:, 'ale_detail_to_floating_preview', 0) -" Border setting for floating preview windows in Neovim -" The element in the list presents - horizontal, top, top-left, top-right, -" bottom-right and bottom-left -let g:ale_floating_window_border = get(g:, 'ale_floating_window_border', ['|', '-', '+', '+', '+', '+']) +" Border setting for floating preview windows +" The elements in the list set the characters for the left, top, top-left, +" top-right, bottom-right, bottom-left, right, and bottom of the border +" respectively +let g:ale_floating_window_border = get(g:, 'ale_floating_window_border', ['|', '-', '+', '+', '+', '+', '|', '-']) " This flag can be set to 0 to disable warnings for trailing whitespace let g:ale_warn_about_trailing_whitespace = get(g:, 'ale_warn_about_trailing_whitespace', 1) @@ -228,6 +231,10 @@ command! -bar ALELint :call ale#Queue(0, 'lint_file') " Stop current jobs when linting. command! -bar ALELintStop :call ale#engine#Stop(bufnr('')) +" Commands to manually populate the quickfixes. +command! -bar ALEPopulateQuickfix :call ale#list#ForcePopulateErrorList(1) +command! -bar ALEPopulateLocList :call ale#list#ForcePopulateErrorList(0) + " Define a command to get information about current filetype. command! -bar ALEInfo :call ale#debugging#Info() " The same, but copy output to your clipboard. @@ -246,6 +253,9 @@ command! -bar -nargs=* ALEGoToDefinition :call ale#definition#GoToCommandHandler " Go to type definition for tsserver and LSP command! -bar -nargs=* ALEGoToTypeDefinition :call ale#definition#GoToCommandHandler('type', ) +" Go to implementation for tsserver and LSP +command! -bar -nargs=* ALEGoToImplementation :call ale#definition#GoToCommandHandler('implementation', ) + " Repeat a previous selection in the preview window command! -bar ALERepeatSelection :call ale#preview#RepeatSelection() @@ -270,6 +280,9 @@ command! -bar ALEImport :call ale#completion#Import() " Rename symbols using tsserver and LSP command! -bar -bang ALERename :call ale#rename#Execute() +" Rename file using tsserver +command! -bar -bang ALEFileRename :call ale#filerename#Execute() + " Apply code actions to a range. command! -bar -range ALECodeAction :call ale#codefix#Execute() @@ -309,13 +322,18 @@ nnoremap (ale_go_to_definition_in_vsplit) :ALEGoToDefinition -vsp nnoremap (ale_go_to_type_definition) :ALEGoToTypeDefinition nnoremap (ale_go_to_type_definition_in_tab) :ALEGoToTypeDefinition -tab nnoremap (ale_go_to_type_definition_in_split) :ALEGoToTypeDefinition -split -nnoremap (ale_go_to_type_definition_in_vsplit) :ALEGoToTypeDefinitionIn -vsplit +nnoremap (ale_go_to_type_definition_in_vsplit) :ALEGoToTypeDefinition -vsplit +nnoremap (ale_go_to_implementation) :ALEGoToImplementation +nnoremap (ale_go_to_implementation_in_tab) :ALEGoToImplementation -tab +nnoremap (ale_go_to_implementation_in_split) :ALEGoToImplementation -split +nnoremap (ale_go_to_implementation_in_vsplit) :ALEGoToImplementation -vsplit nnoremap (ale_find_references) :ALEFindReferences nnoremap (ale_hover) :ALEHover nnoremap (ale_documentation) :ALEDocumentation inoremap (ale_complete) :ALEComplete nnoremap (ale_import) :ALEImport nnoremap (ale_rename) :ALERename +nnoremap (ale_filerename) :ALEFileRename nnoremap (ale_code_action) :ALECodeAction nnoremap (ale_repeat_selection) :ALERepeatSelection diff --git a/vim-config/plugins/ale/rplugin/python3/deoplete/sources/ale.py b/vim-config/plugins/ale/rplugin/python3/deoplete/sources/ale.py index 82d9bbf2..a692dc31 100644 --- a/vim-config/plugins/ale/rplugin/python3/deoplete/sources/ale.py +++ b/vim-config/plugins/ale/rplugin/python3/deoplete/sources/ale.py @@ -32,6 +32,7 @@ def __init__(self, vim): 'rust': r'(\.|::)\w*$', 'typescript': r'(\.|\'|")\w*$', 'cpp': r'(\.|::|->)\w*$', + 'c': r'(\.|->)\w*$', } # Returns an integer for the start position, as with omnifunc. diff --git a/vim-config/plugins/ale/run-tests b/vim-config/plugins/ale/run-tests index 6cfa3fae..41460fc5 100755 --- a/vim-config/plugins/ale/run-tests +++ b/vim-config/plugins/ale/run-tests @@ -20,15 +20,14 @@ git_version=$(git describe --always --tags) DOCKER_RUN_IMAGE="$image:$image_tag" export DOCKER_RUN_IMAGE -tests='test/*.vader test/*/*.vader test/*/*/*.vader test/*/*/*.vader' +tests='test/*.vader test/*/*.vader test/*/*/*.vader' # These flags are forwarded to the script for running Vader tests. verbose_flag='' quiet_flag='' run_neovim_02_tests=1 -run_neovim_04_tests=1 -run_neovim_05_tests=1 +run_neovim_08_tests=1 run_vim_80_tests=1 -run_vim_82_tests=1 +run_vim_90_tests=1 run_linters=1 while [ $# -ne 0 ]; do @@ -43,80 +42,64 @@ while [ $# -ne 0 ]; do ;; --build-image) run_vim_80_tests=0 - run_vim_82_tests=0 + run_vim_90_tests=0 run_neovim_02_tests=0 - run_neovim_04_tests=0 - run_neovim_05_tests=0 + run_neovim_08_tests=0 run_linters=0 shift ;; --neovim-only) run_vim_80_tests=0 - run_vim_82_tests=0 + run_vim_90_tests=0 run_linters=0 shift ;; --neovim-02-only) - run_neovim_04_tests=0 - run_neovim_05_tests=0 + run_neovim_08_tests=0 run_vim_80_tests=0 - run_vim_82_tests=0 + run_vim_90_tests=0 run_linters=0 shift ;; - --neovim-04-only) + --neovim-08-only) run_neovim_02_tests=0 - run_neovim_05_tests=0 run_vim_80_tests=0 - run_vim_82_tests=0 - run_linters=0 - shift - ;; - --neovim-05-only) - run_neovim_02_tests=0 - run_neovim_04_tests=0 - run_vim_80_tests=0 - run_vim_82_tests=0 + run_vim_90_tests=0 run_linters=0 shift ;; --vim-only) run_neovim_02_tests=0 - run_neovim_04_tests=0 - run_neovim_05_tests=0 + run_neovim_08_tests=0 run_linters=0 shift ;; --vim-80-only) run_neovim_02_tests=0 - run_neovim_04_tests=0 - run_neovim_05_tests=0 - run_vim_82_tests=0 + run_neovim_08_tests=0 + run_vim_90_tests=0 run_linters=0 shift ;; - --vim-82-only) + --vim-90-only) run_neovim_02_tests=0 - run_neovim_04_tests=0 - run_neovim_05_tests=0 + run_neovim_08_tests=0 run_vim_80_tests=0 run_linters=0 shift ;; --linters-only) run_vim_80_tests=0 - run_vim_82_tests=0 + run_vim_90_tests=0 run_neovim_02_tests=0 - run_neovim_04_tests=0 - run_neovim_05_tests=0 + run_neovim_08_tests=0 shift ;; --fast) run_vim_80_tests=0 - run_vim_82_tests=0 + run_vim_90_tests=0 run_neovim_02_tests=0 - run_neovim_04_tests=0 - run_neovim_05_tests=1 + run_neovim_08_tests=1 shift ;; --help) @@ -131,11 +114,10 @@ while [ $# -ne 0 ]; do echo ' --build-image Run docker image build only.' echo ' --neovim-only Run tests only for NeoVim' echo ' --neovim-02-only Run tests only for NeoVim 0.2' - echo ' --neovim-04-only Run tests only for NeoVim 0.4' - echo ' --neovim-05-only Run tests only for NeoVim 0.5' + echo ' --neovim-08-only Run tests only for NeoVim 0.8' echo ' --vim-only Run tests only for Vim' - echo ' --vim-80-only Run tests only for Vim 8.0' - echo ' --vim-82-only Run tests only for Vim 8.2' + echo ' --vim-80-only Run tests only for Vim 8.2' + echo ' --vim-90-only Run tests only for Vim 9.0' echo ' --linters-only Run only Vint and custom checks' echo ' --fast Run only the fastest Vim and custom checks' echo ' --help Show this help text' @@ -170,7 +152,7 @@ fi find test -name '*.swp' -delete # Check if docker un image is available locally -has_image=$(docker images ls --filter reference="${image}:${image_tag}" --quiet | wc -l) +has_image=$(docker images --quiet "${image}:${image_tag}" | wc -l) if [ "$has_image" -eq 0 ] then @@ -236,10 +218,9 @@ trap cancel_tests INT TERM for vim in $(docker run --rm "$DOCKER_RUN_IMAGE" ls /vim-build/bin | grep '^neovim\|^vim' ); do if ( [[ $vim =~ ^vim-v8.0 ]] && ((run_vim_80_tests)) ) \ - || ( [[ $vim =~ ^vim-v8.2 ]] && ((run_vim_82_tests)) ) \ + || ( [[ $vim =~ ^vim-v9.0 ]] && ((run_vim_90_tests)) ) \ || ( [[ $vim =~ ^neovim-v0.2 ]] && ((run_neovim_02_tests)) ) \ - || ( [[ $vim =~ ^neovim-v0.4 ]] && ((run_neovim_04_tests)) ) \ - || ( [[ $vim =~ ^neovim-v0.5 ]] && ((run_neovim_05_tests)) ); then + || ( [[ $vim =~ ^neovim-v0.8 ]] && ((run_neovim_08_tests)) ); then echo "Starting Vim: $vim..." file_number=$((file_number+1)) test/script/run-vader-tests $quiet_flag $verbose_flag "$vim" "$tests" \ diff --git a/vim-config/plugins/ale/supported-tools.md b/vim-config/plugins/ale/supported-tools.md index b2c0ec48..d6ea92b4 100644 --- a/vim-config/plugins/ale/supported-tools.md +++ b/vim-config/plugins/ale/supported-tools.md @@ -23,9 +23,11 @@ formatting. * Ada * [ada_language_server](https://github.com/AdaCore/ada_language_server) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [gcc](https://gcc.gnu.org) * [gnatpp](https://docs.adacore.com/gnat_ugn-docs/html/gnat_ugn/gnat_ugn/gnat_utility_programs.html#the-gnat-pretty-printer-gnatpp) :floppy_disk: * Ansible + * [ansible-language-server](https://github.com/ansible/ansible-language-server/) * [ansible-lint](https://github.com/willthames/ansible-lint) :floppy_disk: * API Blueprint * [drafter](https://github.com/apiaryio/drafter) @@ -33,7 +35,8 @@ formatting. * [apkbuild-lint](https://gitlab.alpinelinux.org/Leo/atools) * [secfixes-check](https://gitlab.alpinelinux.org/Leo/atools) * AsciiDoc - * [alex](https://github.com/wooorm/alex) :floppy_disk: + * [alex](https://github.com/get-alex/alex) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [languagetool](https://languagetool.org/) :floppy_disk: * [proselint](http://proselint.com/) * [redpen](http://redpen.cc/) @@ -42,10 +45,13 @@ formatting. * [write-good](https://github.com/btford/write-good) * ASM * [gcc](https://gcc.gnu.org) +* AVRA + * [avra](https://github.com/Ro5bert/avra) * Awk * [gawk](https://www.gnu.org/software/gawk/) * Bash * [bashate](https://github.com/openstack/bashate) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [language-server](https://github.com/mads-hartmann/bash-language-server) * shell [-n flag](https://www.gnu.org/software/bash/manual/bash.html#index-set) * [shellcheck](https://www.shellcheck.net/) @@ -56,6 +62,10 @@ formatting. * [buildifier](https://github.com/bazelbuild/buildtools) * BibTeX * [bibclean](http://ftp.math.utah.edu/pub/bibclean/) +* Bicep + * [bicep](https://github.com/Azure/bicep) :floppy_disk: +* BitBake + * [oelint-adv](https://github.com/priv-kweihmann/oelint-adv) * Bourne Shell * shell [-n flag](http://linux.die.net/man/1/sh) * [shellcheck](https://www.shellcheck.net/) @@ -68,13 +78,16 @@ formatting. * [clangd](https://clang.llvm.org/extra/clangd.html) * [clangtidy](http://clang.llvm.org/extra/clang-tidy/) :floppy_disk: * [cppcheck](http://cppcheck.sourceforge.net) - * [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint) + * [cpplint](https://github.com/cpplint/cpplint) * [cquery](https://github.com/cquery-project/cquery) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [flawfinder](https://www.dwheeler.com/flawfinder/) * [gcc](https://gcc.gnu.org/) * [uncrustify](https://github.com/uncrustify/uncrustify) * C# + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) * [csc](http://www.mono-project.com/docs/about-mono/languages/csharp/) :floppy_disk: see:`help ale-cs-csc` for details and configuration + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [dotnet-format](https://github.com/dotnet/format) * [mcs](http://www.mono-project.com/docs/about-mono/languages/csharp/) see:`help ale-cs-mcs` for details * [mcsc](http://www.mono-project.com/docs/about-mono/languages/csharp/) :floppy_disk: see:`help ale-cs-mcsc` for details and configuration @@ -91,9 +104,12 @@ formatting. * [cppcheck](http://cppcheck.sourceforge.net) * [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint) :floppy_disk: * [cquery](https://github.com/cquery-project/cquery) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [flawfinder](https://www.dwheeler.com/flawfinder/) * [gcc](https://gcc.gnu.org/) * [uncrustify](https://github.com/uncrustify/uncrustify) +* Cairo + * [starknet](https://starknet.io/docs) * Chef * [cookstyle](https://docs.chef.io/cookstyle.html) * [foodcritic](http://www.foodcritic.io/) :floppy_disk: @@ -104,7 +120,8 @@ formatting. * [cfn-python-lint](https://github.com/awslabs/cfn-python-lint) * CMake * [cmake-format](https://github.com/cheshirekow/cmake_format) - * [cmakelint](https://github.com/richq/cmake-lint) + * [cmake-lint](https://github.com/cheshirekow/cmake_format) + * [cmakelint](https://github.com/cmake-lint/cmake-lint) * CoffeeScript * [coffee](http://coffeescript.org/) * [coffeelint](https://www.npmjs.com/package/coffeelint) @@ -112,6 +129,9 @@ formatting. * [ameba](https://github.com/veelenga/ameba) :floppy_disk: * [crystal](https://crystal-lang.org/) :floppy_disk: * CSS + * [VSCode CSS language server](https://github.com/hrsh7th/vscode-langservers-extracted) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [css-beautify](https://github.com/beautify-web/js-beautify) * [csslint](http://csslint.net/) * [fecs](http://fecs.baidu.com/) * [prettier](https://github.com/prettier/prettier) @@ -119,6 +139,7 @@ formatting. * Cucumber * [cucumber](https://cucumber.io/) * CUDA + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) * [clangd](https://clang.llvm.org/extra/clangd.html) * [nvcc](http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html) :floppy_disk: * Cypher @@ -135,9 +156,8 @@ formatting. * Dart * [analysis_server](https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server) * [dart-analyze](https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_cli) :floppy_disk: - * [dart-format](https://github.com/dart-lang/sdk/tree/master/utils/dartfmt) :floppy_disk: - * [dartanalyzer](https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_cli) :floppy_disk: - * [dartfmt](https://github.com/dart-lang/sdk/tree/master/utils/dartfmt) :floppy_disk: + * [dart-format](https://github.com/dart-lang/sdk/tree/master/utils/dartfmt) + * [dartfmt](https://github.com/dart-lang/sdk/tree/master/utils/dartfmt) * [language_server](https://github.com/natebosch/dart_language_server) * desktop * [desktop-file-validate](https://www.freedesktop.org/wiki/Software/desktop-file-utils/) @@ -147,9 +167,11 @@ formatting. * [dhall-lint](https://github.com/dhall-lang/dhall-lang) * Dockerfile * [dockerfile_lint](https://github.com/projectatomic/dockerfile_lint) + * [dprint](https://dprint.dev) * [hadolint](https://github.com/hadolint/hadolint) * Elixir * [credo](https://github.com/rrrene/credo) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning: * [dialyxir](https://github.com/jeremyjh/dialyxir) * [dogma](https://github.com/lpil/dogma) :floppy_disk: * [elixir-ls](https://github.com/elixir-lsp/elixir-ls) :warning: @@ -168,6 +190,7 @@ formatting. * [SyntaxErl](https://github.com/ten0s/syntaxerl) * [dialyzer](http://erlang.org/doc/man/dialyzer.html) :floppy_disk: * [elvis](https://github.com/inaka/elvis) :floppy_disk: + * [erlang_ls](https://github.com/erlang-ls/erlang_ls) * [erlc](http://erlang.org/doc/man/erlc.html) * [erlfmt](https://github.com/WhatsApp/erlfmt) * Fish @@ -187,10 +210,12 @@ formatting. * [glslls](https://github.com/svenstaro/glsl-language-server) * Go * [bingo](https://github.com/saibing/bingo) :warning: + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning: * [go build](https://golang.org/cmd/go/) :warning: :floppy_disk: * [go mod](https://golang.org/cmd/go/) :warning: :floppy_disk: * [go vet](https://golang.org/cmd/vet/) :floppy_disk: * [gofmt](https://golang.org/cmd/gofmt/) + * [gofumpt](https://github.com/mvdan/gofumpt) * [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) :warning: * [golangci-lint](https://github.com/golangci/golangci-lint) :warning: :floppy_disk: * [golangserver](https://github.com/sourcegraph/go-langserver) :warning: @@ -217,6 +242,7 @@ formatting. * Haskell * [brittany](https://github.com/lspitzner/brittany) * [cabal-ghc](https://www.haskell.org/cabal/) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [floskell](https://github.com/ennocramer/floskell) * [ghc](https://www.haskell.org/ghc/) * [ghc-mod](https://github.com/DanielG/ghc-mod) @@ -231,10 +257,13 @@ formatting. * [stack-ghc](https://haskellstack.org/) * [stylish-haskell](https://github.com/jaspervdj/stylish-haskell) * HCL + * [packer-fmt](https://github.com/hashicorp/packer) * [terraform-fmt](https://github.com/hashicorp/terraform) * HTML - * [alex](https://github.com/wooorm/alex) :floppy_disk: + * [VSCode HTML language server](https://github.com/hrsh7th/vscode-langservers-extracted) + * [alex](https://github.com/get-alex/alex) * [angular](https://www.npmjs.com/package/@angular/language-server) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [fecs](http://fecs.baidu.com/) * [html-beautify](https://beautifier.io/) * [htmlhint](http://htmlhint.com/) @@ -253,13 +282,18 @@ formatting. * Java * [PMD](https://pmd.github.io/) * [checkstyle](http://checkstyle.sourceforge.net) :floppy_disk: + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [eclipselsp](https://github.com/eclipse/eclipse.jdt.ls) * [google-java-format](https://github.com/google/google-java-format) * [javac](http://www.oracle.com/technetwork/java/javase/downloads/index.html) * [javalsp](https://github.com/georgewfraser/vscode-javac) * [uncrustify](https://github.com/uncrustify/uncrustify) * JavaScript + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [deno](https://deno.land/) + * [dprint](https://dprint.dev/) * [eslint](http://eslint.org/) * [fecs](http://fecs.baidu.com/) * [flow](https://flowtype.org/) @@ -272,16 +306,20 @@ formatting. * [tsserver](https://github.com/Microsoft/TypeScript/wiki/Standalone-Server-%28tsserver%29) * [xo](https://github.com/sindresorhus/xo) * JSON - * [eslint](http://eslint.org/) + * [VSCode JSON language server](https://github.com/hrsh7th/vscode-langservers-extracted) + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning: + * [dprint](https://dprint.dev) + * [eslint](http://eslint.org/) :warning: * [fixjson](https://github.com/rhysd/fixjson) - * [jq](https://stedolan.github.io/jq/) + * [jq](https://stedolan.github.io/jq/) :warning: * [jsonlint](https://github.com/zaach/jsonlint) * [prettier](https://github.com/prettier/prettier) * [spectral](https://github.com/stoplightio/spectral) * JSON5 - * [eslint](http://eslint.org/) + * [eslint](http://eslint.org/) :warning: * JSONC - * [eslint](http://eslint.org/) + * [eslint](http://eslint.org/) :warning: * Jsonnet * [jsonnet-lint](https://jsonnet.org/learning/tools.html) * [jsonnetfmt](https://jsonnet.org/learning/tools.html) @@ -292,8 +330,9 @@ formatting. * [ktlint](https://ktlint.github.io) * [languageserver](https://github.com/fwcd/KotlinLanguageServer) see `:help ale-integration-kotlin` for configuration instructions * LaTeX - * [alex](https://github.com/wooorm/alex) :floppy_disk: + * [alex](https://github.com/get-alex/alex) * [chktex](http://www.nongnu.org/chktex/) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [lacheck](https://www.ctan.org/pkg/lacheck) * [proselint](http://proselint.com/) * [redpen](http://redpen.cc/) @@ -308,20 +347,23 @@ formatting. * LLVM * [llc](https://llvm.org/docs/CommandGuide/llc.html) * Lua + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [lua-format](https://github.com/Koihik/LuaFormatter) * [luac](https://www.lua.org/manual/5.1/luac.html) * [luacheck](https://github.com/mpeterv/luacheck) * [luafmt](https://github.com/trixnz/lua-fmt) + * [selene](https://github.com/Kampfkarren/selene) * [stylua](https://github.com/johnnymorganz/stylua) * Mail - * [alex](https://github.com/wooorm/alex) :floppy_disk: + * [alex](https://github.com/get-alex/alex) * [languagetool](https://languagetool.org/) :floppy_disk: * [proselint](http://proselint.com/) * [vale](https://github.com/ValeLint/vale) * Make * [checkmake](https://github.com/mrtazz/checkmake) * Markdown - * [alex](https://github.com/wooorm/alex) :floppy_disk: + * [alex](https://github.com/get-alex/alex) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [languagetool](https://languagetool.org/) :floppy_disk: * [markdownlint](https://github.com/DavidAnson/markdownlint) :floppy_disk: * [mdl](https://github.com/mivok/markdownlint) @@ -348,13 +390,15 @@ formatting. * [nixfmt](https://github.com/serokell/nixfmt) * [nixpkgs-fmt](https://github.com/nix-community/nixpkgs-fmt) * [rnix-lsp](https://github.com/nix-community/rnix-lsp) + * [statix](https://github.com/nerdypepper/statix) * nroff - * [alex](https://github.com/wooorm/alex) :floppy_disk: + * [alex](https://github.com/get-alex/alex) * [proselint](http://proselint.com/) * [write-good](https://github.com/btford/write-good) * Objective-C * [ccls](https://github.com/MaskRay/ccls) * [clang](http://clang.llvm.org/) + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) * [clangd](https://clang.llvm.org/extra/clangd.html) * [uncrustify](https://github.com/uncrustify/uncrustify) * Objective-C++ @@ -362,6 +406,7 @@ formatting. * [clangd](https://clang.llvm.org/extra/clangd.html) * [uncrustify](https://github.com/uncrustify/uncrustify) * OCaml + * [dune](https://dune.build/) * [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-ocaml-merlin` for configuration instructions * [ocamlformat](https://github.com/ocaml-ppx/ocamlformat) * [ocamllsp](https://github.com/ocaml/ocaml-lsp) @@ -371,6 +416,10 @@ formatting. * [ibm_validator](https://github.com/IBM/openapi-validator) * [prettier](https://github.com/prettier/prettier) * [yamllint](https://yamllint.readthedocs.io/) +* OpenSCAD + * [SCA2D](https://gitlab.com/bath_open_instrumentation_group/sca2d) :floppy_disk: +* Packer (HCL) + * [packer-fmt-fixer](https://github.com/hashicorp/packer) * Pascal * [ptop](https://www.freepascal.org/tools/ptop.var) * Pawn @@ -382,34 +431,41 @@ formatting. * Perl6 * [perl6 -c](https://perl6.org) :warning: * PHP + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [intelephense](https://github.com/bmewburn/intelephense-docs) * [langserver](https://github.com/felixfbecker/php-language-server) * [phan](https://github.com/phan/phan) see `:help ale-php-phan` to instructions * [php -l](https://secure.php.net/) - * [php-cs-fixer](http://cs.sensiolabs.org/) + * [php-cs-fixer](https://cs.symfony.com) + * [phpactor](https://github.com/phpactor/phpactor) * [phpcbf](https://github.com/squizlabs/PHP_CodeSniffer) * [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) * [phpmd](https://phpmd.org) * [phpstan](https://github.com/phpstan/phpstan) + * [pint](https://github.com/laravel/pint) :beer: * [psalm](https://getpsalm.org) :floppy_disk: * [tlint](https://github.com/tightenco/tlint) * PO - * [alex](https://github.com/wooorm/alex) :floppy_disk: + * [alex](https://github.com/get-alex/alex) * [msgfmt](https://www.gnu.org/software/gettext/manual/html_node/msgfmt-Invocation.html) * [proselint](http://proselint.com/) * [write-good](https://github.com/btford/write-good) * Pod - * [alex](https://github.com/wooorm/alex) :floppy_disk: + * [alex](https://github.com/get-alex/alex) * [proselint](http://proselint.com/) * [write-good](https://github.com/btford/write-good) * Pony * [ponyc](https://github.com/ponylang/ponyc) * PowerShell + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [powershell](https://github.com/PowerShell/PowerShell) * [psscriptanalyzer](https://github.com/PowerShell/PSScriptAnalyzer) * Prolog * [swipl](https://github.com/SWI-Prolog/swipl-devel) * proto + * [buf-format](https://github.com/bufbuild/buf) :floppy_disk: + * [buf-lint](https://github.com/bufbuild/buf) :floppy_disk: + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) * [protoc-gen-lint](https://github.com/ckaznocha/protoc-gen-lint) :floppy_disk: * [protolint](https://github.com/yoheimuta/protolint) :floppy_disk: * Pug @@ -427,7 +483,8 @@ formatting. * [autoimport](https://lyz-code.github.io/autoimport/) * [autopep8](https://github.com/hhatto/autopep8) * [bandit](https://github.com/PyCQA/bandit) :warning: - * [black](https://github.com/ambv/black) + * [black](https://github.com/psf/black) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [flake8](http://flake8.pycqa.org/en/latest/) * [flakehell](https://github.com/flakehell/flakehell) * [isort](https://github.com/timothycrosley/isort) @@ -436,12 +493,16 @@ formatting. * [pycodestyle](https://github.com/PyCQA/pycodestyle) :warning: * [pydocstyle](https://www.pydocstyle.org/) :warning: * [pyflakes](https://github.com/PyCQA/pyflakes) + * [pyflyby](https://github.com/deshaw/pyflyby) :warning: * [pylama](https://github.com/klen/pylama) :floppy_disk: * [pylint](https://www.pylint.org/) :floppy_disk: * [pylsp](https://github.com/python-lsp/python-lsp-server) :warning: * [pyre](https://github.com/facebook/pyre-check) :warning: * [pyright](https://github.com/microsoft/pyright) + * [refurb](https://github.com/dosisod/refurb) :floppy_disk: * [reorder-python-imports](https://github.com/asottile/reorder_python_imports) + * [ruff](https://github.com/charliermarsh/ruff) + * [unimport](https://github.com/hakancelik96/unimport) * [vulture](https://github.com/jendrikseipp/vulture) :warning: :floppy_disk: * [yapf](https://github.com/google/yapf) * QML @@ -454,6 +515,7 @@ formatting. * Racket * [racket-langserver](https://github.com/jeapostrophe/racket-langserver/tree/master) * [raco](https://docs.racket-lang.org/raco/) + * [raco_fmt](https://docs.racket-lang.org/fmt/) * Re:VIEW * [redpen](http://redpen.cc/) * ReasonML @@ -461,8 +523,13 @@ formatting. * [ols](https://github.com/freebroccolo/ocaml-language-server) * [reason-language-server](https://github.com/jaredly/reason-language-server) * [refmt](https://github.com/reasonml/reason-cli) +* Rego + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [opacheck](https://www.openpolicyagent.org/docs/latest/cli/#opa-check) + * [opafmt](https://www.openpolicyagent.org/docs/latest/cli/#opa-fmt) * reStructuredText - * [alex](https://github.com/wooorm/alex) :floppy_disk: + * [alex](https://github.com/get-alex/alex) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [proselint](http://proselint.com/) * [redpen](http://redpen.cc/) * [rstcheck](https://github.com/myint/rstcheck) @@ -475,6 +542,7 @@ formatting. * [rpmlint](https://github.com/rpm-software-management/rpmlint) :warning: (see `:help ale-integration-spec`) * Ruby * [brakeman](http://brakemanscanner.org/) :floppy_disk: + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [debride](https://github.com/seattlerb/debride) * [prettier](https://github.com/prettier/plugin-ruby) * [rails_best_practices](https://github.com/flyerhzm/rails_best_practices) :floppy_disk: @@ -485,8 +553,10 @@ formatting. * [solargraph](https://solargraph.org) * [sorbet](https://github.com/sorbet/sorbet) * [standardrb](https://github.com/testdouble/standard) + * [syntax_tree](https://github.com/ruby-syntax-tree/syntax_tree) * Rust * [cargo](https://github.com/rust-lang/cargo) :floppy_disk: (see `:help ale-integration-rust` for configuration instructions) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [rls](https://github.com/rust-lang-nursery/rls) :warning: * [rust-analyzer](https://github.com/rust-analyzer/rust-analyzer) :warning: * [rustc](https://www.rust-lang.org/) :warning: @@ -497,6 +567,7 @@ formatting. * [sass-lint](https://www.npmjs.com/package/sass-lint) * [stylelint](https://github.com/stylelint/stylelint) * Scala + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [fsc](https://www.scala-lang.org/old/sites/default/files/linuxsoft_archives/docu/files/tools/fsc.html) * [metals](https://scalameta.org/metals/) * [sbtserver](https://www.scala-sbt.org/1.x/docs/sbt-server.html) @@ -517,8 +588,10 @@ formatting. * [solhint](https://github.com/protofire/solhint) * [solium](https://github.com/duaraghav8/Solium) * SQL + * [dprint](https://dprint.dev) * [pgformatter](https://github.com/darold/pgFormatter) * [sql-lint](https://github.com/joereynolds/sql-lint) + * [sqlfluff](https://github.com/sqlfluff/sqlfluff) * [sqlfmt](https://github.com/jackc/sqlfmt) * [sqlformat](https://github.com/andialbrecht/sqlparse) * [sqlint](https://github.com/purcell/sqlint) @@ -531,6 +604,7 @@ formatting. * [svelteserver](https://github.com/sveltejs/language-tools/tree/master/packages/language-server) * Swift * [Apple swift-format](https://github.com/apple/swift-format) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [sourcekit-lsp](https://github.com/apple/sourcekit-lsp) * [swiftformat](https://github.com/nicklockwood/SwiftFormat) * [swiftlint](https://github.com/realm/SwiftLint) @@ -539,17 +613,21 @@ formatting. * Tcl * [nagelfar](http://nagelfar.sourceforge.net) :floppy_disk: * Terraform + * [checkov](https://github.com/bridgecrewio/checkov) * [terraform](https://github.com/hashicorp/terraform) * [terraform-fmt-fixer](https://github.com/hashicorp/terraform) * [terraform-ls](https://github.com/hashicorp/terraform-ls) * [terraform-lsp](https://github.com/juliosueiras/terraform-lsp) * [tflint](https://github.com/wata727/tflint) + * [tfsec](https://github.com/aquasecurity/tfsec) * Texinfo - * [alex](https://github.com/wooorm/alex) :floppy_disk: + * [alex](https://github.com/get-alex/alex) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [proselint](http://proselint.com/) * [write-good](https://github.com/btford/write-good) * Text - * [alex](https://github.com/wooorm/alex) :warning: :floppy_disk: + * [alex](https://github.com/get-alex/alex) :warning: + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [languagetool](https://languagetool.org/) :floppy_disk: * [proselint](http://proselint.com/) :warning: * [redpen](http://redpen.cc/) :warning: @@ -559,8 +637,12 @@ formatting. * Thrift * [thrift](http://thrift.apache.org/) * [thriftcheck](https://github.com/pinterest/thriftcheck) +* TOML + * [dprint](https://dprint.dev) * TypeScript + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [deno](https://deno.land/) + * [dprint](https://dprint.dev/) * [eslint](http://eslint.org/) * [fecs](http://fecs.baidu.com/) * [prettier](https://github.com/prettier/prettier) @@ -589,23 +671,31 @@ formatting. * [vimls](https://github.com/iamcco/vim-language-server) * [vint](https://github.com/Kuniwak/vint) * Vim help - * [alex](https://github.com/wooorm/alex) :warning: :floppy_disk: + * [alex](https://github.com/get-alex/alex) :warning: * [proselint](http://proselint.com/) :warning: * [write-good](https://github.com/btford/write-good) :warning: * Vue + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [prettier](https://github.com/prettier/prettier) * [vls](https://github.com/vuejs/vetur/tree/master/server) + * [volar](https://github.com/johnsoncodehk/volar) +* WGSL + * [naga](https://github.com/gfx-rs/naga) * XHTML - * [alex](https://github.com/wooorm/alex) :floppy_disk: + * [alex](https://github.com/get-alex/alex) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) * [proselint](http://proselint.com/) * [write-good](https://github.com/btford/write-good) * XML * [xmllint](http://xmlsoft.org/xmllint.html) * YAML - * [circleci](https://circleci.com/docs/2.0/local-cli) :floppy_disk: + * [actionlint](https://github.com/rhysd/actionlint) :warning: + * [circleci](https://circleci.com/docs/2.0/local-cli) :floppy_disk: :warning: + * [gitlablint](https://github.com/elijah-roberts/gitlab-lint) * [prettier](https://github.com/prettier/prettier) * [spectral](https://github.com/stoplightio/spectral) - * [swaglint](https://github.com/byCedric/swaglint) + * [swaglint](https://github.com/byCedric/swaglint) :warning: + * [yaml-language-server](https://github.com/redhat-developer/yaml-language-server) * [yamlfix](https://lyz-code.github.io/yamlfix) * [yamllint](https://yamllint.readthedocs.io/) * YANG @@ -613,4 +703,5 @@ formatting. * Zeek * [zeek](http://zeek.org) :floppy_disk: * Zig + * [zigfmt](https://github.com/ziglang/zig) * [zls](https://github.com/zigtools/zls) diff --git a/vim-config/plugins/ale/test/completion/test_ale_import_command.vader b/vim-config/plugins/ale/test/completion/test_ale_import_command.vader index d36caae2..4770466e 100644 --- a/vim-config/plugins/ale/test/completion/test_ale_import_command.vader +++ b/vim-config/plugins/ale/test/completion/test_ale_import_command.vader @@ -187,7 +187,7 @@ Execute(ALEImport should request imports correctly for tsserver): \ 'conn_id': 0, \ 'request_id': 0, \ 'source': 'ale-import', - \ 'column': 11, + \ 'column': 21, \ 'line': 2, \ 'line_length': 21, \ 'prefix': 'missingword', @@ -206,7 +206,7 @@ Execute(ALEImport should request imports correctly for tsserver): \ 'conn_id': 347, \ 'request_id': 1, \ 'source': 'ale-import', - \ 'column': 11, + \ 'column': 21, \ 'line': 2, \ 'line_length': 21, \ 'prefix': 'missingword', @@ -229,14 +229,14 @@ Execute(ALEImport should request imports correctly for tsserver): \ [0, 'ts@completions', { \ 'file': expand('%:p'), \ 'includeExternalModuleExports': 1, - \ 'offset': 11, + \ 'offset': 21, \ 'line': 2, \ 'prefix': 'missingword', \ }], \ [0, 'ts@completionEntryDetails', { \ 'file': expand('%:p'), \ 'entryNames': [{'name': 'missingword'}], - \ 'offset': 11, + \ 'offset': 21, \ 'line': 2, \ }] \ ], @@ -282,7 +282,7 @@ Execute(ALEImport should tell the user when no completions were found from tsser \ 'conn_id': 0, \ 'request_id': 0, \ 'source': 'ale-import', - \ 'column': 11, + \ 'column': 21, \ 'line': 2, \ 'line_length': 21, \ 'prefix': 'missingword', @@ -301,7 +301,7 @@ Execute(ALEImport should tell the user when no completions were found from tsser \ 'conn_id': 347, \ 'request_id': 1, \ 'source': 'ale-import', - \ 'column': 11, + \ 'column': 21, \ 'line': 2, \ 'line_length': 21, \ 'prefix': 'missingword', @@ -336,7 +336,7 @@ Execute(ALEImport should request imports correctly for language servers): \ 'conn_id': 0, \ 'request_id': 0, \ 'source': 'ale-import', - \ 'column': 7, + \ 'column': 17, \ 'line': 2, \ 'line_length': 17, \ 'prefix': 'missingword', @@ -355,7 +355,7 @@ Execute(ALEImport should request imports correctly for language servers): \ 'conn_id': 347, \ 'request_id': 1, \ 'source': 'ale-import', - \ 'column': 7, + \ 'column': 17, \ 'line': 2, \ 'line_length': 17, \ 'prefix': 'missingword', @@ -368,8 +368,8 @@ Execute(ALEImport should request imports correctly for language servers): AssertEqual \ [ \ [0, 'textDocument/completion', { - \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}, - \ 'position': {'character': 6, 'line': 1} + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'character': 16, 'line': 1} \ }], \ ], \ g:sent_message_list @@ -482,7 +482,7 @@ Execute(ALEImport should tell the user when no completions were found from a lan \ 'conn_id': 0, \ 'request_id': 0, \ 'source': 'ale-import', - \ 'column': 7, + \ 'column': 17, \ 'line': 2, \ 'line_length': 17, \ 'prefix': 'missingword', @@ -501,7 +501,7 @@ Execute(ALEImport should tell the user when no completions were found from a lan \ 'conn_id': 347, \ 'request_id': 1, \ 'source': 'ale-import', - \ 'column': 7, + \ 'column': 17, \ 'line': 2, \ 'line_length': 17, \ 'prefix': 'missingword', @@ -514,8 +514,8 @@ Execute(ALEImport should tell the user when no completions were found from a lan AssertEqual \ [ \ [0, 'textDocument/completion', { - \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}, - \ 'position': {'character': 6, 'line': 1} + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'character': 16, 'line': 1} \ }], \ ], \ g:sent_message_list diff --git a/vim-config/plugins/ale/test/completion/test_lsp_completion_messages.vader b/vim-config/plugins/ale/test/completion/test_lsp_completion_messages.vader index 87847777..f6aa332b 100644 --- a/vim-config/plugins/ale/test/completion/test_lsp_completion_messages.vader +++ b/vim-config/plugins/ale/test/completion/test_lsp_completion_messages.vader @@ -233,13 +233,13 @@ Execute(The right message should be sent for the initial LSP request): \ [ \ [1, 'textDocument/didChange', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ }, \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] \ }], \ [0, 'textDocument/completion', { - \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}, + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, \ 'position': {'line': 0, 'character': 2}, \ }], \ ], @@ -294,13 +294,13 @@ Execute(Two completion requests shouldn't be sent in a row): \ [ \ [1, 'textDocument/didChange', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ }, \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] \ }], \ [0, 'textDocument/completion', { - \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}, + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, \ 'position': {'line': 0, 'character': 2}, \ }], \ ], diff --git a/vim-config/plugins/ale/test/completion/test_lsp_completion_parsing.vader b/vim-config/plugins/ale/test/completion/test_lsp_completion_parsing.vader index a334d945..7fe22e0c 100644 --- a/vim-config/plugins/ale/test/completion/test_lsp_completion_parsing.vader +++ b/vim-config/plugins/ale/test/completion/test_lsp_completion_parsing.vader @@ -528,6 +528,38 @@ Execute(Should handle completion messages with textEdit objects): \ }, \ }) +Execute(Should handle completion messages with textEdit objects and no insertTextFormat key): + let g:ale_completion_autoimport = 0 + + AssertEqual + \ [ + \ {'word': 'next_callback', 'dup': 0, 'menu': 'PlayTimeCallback', 'info': '', 'kind': 'v', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ ], + \ ale#completion#ParseLSPCompletions({ + \ 'id': 226, + \ 'jsonrpc': '2.0', + \ 'result': { + \ 'isIncomplete': v:false, + \ 'items': [ + \ { + \ 'detail': 'PlayTimeCallback', + \ 'filterText': 'next_callback', + \ 'insertText': 'ignoreme', + \ 'kind': 6, + \ 'label': ' next_callback', + \ 'sortText': '3ee19999next_callback', + \ 'textEdit': { + \ 'newText': 'next_callback', + \ 'range': { + \ 'end': {'character': 13, 'line': 12}, + \ 'start': {'character': 4, 'line': 12}, + \ }, + \ }, + \ }, + \ ], + \ }, + \ }) + Execute(Should handle completion messages with the deprecated insertText attribute): let g:ale_completion_autoimport = 0 diff --git a/vim-config/plugins/ale/test/fix/test_ale_fix.vader b/vim-config/plugins/ale/test/fix/test_ale_fix.vader index 128e3a14..429d1b2e 100644 --- a/vim-config/plugins/ale/test/fix/test_ale_fix.vader +++ b/vim-config/plugins/ale/test/fix/test_ale_fix.vader @@ -90,7 +90,7 @@ Before: return [{'lnum': 1, 'col': 1, 'text': 'xxx'}] endfunction - " echo will output a single blank line, and we should ingore it. + " echo will output a single blank line, and we should ignore it. function! IgnoredEmptyOutput(buffer, output) return {'command': has('win32') ? 'echo(' : 'echo'} endfunction @@ -499,7 +499,7 @@ Execute(ALEFix should fix files on the save event): \ 'nr': -1, \ 'pattern': '', \ 'valid': 1, - \}], ale#test#GetLoclistWithoutModule() + \}], ale#test#GetLoclistWithoutNewerKeys() endif Expect(The buffer should be modified): @@ -547,7 +547,7 @@ Execute(ALEFix should run the linters with b:ale_lint_on_save = 1): \ 'nr': -1, \ 'pattern': '', \ 'valid': 1, - \}], ale#test#GetLoclistWithoutModule() + \}], ale#test#GetLoclistWithoutNewerKeys() endif Expect(The buffer should be modified): @@ -579,7 +579,7 @@ Execute(ALEFix should not fix files on :wq): Assert &modified, 'The was not marked as ''modified''' " We should not run the linter. - AssertEqual [], ale#test#GetLoclistWithoutModule() + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() Expect(The buffer should not be modified): a @@ -619,7 +619,7 @@ Execute(ALEFix should still lint with no linters to be applied): \ 'nr': -1, \ 'pattern': '', \ 'valid': 1, - \}], ale#test#GetLoclistWithoutModule() + \}], ale#test#GetLoclistWithoutNewerKeys() endif Expect(The buffer should be the same): @@ -655,7 +655,7 @@ Execute(ALEFix should still lint when nothing was fixed on save): \ 'nr': -1, \ 'pattern': '', \ 'valid': 1, - \}], ale#test#GetLoclistWithoutModule() + \}], ale#test#GetLoclistWithoutNewerKeys() endif Expect(The buffer should be the same): @@ -679,7 +679,7 @@ Execute(ALEFix should not lint the buffer on save if linting on save is disabled Assert !filereadable(g:test_filename), 'The file should not have been saved' - AssertEqual [], ale#test#GetLoclistWithoutModule() + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() Expect(The buffer should be the same): a @@ -702,7 +702,7 @@ Execute(ALEFix should not lint the buffer on save if linting on save is disabled Assert !filereadable(g:test_filename), 'The file should not have been saved' - AssertEqual [], ale#test#GetLoclistWithoutModule() + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() Expect(The buffer should be the same): a diff --git a/vim-config/plugins/ale/test/fixers/test_buf_format_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_buf_format_fixer_callback.vader new file mode 100644 index 00000000..ee484820 --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_buf_format_fixer_callback.vader @@ -0,0 +1,21 @@ +Before: + Save g:ale_proto_buf_format_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_proto_buf_format_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The buf-format callback should return the correct default values): + call ale#test#SetFilename('../test-files/proto/testfile.proto') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' format %t', + \ }, + \ ale#fixers#buf_format#Fix(bufnr('')) diff --git a/vim-config/plugins/ale/test/fixers/test_crystal_format_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_crystal_format_fixer_callback.vader new file mode 100644 index 00000000..d7d9588b --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_crystal_format_fixer_callback.vader @@ -0,0 +1,33 @@ +Before: + Save g:ale_crystal_format_executable + Save g:ale_crystal_format_options + + " Use an invalid global executable, so we don't match it. + let g:ale_crystal_format_executable = 'xxxinvalid' + let g:ale_crystal_format_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The crystal format callback should return the correct default values): + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' tool format -', + \ }, + \ ale#fixers#crystal#Fix(bufnr('')) + +Execute(The crystal format callback should include custom options): + let g:ale_crystal_format_options = "-list=true" + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' tool format ' . g:ale_crystal_format_options + \ . ' -', + \ }, + \ ale#fixers#crystal#Fix(bufnr('')) diff --git a/vim-config/plugins/ale/test/fixers/test_css_beautify_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_css_beautify_fixer_callback.vader new file mode 100644 index 00000000..a6b61713 --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_css_beautify_fixer_callback.vader @@ -0,0 +1,12 @@ +Before: + call ale#assert#SetUpFixerTest('css', 'css-beautify', 'beautify') + +After: + Restore + + call ale#assert#TearDownFixerTest() + +Execute(The css-beautify callback should return the correct default command): + AssertEqual + \ {'command': ale#Escape('css-beautify') . ' -'}, + \ ale#fixers#css_beautify#Fix(bufnr('')) diff --git a/vim-config/plugins/ale/test/fixers/test_dprint_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_dprint_fixer_callback.vader new file mode 100644 index 00000000..6a9d0118 --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_dprint_fixer_callback.vader @@ -0,0 +1,44 @@ +Before: + call ale#assert#SetUpFixerTest('typescript', 'dprint') + call ale#test#SetFilename('../test-files/dprint/blank.ts') + let g:ale_dprint_executable_override = 0 + let g:ale_dprint_executable = 'dprint' + let g:ale_dprint_config = '' + +After: + Restore + call ale#assert#TearDownFixerTest() + +Execute(The dprint callback should return 0 for a non-existent executable): + let g:ale_dprint_executable = 'foo' + AssertFixer 0 + +Execute(The dprint callback should return the correct default values): + let g:ale_dprint_executable_override = 1 + AssertFixer { + \ 'command': ale#Escape('dprint') + \ . ' fmt ' + \ . ' --stdin %s' + \ } + +Execute(The dprint callback should include config): + let g:ale_dprint_executable_override = 1 + let g:ale_dprint_config = 'dprint.json' + + AssertFixer { + \ 'command': ale#Escape('dprint') + \ . ' fmt ' + \ . ' -c ' + \ . ale#Escape((has('win32') ? 'C:\testplugin\test\test-files\dprint\dprint.json' : '/testplugin/test/test-files/dprint/dprint.json')) + \ . ' --stdin %s' + \ } + +Execute(The dprint callback should include custom options): + let g:ale_dprint_executable_override = 1 + let g:ale_dprint_options = '--verbose' + + AssertFixer { + \ 'command': ale#Escape('dprint') + \ . ' fmt ' + \ . '--verbose' . ' --stdin %s' + \ } diff --git a/vim-config/plugins/ale/test/fixers/test_dune_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_dune_fixer_callback.vader new file mode 100644 index 00000000..7fc0733c --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_dune_fixer_callback.vader @@ -0,0 +1,36 @@ +Before: + Save g:ale_ocaml_dune_executable + Save g:ale_ocaml_dune_options + + " Use an invalid global executable, so we don't match it. + let g:ale_ocaml_dune_executable = 'xxxinvalid' + let g:ale_ocaml_dune_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The dune callback should return the correct default values): + call ale#test#SetFilename('../test-files/ocaml/testfile.re') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' format', + \ }, + \ ale#fixers#dune#Fix(bufnr('')) + +Execute(The dune callback should include custom dune options): + let g:ale_ocaml_dune_options = "--random-option" + call ale#test#SetFilename('../test-files/ocaml/testfile.re') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' format' + \ . ' ' . g:ale_ocaml_dune_options, + \ }, + \ ale#fixers#dune#Fix(bufnr('')) diff --git a/vim-config/plugins/ale/test/fixers/test_gofumpt_fixer.vader b/vim-config/plugins/ale/test/fixers/test_gofumpt_fixer.vader new file mode 100644 index 00000000..63e04de8 --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_gofumpt_fixer.vader @@ -0,0 +1,27 @@ +Before: + call ale#assert#SetUpFixerTest('go', 'gofumpt') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The gofumpt callback should return the correct default values): + AssertFixer { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('gofumpt') . ' -w -- %t' + \} + +Execute(The gofumpt callback should allow custom gofumpt executables): + let g:ale_go_gofumpt_executable = 'foo/bar' + + AssertFixer { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('foo/bar') . ' -w -- %t' + \} + +Execute(The gofumpt callback should allow custom gofumpt options): + let g:ale_go_gofumpt_options = '--foobar' + + AssertFixer { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('gofumpt') . ' --foobar -w -- %t' + \} diff --git a/vim-config/plugins/ale/test/fixers/test_opa_fmt_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_opa_fmt_fixer_callback.vader new file mode 100644 index 00000000..3b112b2e --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_opa_fmt_fixer_callback.vader @@ -0,0 +1,33 @@ +Before: + Save g:ale_opa_fmt_executable + Save g:ale_opa_fmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_opa_fmt_executable = 'xxxinvalid' + let g:ale_opa_fmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The opa fmt callback should return the correct default values): + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' fmt', + \ }, + \ ale#fixers#opafmt#Fix(bufnr('')) + +Execute(The opa fmt callback should include custom options): + let g:ale_opa_fmt_options = "--list" + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' fmt' + \ . ' ' . g:ale_opa_fmt_options + \ }, + \ ale#fixers#opafmt#Fix(bufnr('')) diff --git a/vim-config/plugins/ale/test/fixers/test_packer_fmt_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_packer_fmt_fixer_callback.vader new file mode 100644 index 00000000..2eb07ed4 --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_packer_fmt_fixer_callback.vader @@ -0,0 +1,34 @@ +Before: + Save g:ale_packer_fmt_executable + Save g:ale_packer_fmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_packer_fmt_executable = 'xxxinvalid' + let g:ale_packer_fmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The packer fmt callback should return the correct default values): + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' fmt -', + \ }, + \ ale#fixers#packer#Fix(bufnr('')) + +Execute(The packer fmt callback should include custom options): + let g:ale_packer_fmt_options = "-list=true" + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' fmt' + \ . ' ' . g:ale_packer_fmt_options + \ . ' -', + \ }, + \ ale#fixers#packer#Fix(bufnr('')) diff --git a/vim-config/plugins/ale/test/fixers/test_pint_fixer.vader b/vim-config/plugins/ale/test/fixers/test_pint_fixer.vader new file mode 100644 index 00000000..5ea28b33 --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_pint_fixer.vader @@ -0,0 +1,62 @@ +Before: + Save g:ale_php_pint_executable + Save g:ale_php_pint_options + let g:ale_php_pint_executable = 'pint' + let g:ale_php_pint_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + + +Execute(project with pint should use local by default): + call ale#test#SetFilename('../test-files/php/project-with-pint/test.php') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/php/project-with-pint/vendor/bin/pint'), + \ ale#fixers#pint#GetExecutable(bufnr('')) + +Execute(use-global should override local detection): + let g:ale_php_pint_use_global = 1 + call ale#test#SetFilename('../test-files/php/project-with-pint/test.php') + + AssertEqual + \ 'pint', + \ ale#fixers#pint#GetExecutable(bufnr('')) + +Execute(project without pint should use global): + call ale#test#SetFilename('../test-files/php/project-without-pint/test.php') + + AssertEqual + \ 'pint', + \ ale#fixers#pint#GetExecutable(bufnr('')) + + + + +Execute(The pint callback should return the correct default values): + call ale#test#SetFilename('../test-files/php/project-without-pint/foo/test.php') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('pint') + \ . ' ' . g:ale_php_pint_options + \ . ' %t' + \ }, + \ ale#fixers#pint#Fix(bufnr('')) + +Execute(The pint callback should include custom pint options): + let g:ale_php_pint_options = '--test' + call ale#test#SetFilename('../test-files/php/project-without-pint/test.php') + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_php_pint_executable) + \ . ' --test %t', + \ 'read_temporary_file': 1, + \ }, + \ ale#fixers#pint#Fix(bufnr('')) diff --git a/vim-config/plugins/ale/test/fixers/test_pyflyby_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_pyflyby_fixer_callback.vader new file mode 100644 index 00000000..d017572e --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_pyflyby_fixer_callback.vader @@ -0,0 +1,38 @@ +Before: + call ale#assert#SetUpFixerTest('python', 'pyflyby') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + call ale#assert#TearDownFixerTest() + + unlet! b:bin_dir + +Execute(The pyflyby callback should return the correct default values): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + AssertFixer + \ { + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/tidy-imports')), + \ } + +Execute(Pipenv is detected when python_pyflyby_auto_pipenv is set): + let g:ale_python_pyflyby_auto_pipenv = 1 + + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertFixer + \ { + \ 'command': ale#Escape('pipenv') . ' run tidy-imports' + \ } + +Execute(Poetry is detected when python_pyflyby_auto_poetry is set): + let g:ale_python_pyflyby_auto_poetry = 1 + + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + GivenCommandOutput ['VERSION 5.7.0'] + AssertFixer + \ { + \ 'command': ale#Escape('poetry') . ' run tidy-imports' + \ } diff --git a/vim-config/plugins/ale/test/fixers/test_raco_fmt_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_raco_fmt_fixer_callback.vader new file mode 100644 index 00000000..34c599a3 --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_raco_fmt_fixer_callback.vader @@ -0,0 +1,17 @@ +Before: + call ale#assert#SetUpFixerTest('racket', 'raco_fmt') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The raco_fmt callback should return the correct default values): + call ale#test#SetFilename('../test-files/racket/simple-script/foo.rkt') + + AssertFixer {'command': ale#Escape('raco') . ' fmt'} + +Execute(The raco_fmt callback should include custom raco_fmt options): + let g:ale_racket_raco_fmt_options = "--width 100" + call ale#test#SetFilename('../test-files/racket/simple-script/foo.rkt') + + AssertFixer {'command': ale#Escape('raco') . ' fmt ' . g:ale_racket_raco_fmt_options} + diff --git a/vim-config/plugins/ale/test/fixers/test_ruff_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_ruff_fixer_callback.vader new file mode 100644 index 00000000..68c7a942 --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_ruff_fixer_callback.vader @@ -0,0 +1,122 @@ +Before: + call ale#assert#SetUpFixerTest('python', 'ruff') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + call ale#assert#TearDownFixerTest() + + unlet! g:dir + unlet! b:bin_dir + +Execute(The ruff callback should return the correct default values): + let file_path = g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py' + + silent execute 'file ' . fnameescape(file_path) + + let fname = ale#Escape(ale#path#Simplify(file_path)) + + " --fix does not support stdin until 0.0.72 + GivenCommandOutput ['ruff 0.0.72'] + AssertFixer + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir'), + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/ruff')) . ' --stdin-filename ' . fname . ' --fix -', + \ } + +Execute(The ruff callback should not use stdin for older versions (< 0.0.72)): + let file_path = g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py' + + silent execute 'file ' . fnameescape(file_path) + + let fname = ale#Escape(ale#path#Simplify(file_path)) + + " --fix does not support stdin until 0.0.72 + GivenCommandOutput ['ruff 0.0.71'] + AssertFixer + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir'), + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/ruff')) . ' --stdin-filename ' . fname . ' --fix %s', + \ } + +Execute(The ruff callback should not change directory if the option is set to 0): + let g:ale_python_ruff_change_directory = 0 + + let file_path = g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py' + + silent execute 'file ' . fnameescape(file_path) + + let fname = ale#Escape(ale#path#Simplify(file_path)) + + " --fix does not support stdin until 0.0.72 + GivenCommandOutput ['ruff 0.0.72'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/ruff')) . ' --stdin-filename ' . fname . ' --fix -', + \ } + +Execute(The ruff callback should respect custom options): + let g:ale_python_ruff_options = '--ignore F401 -q' + + let file_path = g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py' + + silent execute 'file ' . fnameescape(file_path) + + let fname = ale#Escape(ale#path#Simplify(file_path)) + + GivenCommandOutput ['ruff 0.0.72'] + AssertFixer + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir'), + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/ruff')) + \ . ' --ignore F401 -q --stdin-filename '. fname . ' --fix -', + \ } + +Execute(Pipenv is detected when python_ruff_auto_pipenv is set): + let g:ale_python_ruff_auto_pipenv = 1 + let g:ale_python_ruff_change_directory = 0 + + let file_path = '../test-files/python/pipenv/whatever.py' + + call ale#test#SetFilename(file_path) + + let fname = ale#Escape(ale#path#Simplify(g:dir . '/'. file_path)) + + GivenCommandOutput ['ruff 0.0.72'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape('pipenv') . ' run ruff --stdin-filename ' . fname . ' --fix -' + \ } + +Execute(Poetry is detected when python_ruff_auto_poetry is set): + let g:ale_python_ruff_auto_poetry = 1 + let g:ale_python_ruff_change_directory = 0 + + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + let fname = ale#Escape(ale#path#Simplify(g:dir .'/../test-files/python/poetry/whatever.py')) + + GivenCommandOutput ['ruff 0.0.72'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape('poetry') . ' run ruff --stdin-filename ' . fname . ' --fix -' + \ } + +Execute(Poetry is detected when python_ruff_auto_poetry is set, and cwd respects change_directory option): + let g:ale_python_ruff_auto_poetry = 1 + let g:ale_python_ruff_change_directory = 1 + + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + let fname = ale#Escape(ale#path#Simplify(g:dir .'/../test-files/python/poetry/whatever.py')) + + GivenCommandOutput ['ruff 0.0.72'] + AssertFixer + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/python/poetry'), + \ 'command': ale#Escape('poetry') . ' run ruff --stdin-filename ' . fname . ' --fix -' + \ } + diff --git a/vim-config/plugins/ale/test/fixers/test_shfmt_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_shfmt_fixer_callback.vader index 99cb0987..02fce526 100644 --- a/vim-config/plugins/ale/test/fixers/test_shfmt_fixer_callback.vader +++ b/vim-config/plugins/ale/test/fixers/test_shfmt_fixer_callback.vader @@ -14,39 +14,6 @@ Execute(The shfmt callback should return 'shfmt' as default command): \ ale#fixers#shfmt#Fix(bufnr('')).command =~# '^' . ale#Escape('shfmt'), \ "Default command name is expected to be 'shfmt'" -Execute(The shfmt callback should return the command with no option as default when noexpandtab is set): - let g:ale_sh_shfmt_executable = 'shfmt' - let g:ale_sh_shfmt_options = '' - setlocal noexpandtab - AssertEqual - \ { - \ 'command': ale#Escape('shfmt'), - \ }, - \ ale#fixers#shfmt#Fix(bufnr('')) - -Execute(The shfmt callback should return the command specifying indent width by looking shiftwidth as default): - let g:ale_sh_shfmt_executable = 'shfmt' - let g:ale_sh_shfmt_options = '' - setlocal expandtab - setlocal shiftwidth=4 - AssertEqual - \ { - \ 'command': ale#Escape('shfmt') . ' -i 4', - \ }, - \ ale#fixers#shfmt#Fix(bufnr('')) - -Execute(The shfmt callback should return the command specifying indent width by looking tabstop when shiftwidth is 0 as default): - let g:ale_sh_shfmt_executable = 'shfmt' - let g:ale_sh_shfmt_options = '' - setlocal expandtab - setlocal shiftwidth=0 - setlocal tabstop=8 - AssertEqual - \ { - \ 'command': ale#Escape('shfmt') . ' -i 8', - \ }, - \ ale#fixers#shfmt#Fix(bufnr('')) - Execute(The shfmt executable and options should be configurable): let g:ale_sh_shfmt_executable = 'foobar' let g:ale_sh_shfmt_options = '--some-option' @@ -54,6 +21,7 @@ Execute(The shfmt executable and options should be configurable): AssertEqual \ { \ 'command': ale#Escape('foobar') + \ . ' -filename=%s' \ . ' --some-option', \ }, \ ale#fixers#shfmt#Fix(bufnr('')) diff --git a/vim-config/plugins/ale/test/fixers/test_statix_fixer.vader b/vim-config/plugins/ale/test/fixers/test_statix_fixer.vader new file mode 100644 index 00000000..c55365a6 --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_statix_fixer.vader @@ -0,0 +1,18 @@ +Before: + call ale#assert#SetUpFixerTest('nix', 'statix') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The callback should return the correct default values): + AssertFixer { 'command': ale#Escape('statix') . ' fix --stdin' } + +Execute(The callback should include a custom runtime): + let g:ale_nix_statix_fix_executable = 'foo/bar' + + AssertFixer { 'command': ale#Escape('foo/bar') . ' fix --stdin' } + +Execute(The callback should include custom options): + let g:ale_nix_statix_fix_options = '--foobar' + + AssertFixer { 'command': ale#Escape('statix') . ' fix --stdin --foobar' } diff --git a/vim-config/plugins/ale/test/fixers/test_syntax_tree_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_syntax_tree_fixer_callback.vader new file mode 100644 index 00000000..46450985 --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_syntax_tree_fixer_callback.vader @@ -0,0 +1,37 @@ +Before: + Save g:ale_ruby_syntax_tree_executable + Save g:ale_ruby_syntax_tree_options + + " Use an invalid global executable, so we don't match it. + let g:ale_ruby_syntax_tree_executable = 'xxxinvalid' + let g:ale_ruby_syntax_tree_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The syntax_tree callback should return the correct default values): + call ale#test#SetFilename('../test-files/ruby/dummy.rb') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_ruby_syntax_tree_executable) + \ . ' write %t', + \ }, + \ ale#fixers#syntax_tree#Fix(bufnr('')) + +Execute(The syntax_tree callback should include custom options): + let g:ale_ruby_syntax_tree_options = '--print-width=100 --plugins=plugin/trailing_comma' + call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_ruby_syntax_tree_executable) + \ . ' write --print-width=100 --plugins=plugin/trailing_comma %t', + \ }, + \ ale#fixers#syntax_tree#Fix(bufnr('')) diff --git a/vim-config/plugins/ale/test/fixers/test_uncrustify_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_uncrustify_fixer_callback.vader index 26b5f892..c101a31a 100644 --- a/vim-config/plugins/ale/test/fixers/test_uncrustify_fixer_callback.vader +++ b/vim-config/plugins/ale/test/fixers/test_uncrustify_fixer_callback.vader @@ -17,7 +17,7 @@ Execute(The clang-format callback should return the correct default values): AssertEqual \ { \ 'command': ale#Escape(g:ale_c_uncrustify_executable) - \ . ' --no-backup' + \ . ' --no-backup -l C' \ }, \ ale#fixers#uncrustify#Fix(bufnr('')) @@ -28,6 +28,81 @@ Execute(The uncrustify callback should include any additional options): AssertEqual \ { \ 'command': ale#Escape(g:ale_c_uncrustify_executable) - \ . ' --no-backup --some-option', + \ . ' --no-backup -l C --some-option', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + +Execute(The uncrustify callback should set proper language): + unlet b:ale_c_uncrustify_options + + set filetype=c + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l C', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=cpp + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l CPP', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=cs + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l CS', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=objc + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l OC', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=objcpp + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l OC+', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=d + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l D', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=java + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l JAVA', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=vala + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l VALA', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=p + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l PAWN', \ }, \ ale#fixers#uncrustify#Fix(bufnr('')) diff --git a/vim-config/plugins/ale/test/fixers/test_zigfmt_fixer_callback.vader b/vim-config/plugins/ale/test/fixers/test_zigfmt_fixer_callback.vader new file mode 100644 index 00000000..47e3ddee --- /dev/null +++ b/vim-config/plugins/ale/test/fixers/test_zigfmt_fixer_callback.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpFixerTest('zig', 'zigfmt') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The zig callback should return the correct default values): + AssertFixer { + \ 'command': ale#Escape('zig') . ' fmt %t', + \ 'read_temporary_file': 1, + \} + +Execute(The zig callback should allow custom zig executables): + let g:ale_zig_zigfmt_executable = 'foo/bar' + + AssertFixer { + \ 'command': ale#Escape('foo/bar') . ' fmt %t', + \ 'read_temporary_file': 1, + \} + diff --git a/vim-config/plugins/ale/test/handler/test_actionlint_handler.vader b/vim-config/plugins/ale/test/handler/test_actionlint_handler.vader new file mode 100644 index 00000000..3e762129 --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_actionlint_handler.vader @@ -0,0 +1,43 @@ +Before: + runtime! ale/handlers/actionlint.vim + +After: + unlet! g:ale_yaml_actionlint_options + call ale#linter#Reset() + +Execute(Problems should be parsed correctly for actionlint): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'E', + \ 'text': '"jobs" section is missing in workflow', + \ 'code': 'syntax-check', + \ }, + \ { + \ 'lnum': 56, + \ 'col': 23, + \ 'type': 'E', + \ 'text': 'property "unknown_input" is not defined in object type {input7: bool; input0: any; input1: any; input2: string; input3: any; input4: any; input5: number; input6: number}', + \ 'code': 'expression', + \ }, + \ ], + \ ale#handlers#actionlint#Handle(bufnr(''), [ + \ '.codecov.yaml:2:1: "jobs" section is missing in workflow [syntax-check]', + \ 'workflow_call_event.yaml:56:23: property "unknown_input" is not defined in object type {input7: bool; input0: any; input1: any; input2: string; input3: any; input4: any; input5: number; input6: number} [expression]', + \ ]) + +Execute(Command should always have --no-color and --oneline options): + let g:ale_yaml_actionlint_options = '' + + AssertEqual + \ '%e --no-color --oneline %t', + \ ale#handlers#actionlint#GetCommand(bufnr('')) + +Execute(Options should be added to command): + let g:ale_yaml_actionlint_options = '-shellcheck= -pyflakes=' + + AssertEqual + \ '%e -shellcheck= -pyflakes= --no-color --oneline %t', + \ ale#handlers#actionlint#GetCommand(bufnr('')) diff --git a/vim-config/plugins/ale/test/handler/test_ansible_lint_handler.vader b/vim-config/plugins/ale/test/handler/test_ansible_lint_handler.vader index 28dbba30..fbc38f30 100644 --- a/vim-config/plugins/ale/test/handler/test_ansible_lint_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_ansible_lint_handler.vader @@ -23,7 +23,7 @@ Execute(The ansible-lint handler for version group <5 should handle basic errors \ fnamemodify(tempname(), ':h') . '/test_playbook.yml:35: [EANSIBLE0002] Trailing whitespace', \ ]) -Execute(The ansible-lint handler for version group <5 should supress trailing whitespace output when the option is used): +Execute(The ansible-lint handler for version group <5 should suppress trailing whitespace output when the option is used): let b:ale_warn_about_trailing_whitespace = 0 AssertEqual @@ -93,3 +93,9 @@ Execute (The ansible-lint handler should ignore errors from other files): \ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [5, 1, 2], [ \ '/foo/bar/roles/test_playbook.yml:6: [command-instead-of-module] [VERY_LOW] curl used in place of get_url or uri module', \ ]) + +Execute (The ansible-lint handler should work with empty input): + AssertEqual + \ [ + \ ], + \ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [6, 0, 0], []) diff --git a/vim-config/plugins/ale/test/handler/test_atools_handler.vader b/vim-config/plugins/ale/test/handler/test_atools_handler.vader index 1bb9ca00..3c226722 100644 --- a/vim-config/plugins/ale/test/handler/test_atools_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_atools_handler.vader @@ -26,7 +26,7 @@ Execute(The atools handler should handle basic errors or warings): \ ]) " Regardless of the severity, if the certainty is [P]ossible and not [C]ertain -" or if regardless of the Certainity the Severity is not [I]mportant or [S]erious +" or if regardless of the Certainty the Severity is not [I]mportant or [S]erious " then it must be a [W]arning Execute(If we are not Certain or Importantly Serious, be a Warning): AssertEqual diff --git a/vim-config/plugins/ale/test/handler/test_avra_handler.vader b/vim-config/plugins/ale/test/handler/test_avra_handler.vader new file mode 100644 index 00000000..0de83fb8 --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_avra_handler.vader @@ -0,0 +1,24 @@ +Before: + runtime ale_linters/avra/avra.vim + +After: + call ale#linter#Reset() + +Execute(The avra handler should parse errors correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'text': "Unknown device: atmega3228p", + \ 'type': 'E' + \ }, + \ { + \ 'lnum': 12, + \ 'text': "Unknown directive: .EQ", + \ 'type': 'E' + \ } + \ ], + \ ale_linters#avra#avra#Handle(bufnr(''), [ + \ "main.asm(3) : Error : Unknown device: atmega3228p", + \ "main.asm(12) : Error : Unknown directive: .EQ" + \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_bicep_bicep_handler.vader b/vim-config/plugins/ale/test/handler/test_bicep_bicep_handler.vader new file mode 100644 index 00000000..d105cae5 --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_bicep_bicep_handler.vader @@ -0,0 +1,30 @@ +Before: + runtime ale_linters/bicep/bicep.vim + +After: + Restore + + call ale#linter#Reset() + +Execute(The cmake_lint handler should handle basic warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 7, + \ 'col': 10, + \ 'type': 'W', + \ 'code': 'no-unused-existing-resources', + \ 'text': 'Existing resource "asdasd" is declared but never used. [https://aka.ms/bicep/linter/no-unused-existing-resources]', + \ }, + \ { + \ 'lnum': 106, + \ 'col': 6, + \ 'type': 'E', + \ 'code': 'BCP019', + \ 'text': 'Expected a new line character at this location.', + \ }, + \ ], + \ ale_linters#bicep#bicep#Handle(1, [ + \ '/tmp/nvimhxqs5D/1/dns.bicep(7,10) : Warning no-unused-existing-resources: Existing resource "asdasd" is declared but never used. [https://aka.ms/bicep/linter/no-unused-existing-resources]', + \ '/tmp/nvimhxqs5D/1/dns.bicep(106,6) : Error BCP019: Expected a new line character at this location.', + \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_bitbake_oelint_adv_handler.vader b/vim-config/plugins/ale/test/handler/test_bitbake_oelint_adv_handler.vader new file mode 100644 index 00000000..a52e8810 --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_bitbake_oelint_adv_handler.vader @@ -0,0 +1,28 @@ +Before: + runtime ale_linters/bitbake/oelint_adv.vim + +After: + Restore + + call ale#linter#Reset() + +Execute(The oelint_adv handler should handle warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 1234, + \ 'type': 'I', + \ 'code': 'oelint.var.suggestedvar.BUGTRACKER', + \ 'text': 'Variable ''BUGTRACKER'' should be set', + \ }, + \ { + \ 'lnum': 17, + \ 'type': 'E', + \ 'code': 'oelint.var.mandatoryvar.DESCRIPTION', + \ 'text': 'Variable ''DESCRIPTION'' should be set', + \ }, + \ ], + \ ale_linters#bitbake#oelint_adv#Handle(1, [ + \ '/meta-x/recipes-y/example/example_1.0.bb:1234:info:oelint.var.suggestedvar.BUGTRACKER:Variable ''BUGTRACKER'' should be set', + \ 'example2_1.1.bb:17:error:oelint.var.mandatoryvar.DESCRIPTION:Variable ''DESCRIPTION'' should be set', + \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_checkmake_handler.vader b/vim-config/plugins/ale/test/handler/test_checkmake_handler.vader index e2e18425..f1efb23e 100644 --- a/vim-config/plugins/ale/test/handler/test_checkmake_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_checkmake_handler.vader @@ -18,6 +18,6 @@ Execute(Parsing checkmake errors should work): \ } \ ], \ ale_linters#make#checkmake#Handle(42, [ - \ 'This shouldnt match', + \ "This shouldn't match", \ '1:woops:an error has occurred', \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_checkov_handler.vader b/vim-config/plugins/ale/test/handler/test_checkov_handler.vader new file mode 100644 index 00000000..9884113c --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_checkov_handler.vader @@ -0,0 +1,66 @@ +Before: + runtime ale_linters/terraform/checkov.vim + call ale#test#SetFilename('main.tf') + +After: + call ale#linter#Reset() + +Execute(The JSON output of checkov should be handled correctly): + AssertEqual + \ [ + \ { + \ 'filename': '/main.tf', + \ 'lnum': 22, + \ 'end_lnum': 27, + \ 'text': 'Enable VPC Flow Logs and Intranode Visibility [CKV_GCP_61]', + \ 'detail': "CKV_GCP_61: Enable VPC Flow Logs and Intranode Visibility\n" . + \ 'For more information, see: https://docs.bridgecrew.io/docs/enable-vpc-flow-logs-and-intranode-visibility', + \ 'type': 'W', + \ } + \ ], + \ ale_linters#terraform#checkov#Handle(bufnr(''), [ + \'{', + \' "check_type": "terraform",', + \' "results": {', + \' "failed_checks": [', + \' {', + \' "check_id": "CKV_GCP_61",', + \' "bc_check_id": "BC_GCP_KUBERNETES_18",', + \' "check_name": "Enable VPC Flow Logs and Intranode Visibility",', + \' "check_result": {', + \' "result": "FAILED",', + \' "evaluated_keys": [', + \' "enable_intranode_visibility"', + \' ]', + \' },', + \' "file_path": "/main.tf",', + \' "repo_file_path": "/main.tf",', + \' "file_line_range": [', + \' 22,', + \' 27', + \' ],', + \' "resource": "google_container_cluster.cluster-name",', + \' "evaluations": null,', + \' "check_class": "checkov.terraform.checks.resource.gcp.GKEEnableVPCFlowLogs",', + \' "entity_tags": null,', + \' "resource_address": null,', + \' "guideline": "https://docs.bridgecrew.io/docs/enable-vpc-flow-logs-and-intranode-visibility"', + \' }', + \' ]', + \' }', + \'}' + \ ]) + +Execute(Handle output for no findings correctly): + AssertEqual + \ [], + \ ale_linters#terraform#checkov#Handle(bufnr(''), [ + \'{', + \' "passed": 0,', + \' "failed": 0,', + \' "skipped": 0,', + \' "parsing_errors": 0,', + \' "resource_count": 0,', + \' "checkov_version": "2.0.632"', + \'}' + \]) diff --git a/vim-config/plugins/ale/test/handler/test_cmake_lint_handler.vader b/vim-config/plugins/ale/test/handler/test_cmake_lint_handler.vader new file mode 100644 index 00000000..26fb8c1d --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_cmake_lint_handler.vader @@ -0,0 +1,30 @@ +Before: + runtime ale_linters/cmake/cmake_lint.vim + +After: + Restore + + call ale#linter#Reset() + +Execute(The cmake_lint handler should handle basic warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 126, + \ 'col': 0, + \ 'type': 'W', + \ 'code': 'C0301', + \ 'text': 'Line too long (136/80)', + \ }, + \ { + \ 'lnum': 139, + \ 'col': 4, + \ 'type': 'W', + \ 'code': 'C0113', + \ 'text': 'Missing COMMENT in statement which allows it', + \ }, + \ ], + \ ale_linters#cmake#cmake_lint#Handle(1, [ + \ 'CMakeLists.txt:126: [C0301] Line too long (136/80)', + \ 'CMakeLists.txt:139,04: [C0113] Missing COMMENT in statement which allows it', + \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_cppcheck_handler.vader b/vim-config/plugins/ale/test/handler/test_cppcheck_handler.vader index 2a740722..ef161f44 100644 --- a/vim-config/plugins/ale/test/handler/test_cppcheck_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_cppcheck_handler.vader @@ -63,6 +63,23 @@ Execute(Basic errors should be handled by cppcheck): \ ' ^', \ ]) + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col' : 16, + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'misra violation (use --rule-texts= to get proper output)', + \ 'code': 'misra-c2012-2.7' + \ }, + \ ], + \ ale#handlers#cppcheck#HandleCppCheckFormat(bufnr(''), [ + \ 'test.cpp:1:16: style: misra violation (use --rule-texts= to get proper output) [misra-c2012-2.7]\', + \ 'void test( int parm ) {}', + \ ' ^', + \ ]) + Execute(Problems from other files should be ignored by cppcheck): call ale#test#SetFilename('test.cpp') diff --git a/vim-config/plugins/ale/test/handler/test_cspell_handler.vader b/vim-config/plugins/ale/test/handler/test_cspell_handler.vader new file mode 100644 index 00000000..b74b8d22 --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_cspell_handler.vader @@ -0,0 +1,13 @@ +Execute(The cspell handler should handle cspell output): + AssertEqual + \ [ + \ { + \ 'lnum': 721, + \ 'col': 18, + \ 'type': 'W', + \ 'text': 'Unknown word (stylelint)', + \ }, + \ ], + \ ale#handlers#cspell#Handle(bufnr(''), + \ '/:721:18 - Unknown word (stylelint)' + \) diff --git a/vim-config/plugins/ale/test/handler/test_dart_analyze_handler.vader b/vim-config/plugins/ale/test/handler/test_dart_analyze_handler.vader index b3f20fb8..f167582c 100644 --- a/vim-config/plugins/ale/test/handler/test_dart_analyze_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_dart_analyze_handler.vader @@ -19,10 +19,17 @@ Execute(Basic problems should be parsed correctly): \ 'lnum': 2, \ 'col': 16, \ }, + \ { + \ 'type': 'I', + \ 'text': 'dead_code: Dead code. Try removing the code, or fixing the code before it so that it can be reached.', + \ 'lnum': 8, + \ 'col': 3, + \ }, \ ], \ ale_linters#dart#dart_analyze#Handle(bufnr(''), [ \ 'Analyzing main.dart...', \ ' error - main.dart:5:1 - Expected to find ''}'' - expected_token', - \ ' warning - main.dart:2:16 - A value of type ''String'' can''t be assigned to a variable of type ''int'' - invalid_assignment', - \ '1 error and 1 warning found.', + \ 'warning - main.dart:2:16 - A value of type ''String'' can''t be assigned to a variable of type ''int'' - invalid_assignment', + \ ' info - main.dart:8:3 - Dead code. Try removing the code, or fixing the code before it so that it can be reached. - dead_code', + \ '3 issues found.', \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_dartanalyzer_handler.vader b/vim-config/plugins/ale/test/handler/test_dartanalyzer_handler.vader deleted file mode 100644 index 954850c5..00000000 --- a/vim-config/plugins/ale/test/handler/test_dartanalyzer_handler.vader +++ /dev/null @@ -1,28 +0,0 @@ -Before: - runtime ale_linters/dart/dartanalyzer.vim - -After: - call ale#linter#Reset() - -Execute(Basic problems should be parsed correctly): - AssertEqual - \ [ - \ { - \ 'type': 'E', - \ 'text': 'expected_token: Expected to find ''}''', - \ 'lnum': 5, - \ 'col': 1, - \ }, - \ { - \ 'type': 'W', - \ 'text': 'invalid_assignment: A value of type ''String'' can''t be assigned to a variable of type ''int''', - \ 'lnum': 2, - \ 'col': 16, - \ }, - \ ], - \ ale_linters#dart#dartanalyzer#Handle(bufnr(''), [ - \ 'Analyzing main.dart...', - \ ' error • Expected to find ''}'' at main.dart:5:1 • expected_token', - \ ' warning • A value of type ''String'' can''t be assigned to a variable of type ''int'' at main.dart:2:16 • invalid_assignment', - \ '1 error and 1 warning found.', - \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_erlang_elvis_handler.vader b/vim-config/plugins/ale/test/handler/test_erlang_elvis_handler.vader index 365376c8..0a6d756d 100644 --- a/vim-config/plugins/ale/test/handler/test_erlang_elvis_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_erlang_elvis_handler.vader @@ -11,11 +11,13 @@ Execute(Warning messages should be handled): \ 'lnum': 11, \ 'text': "Replace the 'if' expression on line 11 with a 'case' expression or function clauses.", \ 'type': 'W', + \ 'sub_type': 'style', \ }, \ { \ 'lnum': 20, \ 'text': 'Remove the debug call to io:format/1 on line 20.', \ 'type': 'W', + \ 'sub_type': 'style', \ }, \ ], \ ale_linters#erlang#elvis#Handle(bufnr(''), [ @@ -30,6 +32,7 @@ Execute(Line length message shouldn't contain the line itself): \ 'lnum': 24, \ 'text': 'Line 24 is too long.', \ 'type': 'W', + \ 'sub_type': 'style', \ }, \ ], \ ale_linters#erlang#elvis#Handle(bufnr(''), [ diff --git a/vim-config/plugins/ale/test/handler/test_ghc_handler.vader b/vim-config/plugins/ale/test/handler/test_ghc_handler.vader index b040a234..feaa51fc 100644 --- a/vim-config/plugins/ale/test/handler/test_ghc_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_ghc_handler.vader @@ -7,16 +7,16 @@ Execute(The ghc handler should handle hdevtools output): \ 'lnum': 147, \ 'type': 'W', \ 'col': 62, - \ 'text': '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’ Expected type: [T.Text]', + \ 'text': "• Couldn't match type ‘a -> T.Text’ with ‘T.Text’ Expected type: [T.Text]", \ 'detail': join([ - \ '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’', + \ "• Couldn't match type ‘a -> T.Text’ with ‘T.Text’", \ ' Expected type: [T.Text]', \ ], "\n"), \ }, \ ], \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [ \ 'foo.hs:147:62: warning:', - \ '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’', + \ "• Couldn't match type ‘a -> T.Text’ with ‘T.Text’", \ ' Expected type: [T.Text]', \ ]) @@ -130,3 +130,48 @@ Execute(The ghc handler should handle stack 1.5.1 output): \ ' 160 | pattern F :: Exp a', \ ' | ^^^^^', \ ]) + +Execute(The ghc handler should handle ghc panic): + let g:detail = [ + \ '[15 of 15] Compiling SizedTypes.List', + \ 'ghc: panic! (the ''impossible'' happened)', + \ ' (GHC version 8.10.3:', + \ ' src/SizedTypes/List.hs:(46,19)-(50,0) Specified type does not refine Haskell type for `SizedTypes.List.out` (Plugged Init types new)', + \ ' The Liquid type', + \ ' .', + \ ' GHC.Types.Int -> (SizedTypes.List.List a) -> (_, (SizedTypes.List.List a))', + \ ' .', + \ ' is inconsistent with the Haskell type', + \ ' .', + \ ' forall p a ->', + \ 'p -> SizedTypes.List.List a -> (a, SizedTypes.List.List a)', + \ ' .', + \ ' defined at src/SizedTypes/List.hs:52:1-3', + \ ' .', + \ ' Specifically, the Liquid component', + \ ' .', + \ ' {VV##0 : GHC.Types.Int | VV##0 >= 0}', + \ ' .', + \ ' is inconsistent with the Haskell component', + \ ' .', + \ ' p', + \ ' .', + \ ' ', + \ ' HINT: Use the hole ''_'' instead of the mismatched component (in the Liquid specification)', + \ '', + \ 'Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug', + \ '', + \ '' + \ ] + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'ghc panic!', + \ 'detail': join(g:detail[1:-3], "\n"), + \ }, + \ ], + \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), g:detail) + unlet g:detail diff --git a/vim-config/plugins/ale/test/handler/test_gitlablint_handler.vader b/vim-config/plugins/ale/test/handler/test_gitlablint_handler.vader new file mode 100644 index 00000000..3b08ccb4 --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_gitlablint_handler.vader @@ -0,0 +1,35 @@ +Before: + runtime! ale_linters/yaml/gitlablint.vim + +After: + Restore + call ale#linter#Reset() + +Execute(Problems should be parsed correctly for gitlablint): + AssertEqual + \ [ + \ { + \ 'lnum': 0, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'root config contains unknown keys: efore_script', + \ }, + \ { + \ 'lnum': 77, + \ 'col': 3, + \ 'type': 'E', + \ 'text': '(): could not find expected : while scanning a simple key', + \ }, + \ { + \ 'lnum': 0, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'build:dev:rest job: undefined need: chck:dev', + \ }, + \ ], + \ ale_linters#yaml#gitlablint#Handle(bufnr(''), [ + \ 'GitLab CI configuration is invalid', + \ 'root config contains unknown keys: efore_script', + \ '(): could not find expected : while scanning a simple key at line 77 column 3', + \ 'build:dev:rest job: undefined need: chck:dev', + \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_golangci_lint_handler.vader b/vim-config/plugins/ale/test/handler/test_golangci_lint_handler.vader index fb6841f4..58815f56 100644 --- a/vim-config/plugins/ale/test/handler/test_golangci_lint_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_golangci_lint_handler.vader @@ -13,19 +13,21 @@ Execute (The golangci-lint handler should handle names with spaces): \ 'C:\something\file with spaces.go', \ '12', \ '3', - \ 'expected ''package'', found ''IDENT'' gibberish (staticcheck)', + \ 'expected ''package'', found ''IDENT'' gibberish', + \ 'staticcheck', \ ], \ [ \ 'C:\something\file with spaces.go', \ '37', \ '5', - \ 'expected ''package'', found ''IDENT'' gibberish (golint)', + \ 'expected ''package'', found ''IDENT'' gibberish', + \ 'golint', \ ], \ ], \ map(ale_linters#go#golangci_lint#GetMatches([ \ 'C:\something\file with spaces.go:12:3: expected ''package'', found ''IDENT'' gibberish (staticcheck)', \ 'C:\something\file with spaces.go:37:5: expected ''package'', found ''IDENT'' gibberish (golint)', - \ ]), 'v:val[1:4]') + \ ]), 'v:val[1:5]') Execute (The golangci-lint handler should handle paths correctly): call ale#test#SetFilename('app/test.go') @@ -38,14 +40,14 @@ Execute (The golangci-lint handler should handle paths correctly): \ 'lnum': 12, \ 'col': 3, \ 'text': 'expected ''package'', found ''IDENT'' gibberish (staticcheck)', - \ 'type': 'E', + \ 'type': 'W', \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'), \ }, \ { \ 'lnum': 37, \ 'col': 5, \ 'text': 'expected ''package'', found ''IDENT'' gibberish (golint)', - \ 'type': 'E', + \ 'type': 'W', \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'), \ }, \ ], @@ -53,3 +55,30 @@ Execute (The golangci-lint handler should handle paths correctly): \ file . ':12:3: expected ''package'', found ''IDENT'' gibberish (staticcheck)', \ file . ':37:5: expected ''package'', found ''IDENT'' gibberish (golint)', \ ]) + +Execute (The golangci-lint handler should handle only typecheck lines as errors): + call ale#test#SetFilename('app/main.go') + + let file = ale#path#GetAbsPath(expand('%:p:h'), 'test.go') + + AssertEqual + \ [ + \ { + \ 'lnum': 30, + \ 'col': 5, + \ 'text': 'variable ''err'' is not used (typecheck)', + \ 'type': 'E', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'), + \ }, + \ { + \ 'lnum': 505, + \ 'col': 75, + \ 'text': 'Magic number: 404, in detected (gomnd)', + \ 'type': 'W', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'), + \ } + \ ], + \ ale_linters#go#golangci_lint#Handler(bufnr(''), [ + \ file . ':30:5: variable ''err'' is not used (typecheck)', + \ file . ':505:75: Magic number: 404, in detected (gomnd)', + \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_lua_selene_handler.vader b/vim-config/plugins/ale/test/handler/test_lua_selene_handler.vader new file mode 100644 index 00000000..e9410ae9 --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_lua_selene_handler.vader @@ -0,0 +1,38 @@ +Before: + runtime ale_linters/lua/selene.vim + +After: + Restore + call ale#linter#Reset() + +Execute(The selene handler for Lua should parse input correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'end_lnum': 2, + \ 'col': 1, + \ 'end_col': 3, + \ 'text': 'empty if block', + \ 'code': 'empty_if', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 1, + \ 'end_lnum': 1, + \ 'col': 4, + \ 'end_col': 11, + \ 'text': 'comparing things to nan directly is not allowed', + \ 'code': 'compare_nan', + \ 'type': 'E', + \ 'detail': "comparing things to nan directly is not allowed\n\ntry: `x ~= x` instead" + \ }, + \ ], + \ ale_linters#lua#selene#Handle(0, [ + \ '{"severity":"Warning","code":"empty_if","message":"empty if block","primary_label":{"span":{"start":0,"start_line":0,"start_column":0,"end":20,"end_line":1,"end_column":3},"message":""},"notes":[],"secondary_labels":[]}', + \ '{"severity":"Error","code":"compare_nan","message":"comparing things to nan directly is not allowed","primary_label":{"span":{"start":3,"start_line":0,"start_column":3,"end":11,"end_line":0,"end_column":11},"message":""},"notes":["try: `x ~= x` instead"],"secondary_labels":[]}', + \ 'Results:', + \ '1 errors', + \ '1 warnings', + \ '0 parse errors', + \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_naga_handler.vader b/vim-config/plugins/ale/test/handler/test_naga_handler.vader new file mode 100644 index 00000000..48b8c281 --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_naga_handler.vader @@ -0,0 +1,23 @@ +Before: + runtime ale_linters/wgsl/naga.vim + +After: + call ale#linter#Reset() + +Execute(Error handler should parse error message and position from input): + let example_output = [ + \ "error: expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file, found '['", + \ " ┌─ wgsl:5:1", + \ " │", + \ "5 │ [[group(1), binding(0)]]", + \ " │ ^ expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file", + \ "Could not parse WGSL", + \ ] + let actual = ale#handlers#naga#Handle(0, example_output) + let expected = [{ + \ "text": "expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file, found '['", + \ "lnum": 5, + \ "col": 1, + \ "type": "E", + \ }] + AssertEqual actual, expected diff --git a/vim-config/plugins/ale/test/handler/test_nix_handler.vader b/vim-config/plugins/ale/test/handler/test_nix_handler.vader index 87e8b68f..ee02fef2 100644 --- a/vim-config/plugins/ale/test/handler/test_nix_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_nix_handler.vader @@ -49,3 +49,53 @@ Execute(The nix handler should parse message from old nix-instantiate correctly) \ 'error: syntax error, unexpected IN, at /path/to/filename.nix:23:14', \ 'error: syntax error, unexpected ''='', expecting '';'', at /path/to/filename.nix:3:12', \ ]) + +Execute(The nix command should not add 'log-format' option for nix version 2.3): + AssertEqual + \ 'nix-instantiate --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.3.0'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.4): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.4.1'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.5): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.5.0pre20211206_d1aaa7e'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.6): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.6.0pre20211206_ignored'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.7): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.7.0pre20211206_ignored'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.8): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.8.0pre20211206_ignored'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.9): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.9.0pre20211206_ignored'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.10): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.10.0pre20221221_ignored'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.20): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.20.0pre20221221_ignored'], '') + +Execute(The nix command should add 'log-format' option for nix version 3.0): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 3.0.0pre20211206_ignored'], '') diff --git a/vim-config/plugins/ale/test/handler/test_openscad_handler.vader b/vim-config/plugins/ale/test/handler/test_openscad_handler.vader new file mode 100644 index 00000000..aaecc588 --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_openscad_handler.vader @@ -0,0 +1,76 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/handler') + + " Load sca2d + runtime ale_linters/openscad/sca2d.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(The openscad handler should handle sca2d output): + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify(g:dir . '/awesome_project.scad'), + \ 'lnum': 7, + \ 'type': 'E', + \ 'col': 42, + \ 'text': 'Module `corcle` used but never defined.', + \ 'detail': 'E2002: Module `corcle` used but never defined.', + \ }, + \ ], + \ ale#handlers#openscad#SCA2D_callback(bufnr(''), [ + \ 'awesome_project.scad:7:42: E2002: Module `corcle` used but never defined.', + \ '', + \ 'SCA2D message summary', + \ '=====================', + \ 'Fatal errors: 0', + \ 'Errors: 1', + \ 'Warnings: 0', + \ 'Info: 0', + \ 'Depreciated 0', + \ ]) + + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify(g:dir . '/awesome_project.scad'), + \ 'lnum': 1, + \ 'type': 'E', + \ 'col': 37, + \ 'text': 'Cannot read file due to syntax error: - No terminal matches ''}'' in the current parser context', + \ 'detail': 'F0001: Cannot read file due to syntax error: - No terminal matches ''}'' in the current parser context', + \ }, + \ ], + \ ale#handlers#openscad#SCA2D_callback(bufnr(''), [ + \ 'awesome_project.scad:1:1: F0001: Cannot read file due to syntax error:', + \ ' - No terminal matches ''}'' in the current parser context, at line 1 col 37', + \ ' - ', + \ ' - translate([ 0, 0, 0 ]) { circle(10) }', + \ ' - ^', + \ ' - Expected one of: ', + \ ' - * IF', + \ ' - * LET', + \ ' - * FOR', + \ ' - * FUNC_CALL_NAME', + \ ' - * TERMINATION', + \ ' - * STAR', + \ ' - * LBRACE', + \ ' - * BANG', + \ ' - * ASSIGN', + \ ' - * PERCENT', + \ ' - * HASH', + \ ' - * INTERSECTION_FOR', + \ ' - ', + \ 'If you believe this is a bug in SCA2D please report it to us.', + \ '', + \ '', + \ 'SCA2D message summary', + \ '=====================', + \ 'Fatal errors: 1', + \ 'Errors: 0', + \ 'Warnings: 0', + \ 'Info: 0', + \ 'Depreciated 0', + \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_pylama_handler.vader b/vim-config/plugins/ale/test/handler/test_pylama_handler.vader index d21c65d3..3d1151b5 100644 --- a/vim-config/plugins/ale/test/handler/test_pylama_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_pylama_handler.vader @@ -12,10 +12,13 @@ After: silent file something_else.py -Execute(The pylama handler should handle no messages): - AssertEqual [], ale_linters#python#pylama#Handle(bufnr(''), []) +Execute(The pylama handler should handle no messages with version older than 8.1.4): + AssertEqual [], ale_linters#python#pylama#Handle(bufnr(''), [8, 0, 5], []) -Execute(The pylama handler should handle basic warnings and syntax errors): +Execute(The pylama handler should handle no messages with version newer or equal than 8.1.4): + AssertEqual [], ale_linters#python#pylama#Handle(bufnr(''), [8, 2, 0], []) + +Execute(The pylama handler should handle basic warnings and syntax errors with version older than 8.1.4): AssertEqual \ [ \ { @@ -83,7 +86,7 @@ Execute(The pylama handler should handle basic warnings and syntax errors): \ 'text': 'Invalid string quote ", should be '' [pylint]', \ }, \ ], - \ ale_linters#python#pylama#Handle(bufnr(''), [ + \ ale_linters#python#pylama#Handle(bufnr(''), [8, 0, 5], [ \ 'No config file found, using default configuration', \ 'index.py:8:1: W0611 ''foo'' imported but unused [pyflakes]', \ 'index.py:8:0: E0401 Unable to import ''foo'' [pylint]', @@ -95,7 +98,79 @@ Execute(The pylama handler should handle basic warnings and syntax errors): \ 'index.py:20:0: C4001 Invalid string quote ", should be '' [pylint]', \ ]) -Execute(The pylama handler should handle tracebacks with parsable messages): +Execute(The pylama handler should handle basic warnings and syntax errors with version newer than 8.1.4): + AssertEqual + \ [ + \ { + \ 'lnum': 8, + \ 'col': 1, + \ 'code': 'W0611', + \ 'type': 'W', + \ 'sub_type': '', + \ 'text': '''foo'' imported but unused [pyflakes]', + \ }, + \ { + \ 'lnum': 8, + \ 'col': 0, + \ 'code': 'E0401', + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'Unable to import ''foo'' [pylint]', + \ }, + \ { + \ 'lnum': 10, + \ 'col': 1, + \ 'code': 'E302', + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'expected 2 blank lines, found 1 [pycodestyle]', + \ }, + \ { + \ 'lnum': 11, + \ 'col': 1, + \ 'code': 'D401', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'First line should be in imperative mood (''Get'', not ''Gets'') [pydocstyle]', + \ }, + \ { + \ 'lnum': 15, + \ 'col': 81, + \ 'code': 'E501', + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'line too long (96 > 80 characters) [pycodestyle]', + \ }, + \ { + \ 'lnum': 16, + \ 'col': 1, + \ 'code': 'D203', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': '1 blank line required before class docstring (found 0) [pydocstyle]', + \ }, + \ { + \ 'lnum': 18, + \ 'col': 1, + \ 'code': 'D107', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'Missing docstring in __init__ [pydocstyle]', + \ }, + \ { + \ 'lnum': 20, + \ 'col': 0, + \ 'code': 'C4001', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'Invalid string quote ", should be '' [pylint]', + \ }, + \ ], + \ ale_linters#python#pylama#Handle(bufnr(''), [8, 2, 0], [ + \ '[{"source":"pyflakes","col":1,"lnum":8,"etype":"W","message":"''foo'' imported but unused","filename":"index.py","number":"W0611"},{"source":"pylint","col":0,"lnum":8,"etype":"E","message":"Unable to import ''foo''","filename":"index.py","number":"E0401"},{"source":"pycodestyle","col":1,"lnum":10,"etype":"E","message":"expected 2 blank lines, found 1","filename":"index.py","number":"E302"},{"source":"pydocstyle","col":1,"lnum":11,"etype":"D","message":"First line should be in imperative mood (''Get'', not ''Gets'')","filename":"index.py","number":"D401"},{"source":"pycodestyle","col":81,"lnum":15,"etype":"E","message":"line too long (96 > 80 characters)","filename":"index.py","number":"E501"},{"source":"pydocstyle","col":1,"lnum":16,"etype":"D","message":"1 blank line required before class docstring (found 0)","filename":"index.py","number":"D203"},{"source":"pydocstyle","col":1,"lnum":18,"etype":"D","message":"Missing docstring in __init__","filename":"index.py","number":"D107"},{"source":"pylint","col":0,"lnum":20,"etype":"C","message":"Invalid string quote \", should be ''","filename":"index.py","number":"C4001"}]', + \ ]) + +Execute(The pylama handler should handle tracebacks with parsable messages with version older than 8.1.4): AssertEqual \ [ \ { @@ -135,7 +210,7 @@ Execute(The pylama handler should handle tracebacks with parsable messages): \ 'text': 'line too long (96 > 80 characters) [pycodestyle]', \ }, \ ], - \ ale_linters#python#pylama#Handle(bufnr(''), [ + \ ale_linters#python#pylama#Handle(bufnr(''), [8, 0, 5], [ \ 'Traceback (most recent call last):', \ ' File "/usr/local/lib/python2.7/site-packages/pylama/core.py", line 66, in run', \ ' path, code=code, ignore=ignore, select=select, params=lparams)', @@ -158,7 +233,7 @@ Execute(The pylama handler should handle tracebacks with parsable messages): " Note: This is probably a bug, since all pylama plugins produce codes, but " should be handled for compatibility. " Note: The pylama isort plugin is distributed in the isort package. -Execute(The pylama handler should handle messages without codes): +Execute(The pylama handler should handle messages without codes with version older than 8.1.4): AssertEqual \ [ \ { @@ -170,13 +245,13 @@ Execute(The pylama handler should handle messages without codes): \ 'text': 'Incorrectly sorted imports. [isort]' \ }, \ ], - \ ale_linters#python#pylama#Handle(bufnr(''), [ + \ ale_linters#python#pylama#Handle(bufnr(''), [8, 0, 5], [ \ 'index.py:0:0: Incorrectly sorted imports. [isort]', \ ]) " Note: This is a pylama bug, but should be handled for compatibility. " See https://github.com/klen/pylama/pull/146 -Execute(The pylama handler should handle message codes followed by a colon): +Execute(The pylama handler should handle message codes followed by a colon with version older than 8.1.4): AssertEqual \ [ \ { @@ -188,6 +263,6 @@ Execute(The pylama handler should handle message codes followed by a colon): \ 'text': 'Found commented out code: # needs_sphinx = ''1.0'' [eradicate]', \ }, \ ], - \ ale_linters#python#pylama#Handle(bufnr(''), [ + \ ale_linters#python#pylama#Handle(bufnr(''), [8, 0, 5], [ \ 'index.py:31:1: E800: Found commented out code: # needs_sphinx = ''1.0'' [eradicate]', \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_sml_handler.vader b/vim-config/plugins/ale/test/handler/test_sml_handler.vader index 4e16e244..ef93cc47 100644 --- a/vim-config/plugins/ale/test/handler/test_sml_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_sml_handler.vader @@ -85,3 +85,35 @@ Execute (Testing a warning): \ "val f = fn : int -> int", \ "-", \]) + +Execute (Testing stdIn): + AssertEqual [ + \ { + \ 'bufnr': 42, + \ 'lnum': 1, + \ 'col': 5, + \ 'type': 'E', + \ 'text': "Error: operator and operand don't agree [overload conflict]", + \ }, + \ { + \ 'bufnr': 42, + \ 'lnum': 2, + \ 'col': 4, + \ 'type': 'E', + \ 'text': "Error: operator and operand don't agree [overload conflict]", + \ }, + \], + \ ale#handlers#sml#Handle(42, [ + \ "Standard ML of New Jersey v110.79 [built: Sat Oct 26 12:27:04 2019]", + \ "- = stdIn:1.6-1.21 Error: operator and operand don't agree [overload conflict]", + \ " operator domain: [+ ty] * [+ ty]", + \ " operand: string * [int ty]", + \ " in expression:", + \ ' "abc" + 123', + \ "stdIn:2.5-2.20 Error: operator and operand don't agree [overload conflict]", + \ " operator domain: [+ ty] * [+ ty]", + \ " operand: [+ ty] * string", + \ " in expression:", + \ ' 890 + "xyz"', + \ "-", + \]) diff --git a/vim-config/plugins/ale/test/handler/test_sql_sqlfluff_handler.vader b/vim-config/plugins/ale/test/handler/test_sql_sqlfluff_handler.vader new file mode 100644 index 00000000..f1f684bd --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_sql_sqlfluff_handler.vader @@ -0,0 +1,39 @@ +Before: + runtime ale_linters/sql/sqlfluff.vim + +After: + Restore + + call ale#linter#Reset() + +Execute(The sqlfluff handler should handle basic warnings): + AssertEqual + \ [ + \ { + \ 'filename': 'schema.sql', + \ 'lnum': 1, + \ 'col': 8, + \ 'type': 'W', + \ 'code': 'L010', + \ 'text': 'Keywords must be consistently upper case.', + \ }, + \ { + \ 'filename': 'schema.sql', + \ 'lnum': 13, + \ 'col': 2, + \ 'type': 'W', + \ 'code': 'L003', + \ 'text': 'Expected 1 indentation, found 0 [compared to line 12]', + \ }, + \ { + \ 'filename': 'schema.sql', + \ 'lnum': 16, + \ 'col': 1, + \ 'type': 'W', + \ 'code': 'L009', + \ 'text': 'Files must end with a single trailing newline.', + \ }, + \ ], + \ ale_linters#sql#sqlfluff#Handle(1, [ + \ '[{"filepath": "schema.sql", "violations": [{"line_no": 1, "line_pos": 8, "code": "L010", "description": "Keywords must be consistently upper case."}, {"line_no": 13, "line_pos": 2, "code": "L003", "description": "Expected 1 indentation, found 0 [compared to line 12]"}, {"line_no": 16, "line_pos": 1, "code": "L009", "description": "Files must end with a single trailing newline."}]}]', + \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_starknet_handler.vader b/vim-config/plugins/ale/test/handler/test_starknet_handler.vader new file mode 100644 index 00000000..767cb211 --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_starknet_handler.vader @@ -0,0 +1,36 @@ +Before: + runtime ale_linters/cairo/starknet.vim + +After: + call ale#linter#Reset() + +Execute(The starknet handler should handle error messages correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'col': 6, + \ 'text': 'Could not find module "starkware.cairo.commo.cairo_builtins". Searched in the following paths:', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#cairo#starknet#Handle(bufnr(''), [ + \ 'contract.cairo:3:6: Could not find module "starkware.cairo.commo.cairo_builtins". Searched in the following paths:', + \ 'from starkware.cairo.commo.cairo_builtins import HashBuiltin', + \ ' ^**********************************^', + \ ]) + + AssertEqual + \ [ + \ { + \ 'lnum': 21, + \ 'col': 2, + \ 'text': 'Unsupported decorator: "vie".', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#cairo#starknet#Handle(bufnr(''), [ + \ 'contract.cairo:21:2: Unsupported decorator: "vie".', + \ '@vie', + \ ' ^*^', + \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_statix_handler.vader b/vim-config/plugins/ale/test/handler/test_statix_handler.vader new file mode 100644 index 00000000..f2a105ee --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_statix_handler.vader @@ -0,0 +1,16 @@ +Execute(The statix handler should handle statix output): + call ale#test#SetFilename('flake.nix') + + AssertEqual + \ [ + \ { + \ 'lnum': 46, + \ 'type': 'W', + \ 'col': 13, + \ 'code': '3', + \ 'text': 'This assignment is better written with `inherit`' + \ }, + \ ], + \ ale#handlers#statix#Handle(bufnr(''), + \ '>46:13:W:3:This assignment is better written with `inherit`' + \) diff --git a/vim-config/plugins/ale/test/handler/test_terraform_handler.vader b/vim-config/plugins/ale/test/handler/test_terraform_handler.vader index d054cb3b..4be89cb1 100644 --- a/vim-config/plugins/ale/test/handler/test_terraform_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_terraform_handler.vader @@ -97,3 +97,42 @@ Execute(Should use summary if detail not available): \ ' ]', \ '}' \ ]) + +Execute(Should use summary if detail available but empty): + AssertEqual + \ [ + \ { + \ 'lnum': 91, + \ 'col': 41, + \ 'filename': ale#path#Simplify(g:dir . '/main.tf'), + \ 'type': 'E', + \ 'text': 'storage_os_disk: required field is not set', + \ } + \ ], + \ ale_linters#terraform#terraform#Handle(bufnr(''), [ + \ '{', + \ ' "valid": false,', + \ ' "error_count": 1,', + \ ' "warning_count": 0,', + \ ' "diagnostics": [', + \ ' {', + \ ' "severity": "error",', + \ ' "summary": "storage_os_disk: required field is not set",', + \ ' "detail": "",', + \ ' "range": {', + \ ' "filename": "main.tf",', + \ ' "start": {', + \ ' "line": 91,', + \ ' "column": 41,', + \ ' "byte": 2381', + \ ' },', + \ ' "end": {', + \ ' "line": 91,', + \ ' "column": 41,', + \ ' "byte": 2381', + \ ' }', + \ ' }', + \ ' }', + \ ' ]', + \ '}' + \ ]) diff --git a/vim-config/plugins/ale/test/handler/test_tfsec_handler.vader b/vim-config/plugins/ale/test/handler/test_tfsec_handler.vader new file mode 100644 index 00000000..f6566986 --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_tfsec_handler.vader @@ -0,0 +1,52 @@ +Before: + runtime ale_linters/terraform/tfsec.vim + +After: + call ale#linter#Reset() + +Execute(The tfsec handler should handle empty output): + AssertEqual + \ [], + \ ale_linters#terraform#tfsec#Handle(bufnr(''), ['{"results": null}']) + +Execute(The tfsec handler should parse results correctly): + AssertEqual + \ [ + \ { + \ 'filename': '/test/main.tf', + \ 'lnum': 10, + \ 'end_lnum': 12, + \ 'text': "IAM policy document uses sensitive action 'iam:PassRole' on wildcarded resource '*'", + \ 'code': 'aws-iam-no-policy-wildcards', + \ 'type': 'W', + \ }, + \], + \ ale_linters#terraform#tfsec#Handle(bufnr(''), json_encode( + \ { + \ "results": [ + \ { + \ "rule_id": "AVD-AWS-0057", + \ "long_id": "aws-iam-no-policy-wildcards", + \ "rule_description": "IAM policy should avoid use of wildcards and instead apply the principle of least privilege", + \ "rule_provider": "aws", + \ "rule_service": "iam", + \ "impact": "Overly permissive policies may grant access to sensitive resources", + \ "resolution": "Specify the exact permissions required, and to which resources they should apply instead of using wildcards.", + \ "links": [ + \ "https://aquasecurity.github.io/tfsec/v1.28.0/checks/aws/iam/no-policy-wildcards/", + \ "https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document" + \ ], + \ "description": "IAM policy document uses sensitive action 'iam:PassRole' on wildcarded resource '*'", + \ "severity": "HIGH", + \ "warning": v:false, + \ "status": 0, + \ "resource": "data.aws_iam_policy_document.default", + \ "location": { + \ "filename": "/test/main.tf", + \ "start_line": 10, + \ "end_line": 12 + \ } + \ } + \ ] + \ } + \)) diff --git a/vim-config/plugins/ale/test/handler/test_tslint_handler.vader b/vim-config/plugins/ale/test/handler/test_tslint_handler.vader index 32036edf..3653e776 100644 --- a/vim-config/plugins/ale/test/handler/test_tslint_handler.vader +++ b/vim-config/plugins/ale/test/handler/test_tslint_handler.vader @@ -285,7 +285,7 @@ Execute(The tslint handler should not report no-implicit-dependencies errors): \ }])]) Execute(The tslint handler should set filename keys for temporary files): - " The temporay filename below is hacked into being a relative path so we can + " The temporary filename below is hacked into being a relative path so we can " test that we resolve the temporary filename first. let b:relative_to_root = substitute(expand('%:p'), '\v[^/\\]*([/\\])[^/\\]*', '../', 'g') let b:tempname_suffix = substitute(tempname(), '^\v([A-Z]:)?[/\\]', '', '') diff --git a/vim-config/plugins/ale/test/handler/test_unimport_handler.vader b/vim-config/plugins/ale/test/handler/test_unimport_handler.vader new file mode 100644 index 00000000..5acdcbb9 --- /dev/null +++ b/vim-config/plugins/ale/test/handler/test_unimport_handler.vader @@ -0,0 +1,18 @@ +Before: + runtime ale_linters/python/unimport.vim + +After: + call ale#linter#Reset() + +Execute(The unimport handler should handle import warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 9, + \ 'type': 'W', + \ 'text': 'unused: urllib.parse', + \ }, + \ ], + \ ale_linters#python#unimport#Handle(1, [ + \ 'urllib.parse at path/to/file.py:9', + \ ]) diff --git a/vim-config/plugins/ale/test/linter/test_alex.vader b/vim-config/plugins/ale/test/linter/test_alex.vader index 20e20301..08a0ee10 100644 --- a/vim-config/plugins/ale/test/linter/test_alex.vader +++ b/vim-config/plugins/ale/test/linter/test_alex.vader @@ -7,14 +7,14 @@ After: Execute(The global executable should be used when the local one cannot be found): AssertLinter 'alex', - \ ale#Escape('alex') . ' %s --text', + \ ale#Escape('alex') . ' --stdin --text', Execute(Should use the node_modules/.bin executable, if available): call ale#test#SetFilename('../test-files/alex/node-modules/test_file.tex') AssertLinter ale#path#Simplify(g:dir . '/../test-files/alex/node-modules/node_modules/.bin/alex'), \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/alex/node-modules/node_modules/.bin/alex')) - \ . ' %s --text', + \ . ' --stdin --text', Execute(Should use the node_modules/alex executable, if available): call ale#test#SetFilename('../test-files/alex/node-modules-2/test_file.tex') @@ -22,7 +22,7 @@ Execute(Should use the node_modules/alex executable, if available): AssertLinter ale#path#Simplify(g:dir . '/../test-files/alex/node-modules-2/node_modules/alex/cli.js'), \ (has('win32') ? 'node.exe ' : '') \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/alex/node-modules-2/node_modules/alex/cli.js')) - \ . ' %s --text', + \ . ' --stdin --text', Execute(Should let users configure a global executable and override local paths): call ale#test#SetFilename('../test-files/write-good/node-modules-2/test_file.tex') @@ -31,4 +31,4 @@ Execute(Should let users configure a global executable and override local paths) let g:ale_alex_use_global = 1 AssertLinter '/path/to/custom/alex', - \ ale#Escape('/path/to/custom/alex') . ' %s --text' + \ ale#Escape('/path/to/custom/alex') . ' --stdin --text' diff --git a/vim-config/plugins/ale/test/linter/test_angular.vader b/vim-config/plugins/ale/test/linter/test_angular.vader index fe0749a1..2e407a00 100644 --- a/vim-config/plugins/ale/test/linter/test_angular.vader +++ b/vim-config/plugins/ale/test/linter/test_angular.vader @@ -22,23 +22,7 @@ Execute(The default command for Angular should be correct): AssertLSPLanguage 'html' AssertLSPProject ale#test#GetFilename('../test-files/angular') - AssertLinter g:paths.ngserver, ale#Escape(g:paths.ngserver) - \ . ' --ngProbeLocations ' . ale#Escape(g:paths.service) - \ . ' --tsProbeLocations ' . ale#Escape(g:paths.typescript) - \ . ' --stdio' - -Execute(It should be possible to use the global ngserver): - let b:ale_html_angular_use_global = 1 - - call ale#test#SetFilename('../test-files/angular/test.html') - let g:paths = { - \ 'service': ale#test#GetFilename('../test-files/angular/node_modules/@angular/language-service'), - \ 'typescript': ale#test#GetFilename('../test-files/angular/node_modules/typescript'), - \} - - AssertLSPLanguage 'html' - AssertLSPProject ale#test#GetFilename('../test-files/angular') - AssertLinter 'ngserver', ale#Escape('ngserver') + AssertLinter 'node', ale#Escape('node') . ' ' . ale#Escape(g:paths.ngserver) \ . ' --ngProbeLocations ' . ale#Escape(g:paths.service) \ . ' --tsProbeLocations ' . ale#Escape(g:paths.typescript) \ . ' --stdio' diff --git a/vim-config/plugins/ale/test/linter/test_ansible_language_server.vader b/vim-config/plugins/ale/test/linter/test_ansible_language_server.vader new file mode 100644 index 00000000..3766972e --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_ansible_language_server.vader @@ -0,0 +1,18 @@ +Before: + call ale#assert#SetUpLinterTest('ansible', 'ansible_language_server') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The ansible language server command callback should return default string): + AssertLinter 'ansible-language-server', ale#Escape('ansible-language-server') . ' --stdio' + +Execute(The ansible language server executable should be configurable): + let g:ale_ansible_language_server_executable = '~/.local/bin/als' + + AssertLinter '~/.local/bin/als' , ale#Escape('~/.local/bin/als') . ' --stdio' + +Execute(Should accept configuration settings): + AssertLSPConfig {} + let b:ale_ansible_language_server_config = {'ansible-language-server': {'ansible': {'completion': {'provideRedirectModules': v:false}}}} + AssertLSPConfig {'ansible-language-server': {'ansible': {'completion': {'provideRedirectModules': v:false}}}} diff --git a/vim-config/plugins/ale/test/linter/test_ansible_lint.vader b/vim-config/plugins/ale/test/linter/test_ansible_lint.vader index 6fb8acb5..3191fa7b 100644 --- a/vim-config/plugins/ale/test/linter/test_ansible_lint.vader +++ b/vim-config/plugins/ale/test/linter/test_ansible_lint.vader @@ -15,6 +15,10 @@ Execute(The ansible_lint version >=5.0.0 command callback should return default GivenCommandOutput ['v5.1.2'] AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --nocolor --parseable-severity -x yaml %s' +Execute(The ansible_lint version >=6.0.0 command callback should return default string): + GivenCommandOutput ['v6.0.2'] + AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --nocolor -f json -x yaml %s' + Execute(The ansible_lint executable should be configurable): let g:ale_ansible_ansible_lint_executable = '~/.local/bin/ansible-lint' GivenCommandOutput ['v4.1.2'] diff --git a/vim-config/plugins/ale/test/linter/test_avra_avra.vader b/vim-config/plugins/ale/test/linter/test_avra_avra.vader new file mode 100644 index 00000000..04722d68 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_avra_avra.vader @@ -0,0 +1,29 @@ +Before: + call ale#assert#SetUpLinterTest('avra', 'avra') + + let b:command_tail = ' %t -o ' . g:ale#util#nul_file + let b:command_tail_opt = ' %t --max_errors 20 -o ' . g:ale#util#nul_file + +After: + unlet! b:command_tail + unlet! b:command_tail_opt + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'avra', ale#Escape('avra') . b:command_tail, + + let b:ale_avra_avra_executable = '~/avra' + + AssertLinter '~/avra', ale#Escape('~/avra') . b:command_tail + +Execute(The options should be configurable): + let b:ale_avra_avra_options = '--max_errors 20' + + AssertLinter 'avra', ale#Escape('avra') + \ . ' %t --max_errors 20 -o ' . g:ale#util#nul_file + +Execute(The options should be used in command): + let b:ale_avra_avra_options = '--max_errors 20' + + AssertLinter 'avra', ale#Escape('avra') . b:command_tail_opt diff --git a/vim-config/plugins/ale/test/linter/test_bicep_bicep.vader b/vim-config/plugins/ale/test/linter/test_bicep_bicep.vader new file mode 100644 index 00000000..a4057a72 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_bicep_bicep.vader @@ -0,0 +1,21 @@ +Before: + call ale#assert#SetUpLinterTest('bicep', 'bicep') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + if has('win32') + AssertLinter 'bicep', ale#Escape('bicep') . ' build --outfile NUL %s' + else + AssertLinter 'bicep', ale#Escape('bicep') . ' build --outfile /dev/null %s' + endif + +Execute(The executable should be configurable): + let g:ale_bicep_bicep_executable = 'foobar' + + if has('win32') + AssertLinter 'foobar', ale#Escape('foobar') . ' build --outfile NUL %s' + else + AssertLinter 'foobar', ale#Escape('foobar') . ' build --outfile /dev/null %s' + endif diff --git a/vim-config/plugins/ale/test/linter/test_bitbake.vader b/vim-config/plugins/ale/test/linter/test_bitbake.vader new file mode 100755 index 00000000..ba502aa0 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_bitbake.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('bitbake', 'oelint_adv') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'oelint-adv', ale#Escape('oelint-adv') . ' --quiet %s' + +Execute(The executable should be configurable): + let b:ale_bitbake_oelint_adv_executable = 'xyz' + + AssertLinter 'xyz', ale#Escape('xyz') . ' --quiet %s' diff --git a/vim-config/plugins/ale/test/linter/test_buf_lint.vader b/vim-config/plugins/ale/test/linter/test_buf_lint.vader new file mode 100644 index 00000000..2f065adc --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_buf_lint.vader @@ -0,0 +1,32 @@ +Before: + call ale#assert#SetUpLinterTest('proto', 'buf_lint') + call ale#test#SetFilename('test.proto') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'buf', + \ ale#Escape('buf') + \ . ' lint' + \ . ' %s#include_package_files=true' + +Execute(The callback should include any additional config): + let b:ale_proto_buf_lint_executable = '/tmp/buf' + let b:ale_proto_buf_lint_config = '/tmp/buf.yaml' + + AssertLinter '/tmp/buf', + \ ale#Escape('/tmp/buf') + \ . ' lint' + \ . ' --config=' . ale#Escape('/tmp/buf.yaml') + \ . ' %s#include_package_files=true' + +Execute(The callback should include additional options): + let b:ale_proto_buf_lint_executable = '/tmp/buf' + let b:ale_proto_buf_lint_options = '--disable-symlinks' + + AssertLinter '/tmp/buf', + \ ale#Escape('/tmp/buf') + \ . ' lint' + \ . ' --disable-symlinks' + \ . ' %s#include_package_files=true' diff --git a/vim-config/plugins/ale/test/linter/test_c_cc.vader b/vim-config/plugins/ale/test/linter/test_c_cc.vader index c8c2de7d..ce4bd162 100644 --- a/vim-config/plugins/ale/test/linter/test_c_cc.vader +++ b/vim-config/plugins/ale/test/linter/test_c_cc.vader @@ -53,3 +53,42 @@ Execute(The -std flag should be replaced by parsed C flags): let g:get_cflags_return_value = '-std=c99' AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + +Execute(gcc should not use -x c-header with header files by default): + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/test.h') + + AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + +Execute(clang should use -x c-header with header files by default): + let g:executable_map = {'clang': 1} + let b:command_tail = substitute(b:command_tail, '-x c', '-x c-header', '') + + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/test.h') + + AssertLinter 'clang', ale#Escape('clang') . b:command_tail + +Execute(gcc should use -x c-header with header files if configured to do so): + let b:ale_c_cc_use_header_lang_flag = 1 + let b:command_tail = substitute(b:command_tail, '-x c', '-x c-header', '') + + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/test.h') + + AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + +Execute(clang should not use -x c-header with header files if configured to do so): + let g:executable_map = {'clang': 1} + let b:ale_c_cc_use_header_lang_flag = 0 + + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/test.h') + + AssertLinter 'clang', ale#Escape('clang') . b:command_tail + +Execute(The header file extensions should be configurable): + let g:executable_map = {'clang': 1} + let b:command_tail = substitute(b:command_tail, '-x c', '-x c-header', '') + + call ale#assert#SetUpLinterTest('c', 'cc') + let b:ale_c_cc_header_exts = ['json'] + call ale#test#SetFilename('../test-files/c/json_project/build/compile_commands.json') + + AssertLinter 'clang', ale#Escape('clang') . b:command_tail diff --git a/vim-config/plugins/ale/test/linter/test_c_cppcheck.vader b/vim-config/plugins/ale/test/linter/test_c_cppcheck.vader index c84053f8..0cc3a5d3 100644 --- a/vim-config/plugins/ale/test/linter/test_c_cppcheck.vader +++ b/vim-config/plugins/ale/test/linter/test_c_cppcheck.vader @@ -3,6 +3,7 @@ Before: let b:command_tail = ' -q --language=c --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') . ' --enable=style -I' . ale#Escape(ale#path#Simplify(g:dir)) .' %t' After: + unlet! b:rel_file_path unlet! b:command_tail call ale#assert#TearDownLinterTest() @@ -15,27 +16,31 @@ Execute(The executable should be configurable): AssertLinter 'foobar', ale#Escape('foobar') . b:command_tail Execute(cppcheck for C should detect compile_commands.json files): - call ale#test#SetFilename('../test-files/cppcheck/one/foo.c') + let b:rel_file_path = '../test-files/cppcheck/one/foo.c' + call ale#test#SetFilename(b:rel_file_path) AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/cppcheck/one') AssertLinter 'cppcheck', ale#Escape('cppcheck') \ . ' -q --language=c' \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') \ . ' --project=' . ale#Escape('compile_commands.json') + \ . ' --file-filter=' . ale#Escape(ale#test#GetFilename(b:rel_file_path)) \ . ' --enable=style %t' Execute(cppcheck for C should detect compile_commands.json files in build directories): - call ale#test#SetFilename('../test-files/cppcheck/with_build_dir/foo.cpp') + let b:rel_file_path = '../test-files/cppcheck/with_build_dir/foo.c' + call ale#test#SetFilename(b:rel_file_path) AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/cppcheck/with_build_dir') AssertLinter 'cppcheck', ale#Escape('cppcheck') \ . ' -q --language=c' \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') \ . ' --project=' . ale#Escape(ale#path#Simplify('build/compile_commands.json')) + \ . ' --file-filter=' . ale#Escape(ale#test#GetFilename(b:rel_file_path)) \ . ' --enable=style %t' Execute(cppcheck for C should include file dir if compile_commands.json file is not found): - call ale#test#SetFilename('../test-files/cppcheck/foo.cpp') + call ale#test#SetFilename('../test-files/cppcheck/foo.c') AssertLinter 'cppcheck', \ ale#Escape('cppcheck') @@ -44,3 +49,15 @@ Execute(cppcheck for C should include file dir if compile_commands.json file is \ . ' --enable=style' \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/cppcheck')) \ . ' %t' + +Execute(cppcheck for C header should include file dir and not use compile_commands.json): + call ale#test#SetFilename('../test-files/cppcheck/one/foo.h') + + AssertLinter 'cppcheck', + \ ale#Escape('cppcheck') + \ . ' -q --language=c' + \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/cppcheck/one')) + \ . ' --suppress=unusedStructMember' + \ . ' --enable=style' + \ . ' %t' diff --git a/vim-config/plugins/ale/test/linter/test_c_flawfinder.vader b/vim-config/plugins/ale/test/linter/test_c_flawfinder.vader index 38385e2b..6ef2a40d 100644 --- a/vim-config/plugins/ale/test/linter/test_c_flawfinder.vader +++ b/vim-config/plugins/ale/test/linter/test_c_flawfinder.vader @@ -18,7 +18,7 @@ Execute(Additional flawfinder options should be configurable): AssertLinter 'flawfinder', \ ale#Escape('flawfinder') . ' -CDQS --foobar --minlevel=1 %t' -Execute(The flawfinder exectable should be configurable): +Execute(The flawfinder executable should be configurable): let b:ale_c_flawfinder_executable = 'foo/bar' AssertLinter 'foo/bar', ale#Escape('foo/bar') . ' -CDQS --minlevel=1 %t' diff --git a/vim-config/plugins/ale/test/linter/test_checkmake.vader b/vim-config/plugins/ale/test/linter/test_checkmake.vader new file mode 100644 index 00000000..ec8a4b83 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_checkmake.vader @@ -0,0 +1,39 @@ +Before: + Save g:ale_make_checkmake_config + + let g:ale_make_checkmake_config = '' + + call ale#assert#SetUpLinterTest('make', 'checkmake') + + " NOTE: the format string must be manually matched that set in the plugin + let b:format = '"{{.LineNumber}}:{{.Rule}}:{{.Violation}}{{\"\r\n\"}}"' + +After: + Restore + + unlet! b:command_tail + unlet! b:ale_make_checkmake_config + + call ale#assert#TearDownLinterTest() + +Execute(checkmake should run with default format option): + let b:command_tail = ' --format=' . b:format . ' %s' + + AssertLinter 'checkmake', 'checkmake' . b:command_tail + +Execute(checkmake command should take the config option if it is non-empty): + let g:ale_make_checkmake_config = '/path to/checkmake.ini' + let b:command_tail = ' --format=' . b:format + \ . ' --config="' . g:ale_make_checkmake_config . '"' + \ . ' %s' + + AssertLinter 'checkmake', 'checkmake' . b:command_tail + +Execute(the local buffer config option takes precedence over global option): + let g:ale_make_checkmake_config = '/path/to/checkmake.ini' + let b:ale_make_checkmake_config = '/another/checkmake.ini' + let b:command_tail = ' --format=' . b:format + \ . ' --config="' . b:ale_make_checkmake_config . '"' + \ . ' %s' + + AssertLinter 'checkmake', 'checkmake' . b:command_tail diff --git a/vim-config/plugins/ale/test/linter/test_checkov.vader b/vim-config/plugins/ale/test/linter/test_checkov.vader new file mode 100644 index 00000000..f93d34f3 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_checkov.vader @@ -0,0 +1,14 @@ +Before: + call ale#assert#SetUpLinterTest('terraform', 'checkov') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be direct): + AssertLinter 'checkov', + \ ale#Escape('checkov') . ' -f %t -o json --quiet ' + +Execute(It should be possible to override the default command): + let b:ale_terraform_checkov_executable = '/bin/other/checkov' + AssertLinter '/bin/other/checkov', + \ ale#Escape('/bin/other/checkov') . ' -f %t -o json --quiet ' diff --git a/vim-config/plugins/ale/test/linter/test_clj_kondo.vader b/vim-config/plugins/ale/test/linter/test_clj_kondo.vader index 869f9f2a..e62211c4 100644 --- a/vim-config/plugins/ale/test/linter/test_clj_kondo.vader +++ b/vim-config/plugins/ale/test/linter/test_clj_kondo.vader @@ -6,10 +6,10 @@ After: Execute(The default command should be correct): AssertLinter 'clj-kondo', 'clj-kondo' - \ . ' --cache --lint %t' + \ . ' --cache --lint - --filename %s' Execute(Extra options should be supported): let g:ale_clojure_clj_kondo_options = '--config ./clj-kondo/config.edn' AssertLinter 'clj-kondo', 'clj-kondo' - \ . ' --config ./clj-kondo/config.edn --lint %t' + \ . ' --config ./clj-kondo/config.edn --lint - --filename %s' diff --git a/vim-config/plugins/ale/test/linter/test_cmake_cmake_lint.vader b/vim-config/plugins/ale/test/linter/test_cmake_cmake_lint.vader new file mode 100644 index 00000000..6cf09149 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_cmake_cmake_lint.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('cmake', 'cmake_lint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'cmake-lint', ale#Escape('cmake-lint') . ' %t' + +Execute(The executable should be configurable): + let g:ale_cmake_cmake_lint_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' %t' diff --git a/vim-config/plugins/ale/test/linter/test_cpp_cc.vader b/vim-config/plugins/ale/test/linter/test_cpp_cc.vader index dec3a07c..e6794c09 100644 --- a/vim-config/plugins/ale/test/linter/test_cpp_cc.vader +++ b/vim-config/plugins/ale/test/linter/test_cpp_cc.vader @@ -53,3 +53,42 @@ Execute(The -std flag should be replaced by parsed C flags): let g:get_cflags_return_value = '-std=c++11' AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + +Execute(gcc should not use -x c++-header with header files by default): + call ale#test#SetFilename('../test-files/c/hpp_file_project/test.hpp') + + AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + +Execute(clang++ should use -x c++-header with header files by default): + let g:executable_map = {'clang++': 1} + let b:command_tail = substitute(b:command_tail, '-x c++', '-x c++-header', '') + + call ale#test#SetFilename('../test-files/c/hpp_file_project/test.hpp') + + AssertLinter 'clang++', ale#Escape('clang++') . b:command_tail + +Execute(gcc should use -x c-header with header files if configured to do so): + let b:ale_cpp_cc_use_header_lang_flag = 1 + let b:command_tail = substitute(b:command_tail, '-x c++', '-x c++-header', '') + + call ale#test#SetFilename('../test-files/c/hpp_file_project/test.hpp') + + AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + +Execute(clang should not use -x c-header with header files if configured to do so): + let g:executable_map = {'clang++': 1} + let b:ale_cpp_cc_use_header_lang_flag = 0 + + call ale#test#SetFilename('../test-files/c/hpp_file_project/test.hpp') + + AssertLinter 'clang++', ale#Escape('clang++') . b:command_tail + +Execute(The header file extensions should be configurable): + let g:executable_map = {'clang++': 1} + let b:command_tail = substitute(b:command_tail, '-x c++', '-x c++-header', '') + + call ale#assert#SetUpLinterTest('cpp', 'cc') + let b:ale_cpp_cc_header_exts = ['json'] + call ale#test#SetFilename('../test-files/c/json_project/build/compile_commands.json') + + AssertLinter 'clang++', ale#Escape('clang++') . b:command_tail diff --git a/vim-config/plugins/ale/test/linter/test_cpp_cppcheck.vader b/vim-config/plugins/ale/test/linter/test_cpp_cppcheck.vader index 62195803..880bcb41 100644 --- a/vim-config/plugins/ale/test/linter/test_cpp_cppcheck.vader +++ b/vim-config/plugins/ale/test/linter/test_cpp_cppcheck.vader @@ -5,10 +5,11 @@ Before: After: " Remove a test file we might open for some tests. if &buftype != 'nofile' - :q! + set nomodified set buftype=nofile endif + unlet! b:rel_file_path unlet! b:command_tail call ale#assert#TearDownLinterTest() @@ -21,23 +22,27 @@ Execute(The executable should be configurable): AssertLinter 'foobar', ale#Escape('foobar') . b:command_tail Execute(cppcheck for C++ should detect compile_commands.json files): - call ale#test#SetFilename('../test-files/cppcheck/one/foo.cpp') + let b:rel_file_path = '../test-files/cppcheck/one/foo.cpp' + call ale#test#SetFilename(b:rel_file_path) AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/cppcheck/one') AssertLinter 'cppcheck', ale#Escape('cppcheck') \ . ' -q --language=c++' \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') \ . ' --project=' . ale#Escape('compile_commands.json') + \ . ' --file-filter=' . ale#Escape(ale#test#GetFilename(b:rel_file_path)) \ . ' --enable=style %t' Execute(cppcheck for C++ should detect compile_commands.json files in build directories): - call ale#test#SetFilename('../test-files/cppcheck/with_build_dir/foo.cpp') + let b:rel_file_path = '../test-files/cppcheck/with_build_dir/foo.cpp' + call ale#test#SetFilename(b:rel_file_path) AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/cppcheck/with_build_dir') AssertLinter 'cppcheck', ale#Escape('cppcheck') \ . ' -q --language=c++' \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') \ . ' --project=' . ale#Escape(ale#path#Simplify('build/compile_commands.json')) + \ . ' --file-filter=' . ale#Escape(ale#test#GetFilename(b:rel_file_path)) \ . ' --enable=style %t' Execute(cppcheck for C++ should include file dir if compile_commands.json file is not found): @@ -51,6 +56,18 @@ Execute(cppcheck for C++ should include file dir if compile_commands.json file i \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/cppcheck')) \ . ' %t' +Execute(cppcheck for C++ header should include file dir and not use compile_commands.json): + call ale#test#SetFilename('../test-files/cppcheck/one/foo.hpp') + + AssertLinter 'cppcheck', + \ ale#Escape('cppcheck') + \ . ' -q --language=c++' + \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/cppcheck/one')) + \ . ' --suppress=unusedStructMember' + \ . ' --enable=style' + \ . ' %t' + Execute(cppcheck for C++ should ignore compile_commands.json file if buffer is modified): call ale#test#SetFilename('../test-files/cppcheck/one/foo.cpp') diff --git a/vim-config/plugins/ale/test/linter/test_cpp_flawfinder.vader b/vim-config/plugins/ale/test/linter/test_cpp_flawfinder.vader index 3f4067ea..69369536 100644 --- a/vim-config/plugins/ale/test/linter/test_cpp_flawfinder.vader +++ b/vim-config/plugins/ale/test/linter/test_cpp_flawfinder.vader @@ -20,7 +20,7 @@ Execute(Additional flawfinder options should be configurable): AssertLinter 'flawfinder', \ ale#Escape('flawfinder') . ' -CDQS --foobar --minlevel=1 %t' -Execute(The flawfinder exectable should be configurable): +Execute(The flawfinder executable should be configurable): let b:ale_cpp_flawfinder_executable = 'foo/bar' AssertLinter 'foo/bar', ale#Escape('foo/bar') . ' -CDQS --minlevel=1 %t' diff --git a/vim-config/plugins/ale/test/linter/test_cs_csc.vader b/vim-config/plugins/ale/test/linter/test_cs_csc.vader index 28d0304a..c01de7fd 100644 --- a/vim-config/plugins/ale/test/linter/test_cs_csc.vader +++ b/vim-config/plugins/ale/test/linter/test_cs_csc.vader @@ -13,13 +13,13 @@ Execute(The options should be be used in the command): AssertLinter 'csc', 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs') -Execute(The souce path should be be used in the command): +Execute(The source path should be be used in the command): let g:ale_cs_csc_source = '../foo/bar' AssertLinterCwd '../foo/bar' AssertLinter 'csc', 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs') -Execute(The list of search pathes for assemblies should be be used in the command if not empty): +Execute(The list of search paths for assemblies should be be used in the command if not empty): let g:ale_cs_csc_assembly_path = ['/usr/lib/mono', '../foo/bar'] AssertLinter 'csc', 'csc /unsafe' diff --git a/vim-config/plugins/ale/test/linter/test_cs_mcsc.vader b/vim-config/plugins/ale/test/linter/test_cs_mcsc.vader index e784cf15..8634a5f0 100644 --- a/vim-config/plugins/ale/test/linter/test_cs_mcsc.vader +++ b/vim-config/plugins/ale/test/linter/test_cs_mcsc.vader @@ -13,13 +13,13 @@ Execute(The options should be be used in the command): AssertLinter 'mcs', 'mcs -unsafe -pkg:dotnet -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') -Execute(The souce path should be be used in the command): +Execute(The source path should be be used in the command): let g:ale_cs_mcsc_source = '../foo/bar' AssertLinterCwd '../foo/bar' AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') -Execute(The list of search pathes for assemblies should be be used in the command if not empty): +Execute(The list of search paths for assemblies should be be used in the command if not empty): let g:ale_cs_mcsc_assembly_path = ['/usr/lib/mono', '../foo/bar'] AssertLinter 'mcs', 'mcs -unsafe' diff --git a/vim-config/plugins/ale/test/linter/test_cspell.vader b/vim-config/plugins/ale/test/linter/test_cspell.vader new file mode 100644 index 00000000..0302edc5 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_cspell.vader @@ -0,0 +1,71 @@ +Before: + call ale#assert#SetUpLinterTest('tex', 'cspell') + + " We have to manually do our own variable reset because SetUpLinterTest calls + " ale#assert#ResetVariables, which specifically only resets variables that + " begin with ale__, per https://github.com/dense-analysis/ale/blob/76c2293e68a6cad3b192062743d25b8daa082205/autoload/ale/assert.vim#L256 + " + " Took a lot of debugging and reading both junegunn/vader.vim and most ALE + " files to find this behavior + + Save g:ale_cspell_executable + Save g:ale_cspell_use_global + Save g:ale_cspell_options + + unlet! g:ale_cspell_executable + unlet! g:ale_cspell_use_global + unlet! g:ale_cspell_options + + let g:ale_cspell_executable = 'cspell' + let g:ale_cspell_use_global = 0 + let g:ale_cspell_options = '' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The global executable should be used when the local one cannot be found): + AssertLinter + \ 'cspell', + \ ale#Escape('cspell') + \ . ' lint --no-color --no-progress --no-summary -- stdin' + +Execute(Should use the node_modules/.bin executable if available): + call ale#test#SetFilename('../test-files/cspell/node-modules/test.tex') + + AssertLinter + \ ale#path#Simplify(g:dir + \ . '/../test-files/cspell/node-modules/node_modules/.bin/cspell'), + \ ale#Escape(ale#path#Simplify(g:dir + \ . '/../test-files/cspell/node-modules/node_modules/.bin/cspell')) + \ . ' lint --no-color --no-progress --no-summary -- stdin' + +Execute(Should use the node_modules/cspell executable if available): + call ale#test#SetFilename('../test-files/cspell/node-modules-2/test.tex') + + AssertLinter + \ ale#path#Simplify(g:dir + \ . '/../test-files/cspell/node-modules-2/node_modules/cspell/bin.js'), + \ (has('win32') ? 'node.exe ': '') + \ . ale#Escape(ale#path#Simplify(g:dir + \ . '/../test-files/cspell/node-modules-2/node_modules/cspell/bin.js')) + \ . ' lint --no-color --no-progress --no-summary -- stdin' + +Execute(Should let users configure a global executable and override local paths): + let g:ale_cspell_executable = '/path/to/custom/cspell' + let g:ale_cspell_use_global = 1 + + AssertLinter + \ '/path/to/custom/cspell', + \ ale#Escape('/path/to/custom/cspell') + \ . ' lint --no-color --no-progress --no-summary -- stdin' + +Execute(Additional cspell options should be configurable): + call ale#test#SetFilename('../test-files/dummy') + + let g:ale_cspell_options = '--foobar' + + AssertLinter + \ 'cspell', + \ ale#Escape('cspell') + \ . ' lint --no-color --no-progress --no-summary --foobar -- stdin' + diff --git a/vim-config/plugins/ale/test/linter/test_dartanalyzer.vader b/vim-config/plugins/ale/test/linter/test_dartanalyzer.vader deleted file mode 100644 index 7275b187..00000000 --- a/vim-config/plugins/ale/test/linter/test_dartanalyzer.vader +++ /dev/null @@ -1,20 +0,0 @@ -Before: - call ale#assert#SetUpLinterTest('dart', 'dartanalyzer') - -After: - call ale#assert#TearDownLinterTest() - -Execute(The default command and executable should be correct): - AssertLinter 'dartanalyzer', ale#Escape('dartanalyzer') . ' %s' - -Execute(The executable should be configurable): - let g:ale_dart_dartanalyzer_executable = 'foobar' - - AssertLinter 'foobar', ale#Escape('foobar') . ' %s' - -Execute(The .packages file should be set if detected): - call ale#test#SetFilename('../test-files/dart/foo') - - AssertLinter 'dartanalyzer', ale#Escape('dartanalyzer') - \ . ' --packages ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/dart/.packages')) - \ . ' %s' diff --git a/vim-config/plugins/ale/test/linter/test_embertemplatelint.vader b/vim-config/plugins/ale/test/linter/test_embertemplatelint.vader index 97687d29..7cba83e2 100644 --- a/vim-config/plugins/ale/test/linter/test_embertemplatelint.vader +++ b/vim-config/plugins/ale/test/linter/test_embertemplatelint.vader @@ -1,17 +1,23 @@ Before: call ale#assert#SetUpLinterTest('handlebars', 'embertemplatelint') - GivenCommandOutput ['1.6.0'] - After: call ale#assert#TearDownLinterTest() -Execute(ember-template-lint executables runs the right command): +Execute(Runs the right command for ember-template-lint >= 4.x): + GivenCommandOutput ['4.0.0'] + AssertLinter 'ember-template-lint', + \ ale#Escape('ember-template-lint') . ' --format=json --filename %s' + +Execute(Runs the right command for ember-template-lint >= 1.6, < 4.x): + GivenCommandOutput ['1.6.0'] + + AssertLinter 'ember-template-lint', \ ale#Escape('ember-template-lint') . ' --json --filename %s' -Execute(old ember-template-lint executables runs the right command): - GivenCommandOutput [] +Execute(Runs the right command for ember-template-lint < 1.6): + GivenCommandOutput ['1.5.0'] AssertLinter 'ember-template-lint', \ ale#Escape('ember-template-lint') . ' --json %t' diff --git a/vim-config/plugins/ale/test/linter/test_erlang_erlang_ls.vader b/vim-config/plugins/ale/test/linter/test_erlang_erlang_ls.vader new file mode 100644 index 00000000..3870b5c4 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_erlang_erlang_ls.vader @@ -0,0 +1,48 @@ +Before: + let b:files = '../test-files/erlang' + call ale#assert#SetUpLinterTest('erlang', 'erlang_ls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'erlang_ls', + \ ale#Escape('erlang_ls') . ' --log-level=' . ale#Escape('info') + +Execute(Executable should be configurable): + let b:ale_erlang_erlang_ls_executable = '/path/to/erlang_ls' + + AssertLinter '/path/to/erlang_ls', + \ ale#Escape('/path/to/erlang_ls') . ' --log-level=' . ale#Escape('info') + +Execute(Log level should be configurable): + let b:ale_erlang_erlang_ls_log_level = 'debug' + + AssertLinter 'erlang_ls', + \ ale#Escape('erlang_ls') . ' --log-level=' . ale#Escape('debug') + +Execute(Log directory should be configurable): + let b:ale_erlang_erlang_ls_log_dir = '/path/to/logs' + + AssertLinter 'erlang_ls', + \ ale#Escape('erlang_ls') + \ . ' --log-dir=' . ale#Escape('/path/to/logs') + \ . ' --log-level=' . ale#Escape('info') + +Execute(Project root should be detected using erlang_ls.config): + call ale#test#SetFilename(b:files . '/app_with_erlang_ls_config/src/app.erl') + AssertLSPProject ale#test#GetFilename(b:files . '/app_with_erlang_ls_config') + + call ale#test#SetFilename(b:files . '/app_with_erlang_ls_config/_build/default/lib/dep/src/dep.erl') + AssertLSPProject ale#test#GetFilename(b:files . '/app_with_erlang_ls_config') + +Execute(Root of Rebar3 project should be detected): + call ale#test#SetFilename(b:files . '/app/src/app.erl') + AssertLSPProject ale#test#GetFilename(b:files . '/app') + + call ale#test#SetFilename(b:files . '/app/_build/default/lib/dep/src/dep.erl') + AssertLSPProject ale#test#GetFilename(b:files . '/app') + +Execute(Root of kerl managed Erlang/OTP installation should be detected): + call ale#test#SetFilename(b:files . '/kerl_otp_root/lib/stdlib-4.1.1/array.erl') + AssertLSPProject ale#test#GetFilename(b:files . '/kerl_otp_root') diff --git a/vim-config/plugins/ale/test/linter/test_flake8.vader b/vim-config/plugins/ale/test/linter/test_flake8.vader index 0b87c27b..53b40b29 100644 --- a/vim-config/plugins/ale/test/linter/test_flake8.vader +++ b/vim-config/plugins/ale/test/linter/test_flake8.vader @@ -56,7 +56,7 @@ Execute(The option for disabling changing directories should work): \] Execute(The option for changing directory to project root should work): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/namespace_package_tox/namespace/foo/bar.py') + call ale#test#SetFilename('../test-files/python/namespace_package_tox/namespace/foo/bar.py') AssertLinterCwd ale#python#FindProjectRootIni(bufnr('')) call ale#semver#ResetVersionCache() @@ -67,7 +67,7 @@ Execute(The option for changing directory to project root should work): Execute(The option for changing directory to file dir should work): let g:ale_python_flake8_change_directory = 'file' - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/namespace_package_tox/namespace/foo/bar.py') + call ale#test#SetFilename('../test-files/python/namespace_package_tox/namespace/foo/bar.py') AssertLinter 'flake8', [ \ ale#Escape('flake8') . ' --version', @@ -98,6 +98,8 @@ Execute(The flake8 command callback should let you set options): \] Execute(You should be able to set a custom executable and it should be escaped): + call ale#test#SetFilename('../test-files/dummy') + let g:ale_python_flake8_executable = 'executable with spaces' AssertLinterCwd ['%s:h', '%s:h'] @@ -110,7 +112,7 @@ Execute(You should be able to set a custom executable and it should be escaped): \] Execute(The flake8 callbacks should detect virtualenv directories): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') let b:executable = ale#path#Simplify( \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/flake8' @@ -124,35 +126,35 @@ Execute(The flake8 callbacks should detect virtualenv directories): \] Execute(The FindProjectRoot should detect the project root directory for namespace package via Manifest.in): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/namespace_package_manifest/namespace/foo/bar.py') + call ale#test#SetFilename('../test-files/python/namespace_package_manifest/namespace/foo/bar.py') AssertEqual \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_manifest'), \ ale#python#FindProjectRoot(bufnr('')) Execute(The FindProjectRoot should detect the project root directory for namespace package via setup.cf): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/namespace_package_setup/namespace/foo/bar.py') + call ale#test#SetFilename('../test-files/python/namespace_package_setup/namespace/foo/bar.py') AssertEqual \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_setup'), \ ale#python#FindProjectRoot(bufnr('')) Execute(The FindProjectRoot should detect the project root directory for namespace package via pytest.ini): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/namespace_package_pytest/namespace/foo/bar.py') + call ale#test#SetFilename('../test-files/python/namespace_package_pytest/namespace/foo/bar.py') AssertEqual \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_pytest'), \ ale#python#FindProjectRoot(bufnr('')) Execute(The FindProjectRoot should detect the project root directory for namespace package via tox.ini): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/namespace_package_tox/namespace/foo/bar.py') + call ale#test#SetFilename('../test-files/python/namespace_package_tox/namespace/foo/bar.py') AssertEqual \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_tox'), \ ale#python#FindProjectRoot(bufnr('')) Execute(The FindProjectRoot should detect the project root directory for non-namespace package): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/no_virtualenv/subdir/foo/bar.py') + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') AssertEqual \ ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir'), @@ -160,7 +162,7 @@ Execute(The FindProjectRoot should detect the project root directory for non-nam " Some users currently run flake8 this way, so we should support it. Execute(Using `python -m flake8` should be supported for running flake8): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') let g:ale_python_flake8_executable = 'python' let g:ale_python_flake8_options = '-m flake8 --some-option' diff --git a/vim-config/plugins/ale/test/linter/test_flakehell.vader b/vim-config/plugins/ale/test/linter/test_flakehell.vader index fa7cb9e3..98314408 100644 --- a/vim-config/plugins/ale/test/linter/test_flakehell.vader +++ b/vim-config/plugins/ale/test/linter/test_flakehell.vader @@ -48,7 +48,7 @@ Execute(The option for disabling changing directories should work): \] Execute(The option for changing directory to project root should work): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/namespace_package_tox/namespace/foo/bar.py') + call ale#test#SetFilename('../test-files/python/namespace_package_tox/namespace/foo/bar.py') AssertLinterCwd ale#python#FindProjectRootIni(bufnr('')) call ale#semver#ResetVersionCache() @@ -59,7 +59,7 @@ Execute(The option for changing directory to project root should work): Execute(The option for changing directory to file dir should work): let g:ale_python_flakehell_change_directory = 'file' - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/namespace_package_tox/namespace/foo/bar.py') + call ale#test#SetFilename('../test-files/python/namespace_package_tox/namespace/foo/bar.py') AssertLinter 'flakehell', [ \ ale#Escape('flakehell') . ' --version', @@ -84,6 +84,7 @@ Execute(The flakehell command callback should let you set options): Execute(You should be able to set a custom executable and it should be escaped): let g:ale_python_flakehell_executable = 'executable with spaces' + call ale#test#SetFilename('../test-files/dummy') AssertLinterCwd ['%s:h', '%s:h'] call ale#semver#ResetVersionCache() @@ -96,7 +97,7 @@ Execute(You should be able to set a custom executable and it should be escaped): \] Execute(The flakehell callbacks should detect virtualenv directories): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') let b:executable = ale#path#Simplify( \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/flakehell' @@ -111,35 +112,35 @@ Execute(The flakehell callbacks should detect virtualenv directories): \] Execute(The FindProjectRoot should detect the project root directory for namespace package via Manifest.in): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/namespace_package_manifest/namespace/foo/bar.py') + call ale#test#SetFilename('../test-files/python/namespace_package_manifest/namespace/foo/bar.py') AssertEqual \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_manifest'), \ ale#python#FindProjectRoot(bufnr('')) Execute(The FindProjectRoot should detect the project root directory for namespace package via setup.cf): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/namespace_package_setup/namespace/foo/bar.py') + call ale#test#SetFilename('../test-files/python/namespace_package_setup/namespace/foo/bar.py') AssertEqual \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_setup'), \ ale#python#FindProjectRoot(bufnr('')) Execute(The FindProjectRoot should detect the project root directory for namespace package via pytest.ini): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/namespace_package_pytest/namespace/foo/bar.py') + call ale#test#SetFilename('../test-files/python/namespace_package_pytest/namespace/foo/bar.py') AssertEqual \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_pytest'), \ ale#python#FindProjectRoot(bufnr('')) Execute(The FindProjectRoot should detect the project root directory for namespace package via tox.ini): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/namespace_package_tox/namespace/foo/bar.py') + call ale#test#SetFilename('../test-files/python/namespace_package_tox/namespace/foo/bar.py') AssertEqual \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_tox'), \ ale#python#FindProjectRoot(bufnr('')) Execute(The FindProjectRoot should detect the project root directory for non-namespace package): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/no_virtualenv/subdir/foo/bar.py') + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') AssertEqual \ ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir'), @@ -147,7 +148,7 @@ Execute(The FindProjectRoot should detect the project root directory for non-nam " Some users currently run flakehell this way, so we should support it. Execute(Using `python -m flakehell` should be supported for running flakehell): - silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') let g:ale_python_flakehell_executable = 'python' let g:ale_python_flakehell_options = '--some-option' diff --git a/vim-config/plugins/ale/test/linter/test_gawk.vader b/vim-config/plugins/ale/test/linter/test_gawk.vader index ba9f59ab..f4364291 100644 --- a/vim-config/plugins/ale/test/linter/test_gawk.vader +++ b/vim-config/plugins/ale/test/linter/test_gawk.vader @@ -7,19 +7,19 @@ After: Execute(The default command should be correct): AssertLinter 'gawk', \ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }') - \ . ' -f %t --lint /dev/null' + \ . ' --lint -f %t /dev/null' Execute(The executable should be configurable): let b:ale_awk_gawk_executable = '/other/gawk' AssertLinter '/other/gawk', \ ale#Escape('/other/gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }') - \ . ' -f %t --lint /dev/null' + \ . ' --lint -f %t /dev/null' Execute(The options should be configurable): let b:ale_awk_gawk_executable = 'gawk' - let b:ale_awk_gawk_options = '--something' + let b:ale_awk_gawk_options = '--lint=no-ext' AssertLinter 'gawk', \ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }') - \ . ' --something -f %t --lint /dev/null' + \ . ' --lint --lint=no-ext -f %t /dev/null' diff --git a/vim-config/plugins/ale/test/linter/test_haml_hamllint.vader b/vim-config/plugins/ale/test/linter/test_haml_hamllint.vader index 9d81179b..1f5e2fa4 100644 --- a/vim-config/plugins/ale/test/linter/test_haml_hamllint.vader +++ b/vim-config/plugins/ale/test/linter/test_haml_hamllint.vader @@ -38,4 +38,6 @@ Execute(The command should include a .rubocop.yml and a .haml-lint if both are f Execute(The executable can be overridden): let b:ale_haml_hamllint_executable = 'bin/haml-lint' + call ale#test#SetFilename('../test-files/dummy') + AssertLinter 'bin/haml-lint', 'bin/haml-lint %t' diff --git a/vim-config/plugins/ale/test/linter/test_haskell_hie.vader b/vim-config/plugins/ale/test/linter/test_haskell_hie.vader index 5bd2794c..3cababad 100644 --- a/vim-config/plugins/ale/test/linter/test_haskell_hie.vader +++ b/vim-config/plugins/ale/test/linter/test_haskell_hie.vader @@ -17,9 +17,9 @@ Execute(The default executable should be correct): Execute(The project root should be detected correctly): AssertLSPProject g:dir - call ale#test#SetFilename('hie_paths/file.hs') + call ale#test#SetFilename('../test-files/hie_paths/file.hs') - AssertLSPProject ale#path#Simplify(g:dir . '/hie_paths') + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/hie_paths') Execute(The executable should be configurable): let g:ale_haskell_hie_executable = 'foobar' diff --git a/vim-config/plugins/ale/test/linter/test_haskell_hls.vader b/vim-config/plugins/ale/test/linter/test_haskell_hls.vader index e64aab6f..4452d53c 100644 --- a/vim-config/plugins/ale/test/linter/test_haskell_hls.vader +++ b/vim-config/plugins/ale/test/linter/test_haskell_hls.vader @@ -25,3 +25,8 @@ Execute(The executable should be configurable): let g:ale_haskell_hls_executable = 'foobar' AssertLinter 'foobar', ale#Escape('foobar') . ' --lsp' + +Execute(Should accept configuration settings): + AssertLSPConfig {} + let b:ale_haskell_hls_config = {'haskell': {'maxCompletions': 250}} + AssertLSPConfig {'haskell': {'maxCompletions': 250}} diff --git a/vim-config/plugins/ale/test/linter/test_htmlhint.vader b/vim-config/plugins/ale/test/linter/test_htmlhint.vader index df5797af..4475c1a7 100644 --- a/vim-config/plugins/ale/test/linter/test_htmlhint.vader +++ b/vim-config/plugins/ale/test/linter/test_htmlhint.vader @@ -19,7 +19,7 @@ Execute(The default command should be correct): AssertLinter g:node_executable, \ ale#Escape(g:node_executable) . ' --format=unix %t' -Execute(The global executable should be uesd if the option is set): +Execute(The global executable should be used if the option is set): let g:ale_html_htmlhint_executable = 'foo' let g:ale_html_htmlhint_use_global = 1 diff --git a/vim-config/plugins/ale/test/linter/test_less_stylelint.vader b/vim-config/plugins/ale/test/linter/test_less_stylelint.vader index cbe7d23c..c27af79e 100644 --- a/vim-config/plugins/ale/test/linter/test_less_stylelint.vader +++ b/vim-config/plugins/ale/test/linter/test_less_stylelint.vader @@ -26,6 +26,7 @@ Execute(The global override should work): Execute(Extra options should be configurable): let b:ale_less_stylelint_options = '--whatever' + call ale#test#SetFilename('../test-files/dummy') AssertLinter 'stylelint', \ ale#Escape('stylelint') . ' --whatever --stdin-filename %s' diff --git a/vim-config/plugins/ale/test/linter/test_lua_selene.vader b/vim-config/plugins/ale/test/linter/test_lua_selene.vader new file mode 100644 index 00000000..7387bace --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_lua_selene.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('lua', 'selene') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The lua selene command callback should return the correct default string): + AssertLinter 'selene', ale#Escape('selene') . ' --display-style=json -' + +Execute(The lua selene command callback should let you set options): + let g:ale_lua_selene_options = '--num-threads 2' + + AssertLinter 'selene', + \ ale#Escape('selene') . ' --num-threads 2 --display-style=json -' + +Execute(The selene executable should be configurable): + let g:ale_lua_selene_executable = 'selene.sh' + + AssertLinter 'selene.sh', ale#Escape('selene.sh') . ' --display-style=json -' diff --git a/vim-config/plugins/ale/test/linter/test_markdown_markdownlint.vader b/vim-config/plugins/ale/test/linter/test_markdown_markdownlint.vader index 12766cfd..b938ac41 100644 --- a/vim-config/plugins/ale/test/linter/test_markdown_markdownlint.vader +++ b/vim-config/plugins/ale/test/linter/test_markdown_markdownlint.vader @@ -7,6 +7,11 @@ After: Execute(The default command should be correct): AssertLinter 'markdownlint', ale#Escape('markdownlint') . ' %s' +Execute(The executable should be configurable): + let g:ale_markdown_markdownlint_executable = 'foo bar' + + AssertLinter 'foo bar', ale#Escape('foo bar') . ' %s' + Execute(The options should be configurable): let g:ale_markdown_markdownlint_options = '--config ~/custom/.markdownlintrc' diff --git a/vim-config/plugins/ale/test/linter/test_naga.vader b/vim-config/plugins/ale/test/linter/test_naga.vader new file mode 100644 index 00000000..bf91604b --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_naga.vader @@ -0,0 +1,10 @@ +Before: + call ale#assert#SetUpLinterTest('wgsl', 'naga') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The naga command should be customizable): + let g:ale_wgsl_naga_executable = '/path/to/naga' + AssertLinter '/path/to/naga', + \ ale#Escape('/path/to/naga') . ' --stdin-file-path %s' diff --git a/vim-config/plugins/ale/test/linter/test_nix_statix.vader b/vim-config/plugins/ale/test/linter/test_nix_statix.vader new file mode 100644 index 00000000..8ee4c027 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_nix_statix.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('nix', 'statix') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The statix command should be correct): + AssertLinter 'statix', ale#Escape('statix') . ' check -o errfmt --stdin' + +Execute(Additional statix options should be configurable): + let g:ale_nix_statix_check_options = '--foobar' + + AssertLinter 'statix', + \ ale#Escape('statix') . ' check -o errfmt --stdin --foobar' + +Execute(The statix command should be configurable): + let g:ale_nix_statix_check_executable = 'foo/bar' + + AssertLinter 'foo/bar', ale#Escape('foo/bar') . ' check -o errfmt --stdin' diff --git a/vim-config/plugins/ale/test/linter/test_ocaml_ols.vader b/vim-config/plugins/ale/test/linter/test_ocaml_ols.vader index bf9ae65b..ddab9958 100644 --- a/vim-config/plugins/ale/test/linter/test_ocaml_ols.vader +++ b/vim-config/plugins/ale/test/linter/test_ocaml_ols.vader @@ -27,7 +27,7 @@ Execute(The local executable should be used when available): AssertLinter ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server'), \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server')) . ' --stdio' -Execute(The gloabl executable should always be used when use_global is set): +Execute(The global executable should always be used when use_global is set): let g:ale_ocaml_ols_use_global = 1 call ale#test#SetFilename('../test-files/ols/file.ml') @@ -36,5 +36,6 @@ Execute(The gloabl executable should always be used when use_global is set): Execute(The executable should be configurable): let g:ale_ocaml_ols_executable = 'foobar' + call ale#test#SetFilename('../test-files/dummy') AssertLinter 'foobar', ale#Escape('foobar') . ' --stdio' diff --git a/vim-config/plugins/ale/test/linter/test_openscad_sca2d.vader b/vim-config/plugins/ale/test/linter/test_openscad_sca2d.vader new file mode 100644 index 00000000..c2409f55 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_openscad_sca2d.vader @@ -0,0 +1,12 @@ +Before: + call ale#assert#SetUpLinterTest('openscad', 'sca2d') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The options should be used in the command): + AssertLinter 'sca2d', ale#Escape('sca2d') . ' %s' + + let b:ale_openscad_sca2d_options = '--foobar' + + AssertLinter 'sca2d', ale#Escape('sca2d') . ' --foobar %s' diff --git a/vim-config/plugins/ale/test/linter/test_php_langserver.vader b/vim-config/plugins/ale/test/linter/test_php_langserver.vader index 7fe20b82..28741713 100644 --- a/vim-config/plugins/ale/test/linter/test_php_langserver.vader +++ b/vim-config/plugins/ale/test/linter/test_php_langserver.vader @@ -5,6 +5,8 @@ After: call ale#assert#TearDownLinterTest() Execute(The default executable path should be correct): + call ale#test#SetFilename('../test-files/dummy') + AssertLinter 'php-language-server.php', \ 'php ' . ale#Escape('php-language-server.php') diff --git a/vim-config/plugins/ale/test/linter/test_phpactor.vader b/vim-config/plugins/ale/test/linter/test_phpactor.vader new file mode 100644 index 00000000..8968bba1 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_phpactor.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpLinterTest('php', 'phpactor') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'phpactor', + \ ale#Escape('phpactor') . ' language-server' + +Execute(The project path should be correct for .git directories): + call ale#test#SetFilename('../test-files/php/with-git/test.php') + silent! call mkdir('../test-files/php/with-git/.git') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-git') + +Execute(The project path should be correct for composer.json file): + call ale#test#SetFilename('../test-files/php/with-composer/test.php') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-composer') diff --git a/vim-config/plugins/ale/test/linter/test_phpstan.vader b/vim-config/plugins/ale/test/linter/test_phpstan.vader index b5b3d3b7..dbeb1bd1 100644 --- a/vim-config/plugins/ale/test/linter/test_phpstan.vader +++ b/vim-config/plugins/ale/test/linter/test_phpstan.vader @@ -113,3 +113,9 @@ Execute(Autoload parameter is added to the command): AssertLinter 'phpstan', \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -a ' . ale#Escape('autoload.php') . ' -l ' . ale#Escape('4') . ' %s' + +Execute(Memory limit parameter is added to the command): + let g:ale_php_phpstan_memory_limit = '500M' + + AssertLinter 'phpstan', + \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -l ' . ale#Escape('4') . ' --memory-limit ' . ale#Escape('500M') . ' %s' diff --git a/vim-config/plugins/ale/test/linter/test_psalm.vader b/vim-config/plugins/ale/test/linter/test_psalm.vader index 4edb95c8..94e718d4 100644 --- a/vim-config/plugins/ale/test/linter/test_psalm.vader +++ b/vim-config/plugins/ale/test/linter/test_psalm.vader @@ -32,7 +32,13 @@ Execute(Vendor executables should be detected): Execute(User provided options should be used): let g:ale_php_psalm_options = '--my-user-provided-option my-value' + call ale#test#SetFilename('../test-files/dummy') AssertLinter 'psalm', \ ale#Escape('psalm') \ . ' --language-server --my-user-provided-option my-value' + +Execute(The project path should be correct for composer.json file): + call ale#test#SetFilename('../test-files/php/with-composer/test.php') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-composer') diff --git a/vim-config/plugins/ale/test/linter/test_pydocstyle.vader b/vim-config/plugins/ale/test/linter/test_pydocstyle.vader index 24d669c6..fc7fbbf2 100644 --- a/vim-config/plugins/ale/test/linter/test_pydocstyle.vader +++ b/vim-config/plugins/ale/test/linter/test_pydocstyle.vader @@ -1,45 +1,45 @@ Before: call ale#assert#SetUpLinterTest('python', 'pydocstyle') - call ale#test#SetFilename('test.py') + call ale#test#SetFilename('example/test.py') After: call ale#assert#TearDownLinterTest() Execute(The pydocstyle command callback should return default string): AssertLinterCwd '%s:h' - AssertLinter 'pydocstyle', ale#Escape('pydocstyle') . ' %s:t' + AssertLinter 'pydocstyle', ale#Escape('pydocstyle') . ' %s' Execute(The pydocstyle command callback should allow options): let g:ale_python_pydocstyle_options = '--verbose' - AssertLinter 'pydocstyle', ale#Escape('pydocstyle') . ' --verbose %s:t' + AssertLinter 'pydocstyle', ale#Escape('pydocstyle') . ' --verbose %s' Execute(The pydocstyle executable should be configurable): let g:ale_python_pydocstyle_executable = '~/.local/bin/pydocstyle' AssertLinter '~/.local/bin/pydocstyle', - \ ale#Escape('~/.local/bin/pydocstyle') . ' %s:t' + \ ale#Escape('~/.local/bin/pydocstyle') . ' %s' Execute(Setting executable to 'pipenv' appends 'run pydocstyle'): let g:ale_python_pydocstyle_executable = 'path/to/pipenv' AssertLinter 'path/to/pipenv', - \ ale#Escape('path/to/pipenv') . ' run pydocstyle %s:t' + \ ale#Escape('path/to/pipenv') . ' run pydocstyle %s' Execute(Pipenv is detected when python_pydocstyle_auto_pipenv is set): let g:ale_python_pydocstyle_auto_pipenv = 1 call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') - AssertLinter 'pipenv', ale#Escape('pipenv') . ' run pydocstyle %s:t' + AssertLinter 'pipenv', ale#Escape('pipenv') . ' run pydocstyle %s' Execute(Setting executable to 'poetry' appends 'run pydocstyle'): let g:ale_python_pydocstyle_executable = 'path/to/poetry' AssertLinter 'path/to/poetry', - \ ale#Escape('path/to/poetry') . ' run pydocstyle %s:t' + \ ale#Escape('path/to/poetry') . ' run pydocstyle %s' Execute(Poetry is detected when python_pydocstyle_auto_poetry is set): let g:ale_python_pydocstyle_auto_poetry = 1 call ale#test#SetFilename('../test-files/python/poetry/whatever.py') - AssertLinter 'poetry', ale#Escape('poetry') . ' run pydocstyle %s:t' + AssertLinter 'poetry', ale#Escape('poetry') . ' run pydocstyle %s' diff --git a/vim-config/plugins/ale/test/linter/test_pyflakes.vader b/vim-config/plugins/ale/test/linter/test_pyflakes.vader index bd442098..61aee562 100644 --- a/vim-config/plugins/ale/test/linter/test_pyflakes.vader +++ b/vim-config/plugins/ale/test/linter/test_pyflakes.vader @@ -34,6 +34,7 @@ Execute(You should be able to override the pyflakes virtualenv lookup): Execute(Setting executable to 'pipenv' appends 'run pyflakes'): let g:ale_python_pyflakes_executable = 'path/to/pipenv' + call ale#test#SetFilename('../test-files/dummy') AssertLinter 'path/to/pipenv', \ ale#Escape('path/to/pipenv') . ' run pyflakes %t', diff --git a/vim-config/plugins/ale/test/linter/test_pylsp.vader b/vim-config/plugins/ale/test/linter/test_pylsp.vader index acee2c3f..34cc30c6 100644 --- a/vim-config/plugins/ale/test/linter/test_pylsp.vader +++ b/vim-config/plugins/ale/test/linter/test_pylsp.vader @@ -10,6 +10,8 @@ After: call ale#assert#TearDownLinterTest() Execute(The pylsp command callback should return default string): + call ale#test#SetFilename('./foo.py') + AssertLinter 'pylsp', ale#Escape('pylsp') Execute(The pylsp executable should be configurable): @@ -22,6 +24,12 @@ Execute(The pylsp command callback should let you set options): AssertLinter 'pylsp', ale#Escape('pylsp') . ' --some-option' +Execute(The cwd and project root should be detected correctly): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#test#GetFilename('../test-files/python/with_virtualenv/subdir') + AssertLSPProject ale#test#GetFilename('../test-files/python/with_virtualenv/subdir') + Execute(The pylsp executable should be run from the virtualenv path): call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') @@ -41,6 +49,7 @@ Execute(You should be able to override the pylsp virtualenv lookup): Execute(Setting executable to 'pipenv' appends 'run pylsp'): let g:ale_python_pylsp_executable = 'path/to/pipenv' + call ale#test#SetFilename('../test-files/dummy') AssertLinter 'path/to/pipenv', ale#Escape('path/to/pipenv') . ' run pylsp' diff --git a/vim-config/plugins/ale/test/linter/test_pyre.vader b/vim-config/plugins/ale/test/linter/test_pyre.vader index 53f84e6f..053ef12f 100644 --- a/vim-config/plugins/ale/test/linter/test_pyre.vader +++ b/vim-config/plugins/ale/test/linter/test_pyre.vader @@ -8,6 +8,8 @@ After: call ale#assert#TearDownLinterTest() Execute(The pyre command callback should return default string): + call ale#test#SetFilename('./foo.py') + AssertLinter 'pyre', ale#Escape('pyre') . ' persistent' Execute(The pyre executable should be configurable): @@ -34,6 +36,7 @@ Execute(You should be able to override the pyre virtualenv lookup): Execute(Setting executable to 'pipenv' appends 'run pyre'): let g:ale_python_pyre_executable = 'path/to/pipenv' + call ale#test#SetFilename('../test-files/dummy') AssertLinter 'path/to/pipenv', \ ale#Escape('path/to/pipenv') . ' run pyre persistent' diff --git a/vim-config/plugins/ale/test/linter/test_pyright.vader b/vim-config/plugins/ale/test/linter/test_pyright.vader index 51510cf2..14e8c142 100644 --- a/vim-config/plugins/ale/test/linter/test_pyright.vader +++ b/vim-config/plugins/ale/test/linter/test_pyright.vader @@ -10,6 +10,8 @@ After: call ale#assert#TearDownLinterTest() Execute(The command callback should return the correct default string): + call ale#test#SetFilename('./foo.py') + AssertLinter \ 'pyright-langserver', \ ale#Escape('pyright-langserver') . ' --stdio' @@ -30,6 +32,12 @@ Execute(The default configuration should be mostly empty): AssertLSPConfig {'python': {}} +Execute(The cwd and project root should be detected correctly): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#test#GetFilename('../test-files/python/with_virtualenv/subdir') + AssertLSPProject ale#test#GetFilename('../test-files/python/with_virtualenv/subdir') + Execute(virtualenv paths should be set in configuration by default): call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') @@ -40,7 +48,7 @@ Execute(virtualenv paths should be set in configuration by default): \ }, \} -Execute(The pythonPath should be set based on whatever the ovveride for the venvPath is set to): +Execute(The pythonPath should be set based on whatever the override for the venvPath is set to): call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') " This overrides the default detection of the path. diff --git a/vim-config/plugins/ale/test/linter/test_reason_ols.vader b/vim-config/plugins/ale/test/linter/test_reason_ols.vader index 752bd05b..aab1285f 100644 --- a/vim-config/plugins/ale/test/linter/test_reason_ols.vader +++ b/vim-config/plugins/ale/test/linter/test_reason_ols.vader @@ -28,7 +28,7 @@ Execute(The local executable should be used when available): \ ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server'), \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server')) . ' --stdio' -Execute(The gloabl executable should always be used when use_global is set): +Execute(The global executable should always be used when use_global is set): let g:ale_reason_ols_use_global = 1 call ale#test#SetFilename('../test-files/ols/file.re') @@ -37,5 +37,6 @@ Execute(The gloabl executable should always be used when use_global is set): Execute(The executable should be configurable): let g:ale_reason_ols_executable = 'foobar' + call ale#test#SetFilename('../test-files/dummy') AssertLinter 'foobar', ale#Escape('foobar') . ' --stdio' diff --git a/vim-config/plugins/ale/test/linter/test_refurb.vader b/vim-config/plugins/ale/test/linter/test_refurb.vader new file mode 100644 index 00000000..a1f066eb --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_refurb.vader @@ -0,0 +1,85 @@ +Before: + Save g:ale_python_auto_pipenv + Save g:ale_python_auto_poetry + + let g:ale_python_auto_pipenv = 0 + let g:ale_python_auto_poetry = 0 + + call ale#assert#SetUpLinterTest('python', 'refurb') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:bin_dir + unlet! b:executable + + call ale#assert#TearDownLinterTest() + +Execute(The refurb callbacks should return the correct default values): + AssertLinterCwd expand('%:p:h') + AssertLinter 'refurb', ale#Escape('refurb') . ' %s' + +Execute(The option for disabling changing directories should work): + let g:ale_python_refurb_change_directory = 0 + + AssertLinterCwd '' + AssertLinter 'refurb', ale#Escape('refurb') . ' %s' + +Execute(The refurb executable should be configurable, and escaped properly): + let g:ale_python_refurb_executable = 'executable with spaces' + + AssertLinter 'executable with spaces', ale#Escape('executable with spaces') . ' %s' + +Execute(The refurb command callback should let you set options): + let g:ale_python_refurb_options = '--some-flag' + AssertLinter 'refurb', ale#Escape('refurb') . ' --some-flag %s' + + let g:ale_python_refurb_options = '--some-option value' + AssertLinter 'refurb', ale#Escape('refurb') . ' --some-option value %s' + +Execute(The refurb callbacks shouldn't detect virtualenv directories where they don't exist): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir') + AssertLinter 'refurb', ale#Escape('refurb') . ' %s' + +Execute(The refurb callbacks should detect virtualenv directories): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/refurb' + \) + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter b:executable, ale#Escape(b:executable) . ' %s' + +Execute(You should able able to use the global refurb instead): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let g:ale_python_refurb_use_global = 1 + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter 'refurb', ale#Escape('refurb') . ' %s' + +Execute(Setting executable to 'pipenv' appends 'run refurb'): + let g:ale_python_refurb_executable = 'path/to/pipenv' + let g:ale_python_refurb_use_global = 1 + + AssertLinter 'path/to/pipenv', ale#Escape('path/to/pipenv') . ' run refurb %s' + +Execute(Pipenv is detected when python_refurb_auto_pipenv is set): + let g:ale_python_refurb_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinterCwd expand('%:p:h') + AssertLinter 'pipenv', ale#Escape('pipenv') . ' run refurb %s' + +Execute(Setting executable to 'poetry' appends 'run refurb'): + let g:ale_python_refurb_executable = 'path/to/poetry' + let g:ale_python_refurb_use_global = 1 + + AssertLinter 'path/to/poetry', ale#Escape('path/to/poetry') . ' run refurb %s' + +Execute(poetry is detected when python_refurb_auto_poetry is set): + let g:ale_python_refurb_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinterCwd expand('%:p:h') + AssertLinter 'poetry', ale#Escape('poetry') . ' run refurb %s' diff --git a/vim-config/plugins/ale/test/linter/test_rego_opacheck.vader b/vim-config/plugins/ale/test/linter/test_rego_opacheck.vader new file mode 100644 index 00000000..3b672282 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_rego_opacheck.vader @@ -0,0 +1,16 @@ + +" Based upon :help ale-development +Before: + call ale#assert#SetUpLinterTest('rego', 'opacheck') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'opa', + \ ale#Escape('opa') . ' check %s --format json ' + +Execute(The default command should be overridden): + let b:ale_rego_opacheck_executable = '/bin/other/opa' + AssertLinter '/bin/other/opa', + \ ale#Escape('/bin/other/opa') . ' check %s --format json ' diff --git a/vim-config/plugins/ale/test/linter/test_remark_lint.vader b/vim-config/plugins/ale/test/linter/test_remark_lint.vader index a34f0a90..7f69008c 100644 --- a/vim-config/plugins/ale/test/linter/test_remark_lint.vader +++ b/vim-config/plugins/ale/test/linter/test_remark_lint.vader @@ -29,7 +29,7 @@ Execute(The local executable from .bin should be used if available): \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/remark_lint/with_bin_path/node_modules/.bin/remark')) \ . ' --no-stdout --no-color' -Execute(The global executable should be uesd if the option is set): +Execute(The global executable should be used if the option is set): let b:ale_markdown_remark_lint_use_global = 1 call ale#test#SetFilename('../test-files/remark_lint/with_bin_path/foo.md') diff --git a/vim-config/plugins/ale/test/linter/test_ruff.vader b/vim-config/plugins/ale/test/linter/test_ruff.vader new file mode 100644 index 00000000..818253dd --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_ruff.vader @@ -0,0 +1,105 @@ +Before: + Save g:ale_python_auto_pipenv + + let g:ale_python_auto_pipenv = 0 + + call ale#assert#SetUpLinterTest('python', 'ruff') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + let b:command_tail = ' --format text -' + + GivenCommandOutput ['ruff 0.0.83'] + +After: + unlet! b:bin_dir + unlet! b:executable + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The ruff callbacks should return the correct default values): + AssertLinterCwd expand('%:p:h') + AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail + +Execute(ruff should run with the file path of buffer in old versions): + " version `0.0.69` supports liniting input from stdin + GivenCommandOutput ['ruff 0.0.68'] + + AssertLinterCwd expand('%:p:h') + AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail[:-3] . ' %s' + +Execute(ruff should run with the stdin in new enough versions): + GivenCommandOutput ['ruff 0.0.83'] + + AssertLinterCwd expand('%:p:h') + AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail[:-3] . ' -' + " AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail[:-3] . '--format text -' + +Execute(The option for disabling changing directories should work): + let g:ale_python_ruff_change_directory = 0 + + AssertLinterCwd '' + AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail + +Execute(The ruff executable should be configurable, and escaped properly): + let g:ale_python_ruff_executable = 'executable with spaces' + + AssertLinter 'executable with spaces', ale#Escape('executable with spaces') . b:command_tail + +Execute(The ruff command callback should let you set options): + let g:ale_python_ruff_options = '--some-flag' + AssertLinter 'ruff', ale#Escape('ruff') . ' --some-flag' . b:command_tail + + let g:ale_python_ruff_options = '--some-option value' + AssertLinter 'ruff', ale#Escape('ruff') . ' --some-option value' . b:command_tail + +Execute(The ruff callbacks shouldn't detect virtualenv directories where they don't exist): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir') + AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail + +Execute(The ruff callbacks should detect virtualenv directories): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/ruff' + \) + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter b:executable, ale#Escape(b:executable) . b:command_tail + +Execute(You should able able to use the global ruff instead): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let g:ale_python_ruff_use_global = 1 + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail + +Execute(Setting executable to 'pipenv' appends 'run ruff'): + let g:ale_python_ruff_executable = 'path/to/pipenv' + let g:ale_python_ruff_use_global = 1 + + AssertLinter 'path/to/pipenv', ale#Escape('path/to/pipenv') . ' run ruff' + \ . ' --format text -' + +Execute(Pipenv is detected when python_ruff_auto_pipenv is set): + let g:ale_python_ruff_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinterCwd expand('%:p:h') + AssertLinter 'pipenv', ale#Escape('pipenv') . ' run ruff' + \ . ' --format text -' + +Execute(Setting executable to 'poetry' appends 'run ruff'): + let g:ale_python_ruff_executable = 'path/to/poetry' + let g:ale_python_ruff_use_global = 1 + + AssertLinter 'path/to/poetry', ale#Escape('path/to/poetry') . ' run ruff' + \ . ' --format text -' + +Execute(poetry is detected when python_ruff_auto_poetry is set): + let g:ale_python_ruff_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinterCwd expand('%:p:h') + AssertLinter 'poetry', ale#Escape('poetry') . ' run ruff' + \ . ' --format text -' diff --git a/vim-config/plugins/ale/test/linter/test_rust_analyzer.vader b/vim-config/plugins/ale/test/linter/test_rust_analyzer.vader index 82a3adfb..1dd2c780 100644 --- a/vim-config/plugins/ale/test/linter/test_rust_analyzer.vader +++ b/vim-config/plugins/ale/test/linter/test_rust_analyzer.vader @@ -7,12 +7,20 @@ After: Execute(The default executable path should be correct): AssertLinter 'rust-analyzer', ale#Escape('rust-analyzer') -Execute(The project root should be detected correctly): - AssertLSPProject '' +Execute(The project root should be detected correctly in cargo projects): + call ale#test#SetFilename('../test-files/rust/cargo/testfile.rs') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust/cargo') + +Execute(The project root should be detected correctly in non-cargo projects): + call ale#test#SetFilename('../test-files/rust/rust-project/testfile.rs') - call ale#test#SetFilename('../test-files/rust/test.rs') + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust/rust-project') - AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust') +Execute(The project root should be empty when no project files can be detected): + call ale#test#SetFilename('../test-files/dummy') + + AssertLSPProject '' Execute(Should accept configuration settings): AssertLSPConfig {} diff --git a/vim-config/plugins/ale/test/linter/test_rust_rls.vader b/vim-config/plugins/ale/test/linter/test_rust_rls.vader index 9ca25619..d481e858 100644 --- a/vim-config/plugins/ale/test/linter/test_rust_rls.vader +++ b/vim-config/plugins/ale/test/linter/test_rust_rls.vader @@ -12,17 +12,20 @@ Execute(The toolchain should be configurable): AssertLinter 'rls', ale#Escape('rls') . ' +' . ale#Escape('stable') -Execute(The toolchain should be ommitted if not given): +Execute(The toolchain should be omitted if not given): let g:ale_rust_rls_toolchain = '' AssertLinter 'rls', ale#Escape('rls') -Execute(The project root should be detected correctly): - AssertLSPProject '' +Execute(The project root should be detected correctly for cargo projects): + call ale#test#SetFilename('../test-files/rust/cargo/testfile.rs') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust/cargo') - call ale#test#SetFilename('../test-files/rust/test.rs') +Execute(The project root should be empty when no project files can be detected): + call ale#test#SetFilename('../test-files/dummy') - AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust') + AssertLSPProject '' Execute(Should accept configuration settings): AssertLSPConfig {} diff --git a/vim-config/plugins/ale/test/linter/test_rustc.vader b/vim-config/plugins/ale/test/linter/test_rustc.vader index 4bceb180..92d9fa14 100644 --- a/vim-config/plugins/ale/test/linter/test_rustc.vader +++ b/vim-config/plugins/ale/test/linter/test_rustc.vader @@ -5,17 +5,21 @@ After: call ale#assert#TearDownLinterTest() Execute(The default command should be correct): - AssertLinter 'rustc', 'rustc --error-format=json -Z no-codegen -' + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'rustc', 'rustc --error-format=json --emit=mir -o /dev/null -' Execute(The options should be configurable): + call ale#test#SetFilename('../test-files/dummy') + let b:ale_rust_rustc_options = '--foo' AssertLinter 'rustc', 'rustc --error-format=json --foo -' Execute(Some default paths should be included when the project is a Cargo project): - call ale#test#SetFilename('../test-files/cargo/test.rs') + call ale#test#SetFilename('../test-files/rust/cargo/testfile.rs') - AssertLinter 'rustc', 'rustc --error-format=json -Z no-codegen' - \ . ' -L ' . ale#Escape(ale#path#GetAbsPath(g:dir, '../test-files/cargo/target/debug/deps')) - \ . ' -L ' . ale#Escape(ale#path#GetAbsPath(g:dir, '../test-files/cargo/target/release/deps')) + AssertLinter 'rustc', 'rustc --error-format=json --emit=mir -o /dev/null' + \ . ' -L ' . ale#Escape(ale#path#GetAbsPath(g:dir, '../test-files/rust/cargo/target/debug/deps')) + \ . ' -L ' . ale#Escape(ale#path#GetAbsPath(g:dir, '../test-files/rust/cargo/target/release/deps')) \ . ' -' diff --git a/vim-config/plugins/ale/test/linter/test_scss_stylelint.vader b/vim-config/plugins/ale/test/linter/test_scss_stylelint.vader index 5a1e71c6..bf45ccd0 100644 --- a/vim-config/plugins/ale/test/linter/test_scss_stylelint.vader +++ b/vim-config/plugins/ale/test/linter/test_scss_stylelint.vader @@ -25,6 +25,8 @@ Execute(The global override should work): AssertLinter 'foobar', ale#Escape('foobar') . ' --stdin-filename %s' Execute(Extra options should be configurable): + call ale#test#SetFilename('../test-files/dummy') + let b:ale_scss_stylelint_options = '--configFile ''/absolute/path/to/file''' AssertLinter 'stylelint', diff --git a/vim-config/plugins/ale/test/linter/test_sql_sqlfluff.vader b/vim-config/plugins/ale/test/linter/test_sql_sqlfluff.vader new file mode 100644 index 00000000..9b474017 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_sql_sqlfluff.vader @@ -0,0 +1,25 @@ +Before: + call ale#assert#SetUpLinterTest('sql', 'sqlfluff') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'sqlfluff', + \ ale#Escape('sqlfluff') + \ . ' lint --dialect ansi --format json %t' + +Execute(The executable should be configurable): + let g:ale_sql_sqlfluff_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') + \ . ' lint --dialect ansi --format json %t' + +Execute(Overriding options should work): + let g:ale_sql_sqlfluff_executable = 'foobar' + let g:ale_sql_sqlfluff_options = '--whatever' + + AssertLinter 'foobar', + \ ale#Escape('foobar') + \ . ' lint --dialect ansi --format json --whatever %t' diff --git a/vim-config/plugins/ale/test/linter/test_starknet.vader b/vim-config/plugins/ale/test/linter/test_starknet.vader new file mode 100644 index 00000000..368ab702 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_starknet.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('cairo', 'starknet') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'starknet-compile', 'starknet-compile %s' + +Execute(Extra options should be supported): + let g:ale_cairo_starknet_options = '--config' + + AssertLinter 'starknet-compile', 'starknet-compile --config %s' diff --git a/vim-config/plugins/ale/test/linter/test_sugarss_stylelint.vader b/vim-config/plugins/ale/test/linter/test_sugarss_stylelint.vader index ba42eaf8..c6000a9a 100644 --- a/vim-config/plugins/ale/test/linter/test_sugarss_stylelint.vader +++ b/vim-config/plugins/ale/test/linter/test_sugarss_stylelint.vader @@ -25,6 +25,8 @@ Execute(The global override should work): AssertLinter 'foobar', ale#Escape('foobar') . ' --syntax=sugarss --stdin-filename %s' Execute(Extra options should be configurable): + call ale#test#SetFilename('../test-files/dummy') + let b:ale_sugarss_stylelint_options = '--configFile ''/absolute/path/to/file''' AssertLinter 'stylelint', diff --git a/vim-config/plugins/ale/test/linter/test_terraform_ls.vader b/vim-config/plugins/ale/test/linter/test_terraform_ls.vader index 9f7d3450..983bc104 100644 --- a/vim-config/plugins/ale/test/linter/test_terraform_ls.vader +++ b/vim-config/plugins/ale/test/linter/test_terraform_ls.vader @@ -2,10 +2,6 @@ Before: call ale#assert#SetUpLinterTest('terraform', 'terraform_ls') After: - if isdirectory(g:dir . '/.terraform') - call delete(g:dir . '/.terraform', 'd') - endif - unlet! b:ale_terraform_terraform_executable unlet! b:ale_terraform_ls_executable unlet! b:ale_terraform_ls_options @@ -40,22 +36,7 @@ Execute(Should set custom options): AssertLinter 'terraform-ls', \ ale#Escape('terraform-ls') . ' serve --bar' -Execute(Should return current directory if it contains .terraform directory): - call mkdir(g:dir . '/.terraform') - AssertLSPProject g:dir - Execute(Should return nearest directory with .terraform if found in parent directory): call ale#test#SetFilename('../test-files/terraform/main.tf') - let b:parent_dir = ale#path#Simplify(g:dir . '/..') - let b:tf_dir = b:parent_dir . '/.terraform' - - if !isdirectory(b:tf_dir) - call mkdir(b:tf_dir) - endif - - AssertLSPProject b:parent_dir - - call delete(b:tf_dir, 'd') - unlet!b:parent_dir - unlet!b:tf_dir + AssertLSPProject ale#test#GetFilename('../test-files/terraform') diff --git a/vim-config/plugins/ale/test/linter/test_terraform_lsp.vader b/vim-config/plugins/ale/test/linter/test_terraform_lsp.vader index a292fca0..27f27ffb 100644 --- a/vim-config/plugins/ale/test/linter/test_terraform_lsp.vader +++ b/vim-config/plugins/ale/test/linter/test_terraform_lsp.vader @@ -2,10 +2,6 @@ Before: call ale#assert#SetUpLinterTest('terraform', 'terraform_lsp') After: - if isdirectory(g:dir . '/.terraform') - call delete(g:dir . '/.terraform', 'd') - endif - unlet! b:ale_terraform_langserver_executable unlet! b:ale_terraform_langserver_options @@ -27,22 +23,7 @@ Execute(Should set custom options): AssertLinter 'terraform-lsp', \ ale#Escape('terraform-lsp') . ' --bar' -Execute(Should return current directory if it contains .terraform directory): - call mkdir(g:dir . '/.terraform') - AssertLSPProject g:dir - Execute(Should return nearest directory with .terraform if found in parent directory): call ale#test#SetFilename('../test-files/terraform/main.tf') - let b:parent_dir = ale#path#Simplify(g:dir . '/..') - let b:tf_dir = b:parent_dir . '/.terraform' - - if !isdirectory(b:tf_dir) - call mkdir(b:tf_dir) - endif - - AssertLSPProject b:parent_dir - - call delete(b:tf_dir, 'd') - unlet!b:parent_dir - unlet!b:tf_dir + AssertLSPProject ale#test#GetFilename('../test-files/terraform') diff --git a/vim-config/plugins/ale/test/linter/test_terraform_terraform.vader b/vim-config/plugins/ale/test/linter/test_terraform_terraform.vader index 25ca652a..697ffcda 100644 --- a/vim-config/plugins/ale/test/linter/test_terraform_terraform.vader +++ b/vim-config/plugins/ale/test/linter/test_terraform_terraform.vader @@ -9,7 +9,7 @@ Execute(The default command should be correct): AssertLinter 'terraform', \ ale#Escape('terraform') . ' validate -no-color -json ' -Execute(The default command should be overriden): +Execute(The default command should be overridden): let b:ale_terraform_terraform_executable = '/bin/other/terraform' AssertLinter '/bin/other/terraform', \ ale#Escape('/bin/other/terraform') . ' validate -no-color -json ' diff --git a/vim-config/plugins/ale/test/linter/test_terraform_tfsec.vader b/vim-config/plugins/ale/test/linter/test_terraform_tfsec.vader new file mode 100644 index 00000000..c3a7eae2 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_terraform_tfsec.vader @@ -0,0 +1,38 @@ +Before: + call ale#assert#SetUpLinterTest('terraform', 'tfsec') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'tfsec', ale#Escape('tfsec') . ' --format json' + +Execute(The default executable should be configurable): + let b:ale_terraform_tfsec_executable = '/usr/bin/tfsec' + + AssertLinter '/usr/bin/tfsec', ale#Escape('/usr/bin/tfsec') . ' --format json' + +Execute(Overriding options should work): + let g:ale_terraform_tfsec_executable = '/usr/local/bin/tfsec' + let g:ale_terraform_tfsec_options = '--minimum-severity MEDIUM' + + AssertLinter '/usr/local/bin/tfsec', + \ ale#Escape('/usr/local/bin/tfsec') . ' --minimum-severity MEDIUM --format json' + +Execute(Configuration yml file should be found): + call ale#test#SetFilename('../test-files/tfsec/yml/main.tf') + + AssertLinter 'tfsec', + \ ale#Escape('tfsec') + \ . ' --config-file ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/tfsec/yml/.tfsec/config.yml')) + \ . ' --format json' + +Execute(Configuration json file should be found): + call ale#test#SetFilename('../test-files/tfsec/json/main.tf') + + AssertLinter 'tfsec', + \ ale#Escape('tfsec') + \ . ' --config-file ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/tfsec/json/.tfsec/config.json')) + \ . ' --format json' diff --git a/vim-config/plugins/ale/test/linter/test_texlab.vader b/vim-config/plugins/ale/test/linter/test_texlab.vader index 75fc2f25..b60b2083 100644 --- a/vim-config/plugins/ale/test/linter/test_texlab.vader +++ b/vim-config/plugins/ale/test/linter/test_texlab.vader @@ -28,3 +28,8 @@ Execute(The options should be configurable): let b:ale_tex_texlab_options = '-v' AssertLinter 'texlab', ale#Escape('texlab') . ' ' . b:ale_tex_texlab_options + +Execute(Should accept configuration settings): + AssertLSPConfig {} + let b:ale_tex_texlab_config = {'build':{'onSave':v:true}} + AssertLSPConfig {'build':{'onSave':v:true}} diff --git a/vim-config/plugins/ale/test/linter/test_unimport.vader b/vim-config/plugins/ale/test/linter/test_unimport.vader new file mode 100644 index 00000000..a5607ce9 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_unimport.vader @@ -0,0 +1,71 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'unimport') + call ale#test#SetFilename('test.py') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:executable + unlet! b:bin_dir + + call ale#assert#TearDownLinterTest() + +Execute(The unimport callbacks should return the correct default values): + AssertLinter 'unimport', ale#Escape('unimport') . ' --check %t' + +Execute(The unimport executable should be configurable, and escaped properly): + let b:ale_python_unimport_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --check %t' + +Execute(The unimport command callback should let you set options): + let b:ale_python_unimport_options = '--gitignore' + + AssertLinter 'unimport', ale#Escape('unimport') . ' --gitignore --check %t' + +Execute(The unimport command should switch directories to the detected project root): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir') + AssertLinter 'unimport', ale#Escape('unimport') . ' --check %t' + +Execute(The unimport callbacks should detect virtualenv directories and switch to the project root): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/unimport' + \) + + AssertLinter b:executable, ale#Escape(b:executable) . ' --check %t' + +Execute(You should able able to use the global unimport instead): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let g:ale_python_unimport_use_global = 1 + + AssertLinter 'unimport', ale#Escape('unimport') . ' --check %t' + +Execute(Setting executable to 'pipenv' appends 'run unimport'): + let g:ale_python_unimport_executable = 'path/to/pipenv' + + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'path/to/pipenv', ale#Escape('path/to/pipenv') . ' run unimport --check %t' + +Execute(Pipenv is detected when python_unimport_auto_pipenv is set): + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + let g:ale_python_unimport_auto_pipenv = 1 + + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'pipenv', ale#Escape('pipenv') . ' run unimport --check %t' + +Execute(Setting executable to 'poetry' appends 'run unimport'): + let g:ale_python_unimport_executable = 'path/to/poetry' + + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'path/to/poetry', ale#Escape('path/to/poetry') . ' run unimport --check %t' + +Execute(Poetry is detected when python_unimport_auto_poetry is set): + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + let g:ale_python_unimport_auto_poetry = 1 + + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'poetry', ale#Escape('poetry') . ' run unimport --check %t' diff --git a/vim-config/plugins/ale/test/linter/test_vim_vimls.vader b/vim-config/plugins/ale/test/linter/test_vim_vimls.vader index 47826a1a..eb9239a2 100644 --- a/vim-config/plugins/ale/test/linter/test_vim_vimls.vader +++ b/vim-config/plugins/ale/test/linter/test_vim_vimls.vader @@ -70,7 +70,8 @@ Execute(should let the global executable to be used): AssertLinter 'vim-language-server', \ ale#Escape('vim-language-server') . ' --stdio' -Execute(should let the executable to be configured): +Execute(should allow the executable to be configured): let g:ale_vim_vimls_executable = 'foobar' + call ale#test#SetFilename('../test-files/dummy') AssertLinter 'foobar', ale#Escape('foobar') . ' --stdio' diff --git a/vim-config/plugins/ale/test/linter/test_volar.vader b/vim-config/plugins/ale/test/linter/test_volar.vader new file mode 100644 index 00000000..bef094be --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_volar.vader @@ -0,0 +1,27 @@ +Before: + call ale#assert#SetUpLinterTest('vue', 'volar') + + let g:tsserver_path = '' + let g:actual_path = '' + let g:init_opts = {} + +After: + call ale#assert#TearDownLinterTest() + + unlet g:tsserver_path + unlet g:actual_path + unlet g:init_opts + +Execute(Assert Volar LSP for Vue Project): + call ale#test#SetFilename('../test-files/volar/src/App.vue') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/volar') + +Execute(Assert proper tsserverlibrary for Volar LSP): + call ale#test#SetFilename('../test-files/volar/src/App.vue') + + let g:init_opts = ale_linters#vue#volar#GetInitializationOptions(bufnr('')) + let g:tsserver_path = init_opts.typescript.serverPath + let g:actual_path = ale#path#Simplify(g:dir . '/../test-files/volar/node_modules/typescript/lib/tsserverlibrary.js') + + AssertEqual g:tsserver_path, g:actual_path diff --git a/vim-config/plugins/ale/test/linter/test_yaml_ls.vader b/vim-config/plugins/ale/test/linter/test_yaml_ls.vader new file mode 100644 index 00000000..449ce8c3 --- /dev/null +++ b/vim-config/plugins/ale/test/linter/test_yaml_ls.vader @@ -0,0 +1,21 @@ +Before: + call ale#assert#SetUpLinterTest('yaml', 'ls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(should set correct defaults): + AssertLinter 'yaml-language-server', ale#Escape('yaml-language-server') . ' --stdio' + +Execute(should set correct LSP values): + call ale#test#SetFilename('../test-files/yaml/test.yaml') + + AssertLSPLanguage 'yaml' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/yaml') + +Execute(should accept configuration settings): + AssertLSPConfig {} + let b:ale_yaml_ls_config = {'yaml': {'hover': v:false, 'completion': v:true}} + AssertLSPConfig {'yaml': {'hover': v:false, 'completion': v:true}} diff --git a/vim-config/plugins/ale/test/lsp/test_closing_documents.vader b/vim-config/plugins/ale/test/lsp/test_closing_documents.vader index e6e11415..b9f2f824 100644 --- a/vim-config/plugins/ale/test/lsp/test_closing_documents.vader +++ b/vim-config/plugins/ale/test/lsp/test_closing_documents.vader @@ -63,7 +63,7 @@ Execute(A message should be sent if the document was opened): \ [ \ ['command:/foo', 1, 'textDocument/didOpen', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ 'languageId': 'lang', \ 'text': "\n", @@ -71,7 +71,7 @@ Execute(A message should be sent if the document was opened): \ }], \ ['command:/foo', 1, 'textDocument/didClose', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ }, \ }], \ ], @@ -106,7 +106,7 @@ Execute(Re-opening and closing the documents should work): \ [ \ ['command:/foo', 1, 'textDocument/didOpen', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 2, \ 'languageId': 'lang', \ 'text': "\n", @@ -114,12 +114,12 @@ Execute(Re-opening and closing the documents should work): \ }], \ ['command:/foo', 1, 'textDocument/didClose', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ }, \ }], \ ['command:/foo', 1, 'textDocument/didOpen', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ 'languageId': 'lang', \ 'text': "\n", @@ -127,7 +127,7 @@ Execute(Re-opening and closing the documents should work): \ }], \ ['command:/foo', 1, 'textDocument/didClose', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ }, \ }], \ ], @@ -148,7 +148,7 @@ Execute(Messages for closing documents should be sent to each server): \ [ \ ['command:/foo', 1, 'textDocument/didOpen', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 2, \ 'languageId': 'lang', \ 'text': "\n", @@ -156,7 +156,7 @@ Execute(Messages for closing documents should be sent to each server): \ }], \ ['command:/bar', 1, 'textDocument/didOpen', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ 'languageId': 'lang', \ 'text': "\n", @@ -164,12 +164,12 @@ Execute(Messages for closing documents should be sent to each server): \ }], \ ['command:/bar', 1, 'textDocument/didClose', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ }, \ }], \ ['command:/foo', 1, 'textDocument/didClose', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ }, \ }], \ ], diff --git a/vim-config/plugins/ale/test/lsp/test_did_save_event.vader b/vim-config/plugins/ale/test/lsp/test_did_save_event.vader index fbec10e5..fc73c4d6 100644 --- a/vim-config/plugins/ale/test/lsp/test_did_save_event.vader +++ b/vim-config/plugins/ale/test/lsp/test_did_save_event.vader @@ -94,7 +94,7 @@ Execute(Server should be notified on save): \ [ \ [1, 'textDocument/didChange', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ }, \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}], @@ -118,14 +118,14 @@ Execute(Server should be notified on save with didSave is supported by server): \ [ \ [1, 'textDocument/didChange', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ }, \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}], \ }], \ [1, 'textDocument/didSave', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ }, \ }], \ ], @@ -138,7 +138,7 @@ Execute(Server should be notified on change): \ [ \ [1, 'textDocument/didChange', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ }, \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}], diff --git a/vim-config/plugins/ale/test/lsp/test_engine_lsp_response_handling.vader b/vim-config/plugins/ale/test/lsp/test_engine_lsp_response_handling.vader index 1c5082c5..50ceef4d 100644 --- a/vim-config/plugins/ale/test/lsp/test_engine_lsp_response_handling.vader +++ b/vim-config/plugins/ale/test/lsp/test_engine_lsp_response_handling.vader @@ -108,7 +108,7 @@ Execute(tsserver syntax error responses should be handled correctly): \ 'pattern': '', \ }, \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() " After we get empty syntax errors, we should clear them. call ale#lsp_linter#HandleLSPResponse(1, { @@ -125,7 +125,7 @@ Execute(tsserver syntax error responses should be handled correctly): AssertEqual \ [ \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() " Syntax errors on the project root should not populate the LocList. call ale#lsp_linter#HandleLSPResponse(1, { @@ -154,7 +154,7 @@ Execute(tsserver syntax error responses should be handled correctly): AssertEqual \ [ \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() Execute(tsserver semantic error responses should be handled correctly): runtime ale_linters/typescript/tsserver.vim @@ -222,7 +222,7 @@ Execute(tsserver semantic error responses should be handled correctly): \ 'pattern': '', \ }, \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() " After we get empty syntax errors, we should clear them. call ale#lsp_linter#HandleLSPResponse(1, { @@ -239,7 +239,7 @@ Execute(tsserver semantic error responses should be handled correctly): AssertEqual \ [ \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() " Semantic errors on the project root should not populate the LocList. call ale#lsp_linter#HandleLSPResponse(1, { @@ -268,7 +268,7 @@ Execute(tsserver semantic error responses should be handled correctly): AssertEqual \ [ \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() Execute(tsserver errors should mark tsserver no longer active): let b:ale_linters = ['tsserver'] @@ -314,7 +314,7 @@ Execute(LSP diagnostics responses should be handled correctly): \ 'jsonrpc':'2.0', \ 'method':'textDocument/publishDiagnostics', \ 'params': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'diagnostics': [ \ { \ 'range': { @@ -350,7 +350,7 @@ Execute(LSP diagnostics responses should be handled correctly): \ 'text': 'Missing JRE 1-8' \ } \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() Execute(LSP diagnostics responses on project root should not populate loclist): let b:ale_linters = ['eclipselsp'] @@ -388,7 +388,7 @@ Execute(LSP diagnostics responses on project root should not populate loclist): AssertEqual \ [ \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() Execute(LSP errors should mark linters no longer active): let b:ale_linters = ['pylsp'] @@ -403,7 +403,7 @@ Execute(LSP errors should mark linters no longer active): call ale#lsp_linter#HandleLSPResponse(1, { \ 'method': 'textDocument/publishDiagnostics', \ 'params': { - \ 'uri': ale#path#ToURI(g:dir . '/filename.py'), + \ 'uri': ale#path#ToFileURI(g:dir . '/filename.py'), \ 'diagnostics': [], \ }, \}) diff --git a/vim-config/plugins/ale/test/lsp/test_lsp_client_messages.vader b/vim-config/plugins/ale/test/lsp/test_lsp_client_messages.vader index 4c6b0ffa..4d897b51 100644 --- a/vim-config/plugins/ale/test/lsp/test_lsp_client_messages.vader +++ b/vim-config/plugins/ale/test/lsp/test_lsp_client_messages.vader @@ -44,7 +44,7 @@ Execute(ale#lsp#message#DidOpen() should return correct messages): \ 'textDocument/didOpen', \ { \ 'textDocument': { - \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), \ 'languageId': 'typescript', \ 'version': 12, \ 'text': "foo()\nbar()\nbaz()\n", @@ -62,7 +62,7 @@ Execute(ale#lsp#message#DidChange() should return correct messages): \ 'textDocument/didChange', \ { \ 'textDocument': { - \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), \ 'version': 34, \ }, \ 'contentChanges': [{'text': "foo()\nbar()\nbaz()\n"}], @@ -84,7 +84,7 @@ Execute(ale#lsp#message#DidSave() should return correct messages): \ 'textDocument/didSave', \ { \ 'textDocument': { - \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), \ }, \ } \ ], @@ -97,7 +97,7 @@ Execute(ale#lsp#message#DidSave() should return correct message with includeText \ 'textDocument/didSave', \ { \ 'textDocument': { - \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), \ 'version': 1, \ }, \ 'text': ale#util#GetBufferContents(bufnr('')), @@ -112,7 +112,7 @@ Execute(ale#lsp#message#DidClose() should return correct messages): \ 'textDocument/didClose', \ { \ 'textDocument': { - \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), \ }, \ } \ ], @@ -125,7 +125,7 @@ Execute(ale#lsp#message#Completion() should return correct messages): \ 'textDocument/completion', \ { \ 'textDocument': { - \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), \ }, \ 'position': {'line': 11, 'character': 33}, \ } @@ -139,7 +139,7 @@ Execute(ale#lsp#message#Completion() should return correct messages with a trigg \ 'textDocument/completion', \ { \ 'textDocument': { - \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), \ }, \ 'position': {'line': 11, 'character': 33}, \ 'context': {'triggerKind': 2, 'triggerCharacter': '.'}, @@ -154,7 +154,7 @@ Execute(ale#lsp#message#Definition() should return correct messages): \ 'textDocument/definition', \ { \ 'textDocument': { - \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), \ }, \ 'position': {'line': 11, 'character': 33}, \ } @@ -168,13 +168,27 @@ Execute(ale#lsp#message#TypeDefinition() should return correct messages): \ 'textDocument/typeDefinition', \ { \ 'textDocument': { - \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), \ }, \ 'position': {'line': 11, 'character': 33}, \ } \ ], \ ale#lsp#message#TypeDefinition(bufnr(''), 12, 34) +Execute(ale#lsp#message#Implementation() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'textDocument/implementation', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ }, + \ 'position': {'line': 11, 'character': 33}, + \ } + \ ], + \ ale#lsp#message#Implementation(bufnr(''), 12, 34) + Execute(ale#lsp#message#References() should return correct messages): AssertEqual \ [ @@ -182,7 +196,7 @@ Execute(ale#lsp#message#References() should return correct messages): \ 'textDocument/references', \ { \ 'textDocument': { - \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), \ }, \ 'position': {'line': 11, 'character': 33}, \ 'context': {'includeDeclaration': v:false}, @@ -208,7 +222,7 @@ Execute(ale#lsp#message#Hover() should return correct messages): \ 'textDocument/hover', \ { \ 'textDocument': { - \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), \ }, \ 'position': {'line': 11, 'character': 33}, \ } @@ -335,6 +349,19 @@ Execute(ale#lsp#tsserver_message#TypeDefinition() should return correct messages \ ], \ ale#lsp#tsserver_message#TypeDefinition(bufnr(''), 347, 12) +Execute(ale#lsp#tsserver_message#Implementation() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'ts@implementation', + \ { + \ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'), + \ 'line': 347, + \ 'offset': 12, + \ } + \ ], + \ ale#lsp#tsserver_message#Implementation(bufnr(''), 347, 12) + Execute(ale#lsp#tsserver_message#References() should return correct messages): AssertEqual \ [ diff --git a/vim-config/plugins/ale/test/lsp/test_lsp_startup.vader b/vim-config/plugins/ale/test/lsp/test_lsp_startup.vader index f0afe39c..7417dbcb 100644 --- a/vim-config/plugins/ale/test/lsp/test_lsp_startup.vader +++ b/vim-config/plugins/ale/test/lsp/test_lsp_startup.vader @@ -138,7 +138,7 @@ Before: \ 'id': 1, \ 'params': { \ 'initializationOptions': {}, - \ 'rootUri': ale#path#ToURI(a:root), + \ 'rootUri': ale#path#ToFileURI(a:root), \ 'rootPath': a:root, \ 'processId': getpid(), \ 'capabilities': { @@ -189,11 +189,20 @@ Before: \ 'typeDefinition': { \ 'dynamicRegistration': v:false, \ }, + \ 'implementation': { + \ 'dynamicRegistration': v:false, + \ 'linkSupport': v:false, + \ }, \ 'publishDiagnostics': { \ 'relatedInformation': v:true, \ }, \ 'codeAction': { \ 'dynamicRegistration': v:false, + \ 'codeActionLiteralSupport': { + \ 'codeActionKind': { + \ 'valueSet': [] + \ } + \ } \ }, \ 'rename': { \ 'dynamicRegistration': v:false, @@ -253,7 +262,7 @@ Before: \ 'jsonrpc': '2.0', \ 'params': { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')), + \ 'uri': ale#path#ToFileURI(expand('#' . a:buffer . ':p')), \ 'version': ale#lsp#message#GetNextVersionID() - 1, \ 'languageId': a:language, \ 'text': "\n", diff --git a/vim-config/plugins/ale/test/lsp/test_other_initialize_message_handling.vader b/vim-config/plugins/ale/test/lsp/test_other_initialize_message_handling.vader index f3b53843..6711c746 100644 --- a/vim-config/plugins/ale/test/lsp/test_other_initialize_message_handling.vader +++ b/vim-config/plugins/ale/test/lsp/test_other_initialize_message_handling.vader @@ -182,6 +182,7 @@ Execute(Capabilities should be enabled when send as Dictionaries): \ }, \ 'definitionProvider': {}, \ 'typeDefinitionProvider': {}, + \ 'implementationProvider': {}, \ 'experimental': {}, \ 'documentHighlightProvider': v:true, \ 'workspaceSymbolProvider': {} @@ -198,6 +199,7 @@ Execute(Capabilities should be enabled when send as Dictionaries): \ 'hover': 1, \ 'definition': 1, \ 'typeDefinition': 1, + \ 'implementation': 1, \ 'symbol_search': 1, \ 'rename': 1, \ 'code_actions': 1, diff --git a/vim-config/plugins/ale/test/python/test_deoplete_source.py b/vim-config/plugins/ale/test/python/test_deoplete_source.py index 8304fa25..74a42dc2 100644 --- a/vim-config/plugins/ale/test/python/test_deoplete_source.py +++ b/vim-config/plugins/ale/test/python/test_deoplete_source.py @@ -53,6 +53,7 @@ def test_attributes(self): 'rust': r'(\.|::)\w*$', 'typescript': r'(\.|\'|")\w*$', 'cpp': r'(\.|::|->)\w*$', + 'c': r'(\.|->)\w*$', }, 'is_bytepos': True, 'is_volatile': True, diff --git a/vim-config/plugins/ale/test/script/custom-linting-rules b/vim-config/plugins/ale/test/script/custom-linting-rules index 12dec4c1..486a0db7 100755 --- a/vim-config/plugins/ale/test/script/custom-linting-rules +++ b/vim-config/plugins/ale/test/script/custom-linting-rules @@ -73,6 +73,17 @@ check_errors() { for directory in "${directories[@]}"; do # shellcheck disable=SC2086 while read -r; do + line=$(cut -d ":" -f2 <<< "$REPLY") + + if ((line > 1)); then + line=$((line - 1)) + file=$(cut -d ":" -f1 <<< "$REPLY") + + if sed -n "${line},${line}p" $file | grep -q '^ *" *no-custom-checks$'; then + continue + fi + fi + RETURN_CODE=1 echo "$REPLY $message" done < <(grep -H -n "$regex" $include_arg $exclude_arg "$directory"/**/*.vim \ @@ -125,7 +136,7 @@ check_errors '==#' "Use 'is#' instead of '==#'. 0 ==# 'foobar' is true" check_errors '==?' "Use 'is?' instead of '==?'. 0 ==? 'foobar' is true" check_errors '!=#' "Use 'isnot#' instead of '!=#'. 0 !=# 'foobar' is false" check_errors '!=?' "Use 'isnot?' instead of '!=?'. 0 !=? 'foobar' is false" -check_errors '^ *:\?echo' "Stray echo line. Use \`execute echo\` if you want to echo something" +check_errors '^ *:\?echo' "Stray echo line. Ignore with \" no-custom-checks if needed" check_errors '^ *:\?redir' 'User execute() instead of redir' # Exclusions for grandfathered-in exceptions exclusions="clojure/clj_kondo.vim elixir/elixir_ls.vim go/golangci_lint.vim swift/swiftformat.vim" diff --git a/vim-config/plugins/ale/test/script/run-vader-tests b/vim-config/plugins/ale/test/script/run-vader-tests index c8cdfde4..15a4a91e 100755 --- a/vim-config/plugins/ale/test/script/run-vader-tests +++ b/vim-config/plugins/ale/test/script/run-vader-tests @@ -36,6 +36,22 @@ done vim="$1" tests="$2" + +echo "$vim" + +case $vim in + neovim-v0.2*) + headless='' + ;; + # Neovim 0.6+ requires headless argument to load Vader tests. + neovim*) + headless='--headless' + ;; + *) + headless='' + ;; +esac + # This file will be used to track if tests ran or not. # We can't use a variable, because we need to set a value in a sub-shell. run_file="$(mktemp -t tests_ran.XXXXXXXX)" @@ -132,7 +148,7 @@ while [ "$tries" -lt 5 ]; do exit_code=0 set -o pipefail docker run -a stderr -e VADER_OUTPUT_FILE=/dev/stderr "${docker_flags[@]}" \ - "/vim-build/bin/$vim" -u test/vimrc \ + "/vim-build/bin/$vim" -u test/vimrc ${headless} \ "+Vader! $tests" 2>&1 | filter-vader-output | color-vader-output || exit_code=$? set +o pipefail diff --git a/vim-config/plugins/ale/test/smoke_test.vader b/vim-config/plugins/ale/test/smoke_test.vader index 58206049..49634c34 100644 --- a/vim-config/plugins/ale/test/smoke_test.vader +++ b/vim-config/plugins/ale/test/smoke_test.vader @@ -70,7 +70,7 @@ Execute(Linters should run with the default options): call ale#Queue(0, '') call ale#test#WaitForJobs(2000) - let g:results = ale#test#GetLoclistWithoutModule() + let g:results = ale#test#GetLoclistWithoutNewerKeys() if g:results == g:expected_results break @@ -137,45 +137,5 @@ Execute(Linters should run in PowerShell too): \ 'pattern': '', \ 'valid': 1, \ }, - \], ale#test#GetLoclistWithoutModule() + \], ale#test#GetLoclistWithoutNewerKeys() endif - -Execute(Previous errors should be removed when linters change): - call ale#Queue(0, '') - call ale#test#WaitForJobs(2000) - - call ale#linter#Reset() - - call ale#linter#Define('foobar', { - \ 'name': 'testlinter2', - \ 'callback': 'TestCallback2', - \ 'executable': has('win32') ? 'cmd' : 'echo', - \ 'command': has('win32') ? 'echo baz boz' : '/bin/sh -c ''echo baz boz''', - \}) - - let g:expected_results = [{ - \ 'bufnr': bufnr('%'), - \ 'lnum': 3, - \ 'vcol': 0, - \ 'col': 4, - \ 'text': 'baz boz', - \ 'type': 'E', - \ 'nr': -1, - \ 'pattern': '', - \ 'valid': 1, - \}] - - " Try the test a few times over in NeoVim 0.3 or VIm 8.2 or Windows, - " where tests fail randomly. - for g:i in range(has('nvim-0.3') || has('win32') || has('patch-8.2.2401') ? 5 : 1) - call ale#Queue(0, '') - call ale#test#WaitForJobs(2000) - - let g:results = ale#test#GetLoclistWithoutModule() - - if g:results == g:expected_results - break - endif - endfor - - AssertEqual g:expected_results, g:results diff --git a/vim-config/plugins/ale/test/test-files/rust/Cargo.toml b/vim-config/plugins/ale/test/test-files/cspell/node-modules-2/node_modules/cspell/bin.js old mode 100644 new mode 100755 similarity index 100% rename from vim-config/plugins/ale/test/test-files/rust/Cargo.toml rename to vim-config/plugins/ale/test/test-files/cspell/node-modules-2/node_modules/cspell/bin.js diff --git a/vim-config/plugins/ale/test/test-files/rust/testfile.rs b/vim-config/plugins/ale/test/test-files/cspell/node-modules/node_modules/.bin/cspell old mode 100644 new mode 100755 similarity index 100% rename from vim-config/plugins/ale/test/test-files/rust/testfile.rs rename to vim-config/plugins/ale/test/test-files/cspell/node-modules/node_modules/.bin/cspell diff --git a/vim-config/plugins/ale/test/test-files/dprint/blank.ts b/vim-config/plugins/ale/test/test-files/dprint/blank.ts new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/dprint/dprint.json b/vim-config/plugins/ale/test/test-files/dprint/dprint.json new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/erlang/app/_build/default/lib/dep/rebar.lock b/vim-config/plugins/ale/test/test-files/erlang/app/_build/default/lib/dep/rebar.lock new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/erlang/app/_build/default/lib/dep/src/dep.erl b/vim-config/plugins/ale/test/test-files/erlang/app/_build/default/lib/dep/src/dep.erl new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/erlang/app/rebar.lock b/vim-config/plugins/ale/test/test-files/erlang/app/rebar.lock new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/erlang/app/src/app.erl b/vim-config/plugins/ale/test/test-files/erlang/app/src/app.erl new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/erlang/app_with_erlang_ls_config/_build/default/lib/dep/erlang_ls.config b/vim-config/plugins/ale/test/test-files/erlang/app_with_erlang_ls_config/_build/default/lib/dep/erlang_ls.config new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/erlang/app_with_erlang_ls_config/_build/default/lib/dep/src/dep.erl b/vim-config/plugins/ale/test/test-files/erlang/app_with_erlang_ls_config/_build/default/lib/dep/src/dep.erl new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/erlang/app_with_erlang_ls_config/erlang_ls.config b/vim-config/plugins/ale/test/test-files/erlang/app_with_erlang_ls_config/erlang_ls.config new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/erlang/app_with_erlang_ls_config/src/app.erl b/vim-config/plugins/ale/test/test-files/erlang/app_with_erlang_ls_config/src/app.erl new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/erlang/kerl_otp_root/.kerl_config b/vim-config/plugins/ale/test/test-files/erlang/kerl_otp_root/.kerl_config new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/erlang/kerl_otp_root/lib/stdlib-4.1.1/src/array.erl b/vim-config/plugins/ale/test/test-files/erlang/kerl_otp_root/lib/stdlib-4.1.1/src/array.erl new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/hie_paths/file.hs b/vim-config/plugins/ale/test/test-files/hie_paths/file.hs new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/php/project-with-pint/test.php b/vim-config/plugins/ale/test/test-files/php/project-with-pint/test.php new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/php/project-with-pint/vendor/bin/pint b/vim-config/plugins/ale/test/test-files/php/project-with-pint/vendor/bin/pint new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/php/project-without-pint/test.php b/vim-config/plugins/ale/test/test-files/php/project-without-pint/test.php new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/proto/testfile.proto b/vim-config/plugins/ale/test/test-files/proto/testfile.proto new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/Scripts/refurb.exe b/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/Scripts/refurb.exe new file mode 100755 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/Scripts/ruff.exe b/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/Scripts/ruff.exe new file mode 100755 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/Scripts/tidy-imports.exe b/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/Scripts/tidy-imports.exe new file mode 100755 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/Scripts/unimport.exe b/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/Scripts/unimport.exe new file mode 100755 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/bin/refurb b/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/bin/refurb new file mode 100755 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/bin/ruff b/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/bin/ruff new file mode 100755 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/bin/tidy-imports b/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/bin/tidy-imports new file mode 100755 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/bin/unimport b/vim-config/plugins/ale/test/test-files/python/with_virtualenv/env/bin/unimport new file mode 100755 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/rust/cargo/Cargo.toml b/vim-config/plugins/ale/test/test-files/rust/cargo/Cargo.toml new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/rust/cargo/testfile.rs b/vim-config/plugins/ale/test/test-files/rust/cargo/testfile.rs new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/rust/rust-project/rust-project.json b/vim-config/plugins/ale/test/test-files/rust/rust-project/rust-project.json new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/rust/rust-project/testfile.rs b/vim-config/plugins/ale/test/test-files/rust/rust-project/testfile.rs new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/terraform/.terraform/dummy b/vim-config/plugins/ale/test/test-files/terraform/.terraform/dummy new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/tfsec/json/.tfsec/config.json b/vim-config/plugins/ale/test/test-files/tfsec/json/.tfsec/config.json new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/tfsec/json/main.tf b/vim-config/plugins/ale/test/test-files/tfsec/json/main.tf new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/tfsec/yml/.tfsec/config.yml b/vim-config/plugins/ale/test/test-files/tfsec/yml/.tfsec/config.yml new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/tfsec/yml/main.tf b/vim-config/plugins/ale/test/test-files/tfsec/yml/main.tf new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/volar/node_modules/.bin/vue-language-server b/vim-config/plugins/ale/test/test-files/volar/node_modules/.bin/vue-language-server new file mode 100755 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/volar/node_modules/typescript/lib/tsserverlibrary.js b/vim-config/plugins/ale/test/test-files/volar/node_modules/typescript/lib/tsserverlibrary.js new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/volar/package.json b/vim-config/plugins/ale/test/test-files/volar/package.json new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/volar/src/App.vue b/vim-config/plugins/ale/test/test-files/volar/src/App.vue new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test-files/yaml/test.yaml b/vim-config/plugins/ale/test/test-files/yaml/test.yaml new file mode 100644 index 00000000..e69de29b diff --git a/vim-config/plugins/ale/test/test_ale_has.vader b/vim-config/plugins/ale/test/test_ale_has.vader index df4ca302..a4abe213 100644 --- a/vim-config/plugins/ale/test/test_ale_has.vader +++ b/vim-config/plugins/ale/test/test_ale_has.vader @@ -1,4 +1,6 @@ Execute(Checks for versions below the current version should succeed): + AssertEqual 1, ale#Has('ale-3.3.0') + AssertEqual 1, ale#Has('ale-3.2.0') AssertEqual 1, ale#Has('ale-3.1.0') AssertEqual 1, ale#Has('ale-3.0.0') AssertEqual 1, ale#Has('ale-2.7.0') diff --git a/vim-config/plugins/ale/test/test_ale_info.vader b/vim-config/plugins/ale/test/test_ale_info.vader index 2e0965a9..ded65a1f 100644 --- a/vim-config/plugins/ale/test/test_ale_info.vader +++ b/vim-config/plugins/ale/test/test_ale_info.vader @@ -111,7 +111,7 @@ Before: let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK'] let g:ale_type_map = {} let g:ale_use_global_executables = v:null - let g:ale_virtualtext_cursor = 0 + let g:ale_virtualtext_cursor = 'disabled' let g:ale_warn_about_trailing_blank_lines = 1 let g:ale_warn_about_trailing_whitespace = 1 @@ -190,7 +190,7 @@ Before: \ 'let g:ale_statusline_format = [''%d error(s)'', ''%d warning(s)'', ''OK'']', \ 'let g:ale_type_map = {}', \ 'let g:ale_use_global_executables = v:null', - \ 'let g:ale_virtualtext_cursor = 0', + \ 'let g:ale_virtualtext_cursor = ''disabled''', \ 'let g:ale_warn_about_trailing_blank_lines = 1', \ 'let g:ale_warn_about_trailing_whitespace = 1', \] diff --git a/vim-config/plugins/ale/test/test_ale_lint_command.vader b/vim-config/plugins/ale/test/test_ale_lint_command.vader index ba7308dd..800c0827 100644 --- a/vim-config/plugins/ale/test/test_ale_lint_command.vader +++ b/vim-config/plugins/ale/test/test_ale_lint_command.vader @@ -68,10 +68,10 @@ Execute(ALELint should run the linters): sleep 1ms endif - if ale#test#GetLoclistWithoutModule() == g:expected_loclist + if ale#test#GetLoclistWithoutNewerKeys() == g:expected_loclist break endif endfor " Check the loclist - AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutModule() + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() diff --git a/vim-config/plugins/ale/test/test_ale_populate_command.vader b/vim-config/plugins/ale/test/test_ale_populate_command.vader new file mode 100644 index 00000000..14789c72 --- /dev/null +++ b/vim-config/plugins/ale/test/test_ale_populate_command.vader @@ -0,0 +1,96 @@ +Before: + Save g:ale_buffer_info + Save g:ale_enabled + Save g:ale_set_quickfix + Save g:ale_set_loclist + Save g:ale_open_list + + let g:ale_buffer_info = {} + let g:ale_enabled = 1 + let g:ale_set_quickfix = 0 + let g:ale_set_loclist = 0 + let g:ale_open_list = 1 + + let g:expected_loclist = [{ + \ 'bufnr': bufnr('%'), + \ 'lnum': 2, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'foo bar', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \}] + + function! ToggleTestCallback(buffer, output) + return [{ + \ 'bufnr': a:buffer, + \ 'lnum': 2, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': join(split(a:output[0])), + \ 'type': 'E', + \ 'nr': -1, + \}] + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'ToggleTestCallback', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': 'echo foo bar', + \}) + +After: + Restore + + unlet! g:expected_loclist + unlet! b:i + + call ale#engine#Cleanup(bufnr('')) + call ale#linter#Reset() + + " Not sure this is necessary since it was Save/Restore-d + let g:ale_buffer_info = {} + + delfunction ToggleTestCallback + +Given foobar (Some imaginary filetype): + foo + bar + baz + +Execute(ALEPopulateQuickfix should have results): + AssertEqual 'foobar', &filetype + + " Clear so we can check that they're unmodified. + call setqflist([]) + call setloclist(winnr(), []) + + " Try to run the linter a few times, as it fails randomly in NeoVim. + for b:i in range(5) + ALELint + call ale#test#WaitForJobs(2000) + + if !has('nvim') + " Sleep so the delayed list function can run. + " This breaks the tests in NeoVim for some reason. + sleep 1ms + endif + + if ale#test#GetLoclistWithoutNewerKeys() == g:expected_loclist + break + endif + endfor + + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + AssertEqual [], ale#test#GetQflistWithoutNewerKeys() + + ALEPopulateLocList + AssertNotEqual 0, get(getloclist(0, {'winid':0}), 'winid', 0) + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() + + ALEPopulateQuickfix + AssertEqual g:expected_loclist, ale#test#GetQflistWithoutNewerKeys() diff --git a/vim-config/plugins/ale/test/test_ale_toggle.vader b/vim-config/plugins/ale/test/test_ale_toggle.vader index 1debcee6..98df3f75 100644 --- a/vim-config/plugins/ale/test/test_ale_toggle.vader +++ b/vim-config/plugins/ale/test/test_ale_toggle.vader @@ -120,7 +120,7 @@ Execute(ALEToggle should reset everything and then run again): call ale#test#FlushJobs() " First check that everything is there... - AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutModule() + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() AssertEqual [0, [[2, 1000001, 'ALEErrorSign']]], ale#sign#FindCurrentSigns(bufnr('%')) " Only check the legacy matches if not using the new NeoVIM API. @@ -138,7 +138,7 @@ Execute(ALEToggle should reset everything and then run again): " Everything should be cleared. Assert !has_key(g:ale_buffer_info, bufnr('')), 'The g:ale_buffer_info Dictionary was not removed' - AssertEqual [], ale#test#GetLoclistWithoutModule(), 'The loclist was not cleared' + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys(), 'The loclist was not cleared' AssertEqual [0, []], ale#sign#FindCurrentSigns(bufnr('%')), 'The signs were not cleared' if !g:has_nvim_highlight @@ -151,7 +151,7 @@ Execute(ALEToggle should reset everything and then run again): ALEToggle call ale#test#FlushJobs() - AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutModule() + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() AssertEqual [0, [[2, 1000001, 'ALEErrorSign']]], ale#sign#FindCurrentSigns(bufnr('%')) if !g:has_nvim_highlight @@ -211,18 +211,18 @@ Execute(ALEDisable should reset everything and stay disabled): ALELint call ale#test#FlushJobs() - AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutModule() + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() ALEDisable call ale#test#FlushJobs() - AssertEqual [], ale#test#GetLoclistWithoutModule() + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() AssertEqual 0, g:ale_enabled ALEDisable call ale#test#FlushJobs() - AssertEqual [], ale#test#GetLoclistWithoutModule() + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() AssertEqual 0, g:ale_enabled Execute(ALEEnable should enable ALE and lint again): @@ -231,7 +231,7 @@ Execute(ALEEnable should enable ALE and lint again): ALEEnable call ale#test#FlushJobs() - AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutModule() + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() AssertEqual 1, g:ale_enabled Execute(ALEReset should reset everything for a buffer): @@ -241,7 +241,7 @@ Execute(ALEReset should reset everything for a buffer): call ale#test#FlushJobs() " First check that everything is there... - AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutModule() + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() AssertEqual [0, [[2, 1000001, 'ALEErrorSign']]], ale#sign#FindCurrentSigns(bufnr('%')) if !g:has_nvim_highlight @@ -258,7 +258,7 @@ Execute(ALEReset should reset everything for a buffer): " Everything should be cleared. Assert !has_key(g:ale_buffer_info, bufnr('')), 'The g:ale_buffer_info Dictionary was not removed' - AssertEqual [], ale#test#GetLoclistWithoutModule(), 'The loclist was not cleared' + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys(), 'The loclist was not cleared' AssertEqual [0, []], ale#sign#FindCurrentSigns(bufnr('%')), 'The signs were not cleared' if !g:has_nvim_highlight @@ -274,7 +274,7 @@ Execute(ALEToggleBuffer should reset everything and then run again): call ale#test#FlushJobs() " First check that everything is there... - AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutModule() + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() AssertEqual [0, [[2, 1000001, 'ALEErrorSign']]], ale#sign#FindCurrentSigns(bufnr('%')) if !g:has_nvim_highlight @@ -290,7 +290,7 @@ Execute(ALEToggleBuffer should reset everything and then run again): " Everything should be cleared. Assert !has_key(g:ale_buffer_info, bufnr('')), 'The g:ale_buffer_info Dictionary was not removed' - AssertEqual [], ale#test#GetLoclistWithoutModule(), 'The loclist was not cleared' + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys(), 'The loclist was not cleared' AssertEqual [0, []], ale#sign#FindCurrentSigns(bufnr('%')), 'The signs were not cleared' if !g:has_nvim_highlight @@ -301,7 +301,7 @@ Execute(ALEToggleBuffer should reset everything and then run again): ALEToggleBuffer call ale#test#FlushJobs() - AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutModule() + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() AssertEqual [0, [[2, 1000001, 'ALEErrorSign']]], ale#sign#FindCurrentSigns(bufnr('%')) if !g:has_nvim_highlight @@ -317,12 +317,12 @@ Execute(ALEDisableBuffer should reset everything and stay disabled): ALELint call ale#test#FlushJobs() - AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutModule() + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() ALEDisableBuffer call ale#test#FlushJobs() - AssertEqual [], ale#test#GetLoclistWithoutModule() + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() AssertEqual 0, b:ale_enabled Execute(ALEEnableBuffer should enable ALE and lint again): @@ -331,7 +331,7 @@ Execute(ALEEnableBuffer should enable ALE and lint again): ALEEnableBuffer call ale#test#FlushJobs() - AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutModule() + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() AssertEqual 1, b:ale_enabled Execute(ALEEnableBuffer should complain when ALE is disabled globally): @@ -342,7 +342,7 @@ Execute(ALEEnableBuffer should complain when ALE is disabled globally): ALEEnableBuffer redir END - AssertEqual [], ale#test#GetLoclistWithoutModule() + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() AssertEqual 0, b:ale_enabled AssertEqual 0, g:ale_enabled AssertEqual @@ -356,7 +356,7 @@ Execute(ALEResetBuffer should reset everything for a buffer): call ale#test#FlushJobs() " First check that everything is there... - AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutModule() + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() AssertEqual [0, [[2, 1000001, 'ALEErrorSign']]], ale#sign#FindCurrentSigns(bufnr('%')) if !g:has_nvim_highlight @@ -373,7 +373,7 @@ Execute(ALEResetBuffer should reset everything for a buffer): " Everything should be cleared. Assert !has_key(g:ale_buffer_info, bufnr('')), 'The g:ale_buffer_info Dictionary was not removed' - AssertEqual [], ale#test#GetLoclistWithoutModule(), 'The loclist was not cleared' + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys(), 'The loclist was not cleared' AssertEqual [0, []], ale#sign#FindCurrentSigns(bufnr('%')), 'The signs were not cleared' if !g:has_nvim_highlight diff --git a/vim-config/plugins/ale/test/test_autocmd_commands.vader b/vim-config/plugins/ale/test/test_autocmd_commands.vader index 2f0a893f..9f42eff1 100644 --- a/vim-config/plugins/ale/test/test_autocmd_commands.vader +++ b/vim-config/plugins/ale/test/test_autocmd_commands.vader @@ -51,7 +51,7 @@ Before: Save g:ale_pattern_options_enabled Save g:ale_hover_cursor - " Turn everything on by defaul for these tests. + " Turn everything on by default for these tests. let g:ale_completion_enabled = 1 let g:ale_echo_cursor = 1 let g:ale_enabled = 1 @@ -118,7 +118,7 @@ Execute (Only the required events should be bound even if various settings are o \ ], \ CheckAutocmd('ALEEvents') -Execute (The cursor hoever event should be enabled with g:ale_hover_cursor = 1): +Execute (The cursor hover event should be enabled with g:ale_hover_cursor = 1): let g:ale_enabled = 1 let g:ale_completion_enabled = 0 let g:ale_echo_cursor = 0 diff --git a/vim-config/plugins/ale/test/test_code_action.vader b/vim-config/plugins/ale/test/test_code_action.vader index c613222c..80e2b1d8 100644 --- a/vim-config/plugins/ale/test/test_code_action.vader +++ b/vim-config/plugins/ale/test/test_code_action.vader @@ -1,4 +1,15 @@ Before: + let g:notified_changes = [] + + runtime autoload/ale/lsp.vim + + function! ale#lsp#NotifyForChanges(conn_id, buffer) abort + call add(g:notified_changes, { + \ 'conn_id': a:conn_id, + \ 'buffer': a:buffer + \}) + endfunction + Save g:ale_enabled let g:ale_enabled = 0 @@ -36,10 +47,10 @@ Before: After: " Close the extra buffers if we opened it. - if bufnr(g:file1) != -1 + if bufnr(g:file1) != -1 && buflisted(bufnr(g:file1)) execute ':bp! | :bd! ' . bufnr(g:file1) endif - if bufnr(g:file2) != -1 + if bufnr(g:file2) != -1 && buflisted(bufnr(g:file2)) execute ':bp! | :bd! ' . bufnr(g:file2) endif @@ -50,12 +61,16 @@ After: call delete(g:file2) endif + unlet! g:notified_changes + " unlet! g:expected_notified_changes unlet! g:file1 unlet! g:file2 unlet! g:test unlet! g:changes delfunction WriteFileAndEdit + runtime autoload/ale/lsp.vim + Restore @@ -118,7 +133,7 @@ Execute(It should modify and save multiple files): \ }] \ }], \ }, - \ {'should_save': 1}, + \ {'should_save': 1, 'conn_id': 'test_conn'}, \) AssertEqual [ @@ -140,6 +155,13 @@ Execute(It should modify and save multiple files): \ '', \], readfile(g:file2, 'b') + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(g:file1), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(g:file2), + \}], g:notified_changes Execute(Beginning of file can be modified): let g:test.text = [ @@ -166,7 +188,7 @@ Execute(Beginning of file can be modified): \ }], \ }] \ }, - \ {'should_save': 1}, + \ {'should_save': 1, 'conn_id': 'test_conn'}, \) AssertEqual [ @@ -174,6 +196,11 @@ Execute(Beginning of file can be modified): \ 'type B: number', \] + g:test.text + [''], readfile(g:file1, 'b') + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(g:file1), + \}], g:notified_changes + Execute(End of file can be modified): let g:test.text = [ @@ -200,7 +227,7 @@ Execute(End of file can be modified): \ }], \ }] \ }, - \ {'should_save': 1}, + \ {'should_save': 1, 'conn_id': 'test_conn'}, \) AssertEqual g:test.text + [ @@ -209,6 +236,11 @@ Execute(End of file can be modified): \ '', \], readfile(g:file1, 'b') + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(g:file1), + \}], g:notified_changes + Execute(Current buffer contents will be reloaded): let g:test.text = [ @@ -238,7 +270,7 @@ Execute(Current buffer contents will be reloaded): \ }], \ }] \ }, - \ {'should_save': 1}, + \ {'should_save': 1, 'conn_id': 'test_conn'}, \) AssertEqual [ @@ -251,6 +283,55 @@ Execute(Current buffer contents will be reloaded): \ 'type B: number', \] + g:test.text, getbufline(g:test.buffer, 1, '$') + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(g:file1), + \}], g:notified_changes + + +Execute(Unlisted buffer contents will be modified correctly): + let g:test.text = [ + \ 'class Name {', + \ ' value: string', + \ '}', + \] + call writefile(g:test.text, g:file1, 'S') + + execute 'edit ' . g:file1 + let g:test.buffer = bufnr(g:file1) + + execute 'bd' + AssertEqual bufnr(g:file1), g:test.buffer + + call ale#code_action#HandleCodeAction( + \ { + \ 'changes': [{ + \ 'fileName': g:file1, + \ 'textChanges': [{ + \ 'start': { + \ 'line': 1, + \ 'offset': 1, + \ }, + \ 'end': { + \ 'line': 1, + \ 'offset': 1, + \ }, + \ 'newText': "type A: string\ntype B: number\n", + \ }], + \ }] + \ }, + \ {'should_save': 1, 'conn_id': 'test_conn'}, + \) + + AssertEqual [ + \ 'type A: string', + \ 'type B: number', + \] + g:test.text + [''], readfile(g:file1, 'b') + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(g:file1), + \}], g:notified_changes # Tests for cursor repositioning. In comments `=` designates change range, and # `C` cursor position @@ -261,13 +342,32 @@ Execute(Cursor will not move when it is before text change): let g:test.changes = g:test.create_change(2, 3, 2, 8, 'value2') call setpos('.', [0, 1, 1, 0]) - call ale#code_action#HandleCodeAction(g:test.changes, {'should_save': 1}) + call ale#code_action#HandleCodeAction(g:test.changes, { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \}) AssertEqual [1, 1], getpos('.')[1:2] + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + call setpos('.', [0, 2, 2, 0]) - call ale#code_action#HandleCodeAction(g:test.changes, {'should_save': 1}) + call ale#code_action#HandleCodeAction(g:test.changes, { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \}) AssertEqual [2, 2], getpos('.')[1:2] + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + # ====C==== Execute(Cursor column will move to the change end when cursor between start/end): let g:test.changes = g:test.create_change(2, 3, 2, 8, 'value2') @@ -276,11 +376,34 @@ Execute(Cursor column will move to the change end when cursor between start/end) call WriteFileAndEdit() call setpos('.', [0, 2, r, 0]) AssertEqual ' value: string', getline('.') - call ale#code_action#HandleCodeAction(g:test.changes, {'should_save': 1}) + call ale#code_action#HandleCodeAction(g:test.changes, { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \}) AssertEqual ' value2: string', getline('.') AssertEqual [2, 9], getpos('.')[1:2] endfor + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + # ====C Execute(Cursor column will move back when new text is shorter): @@ -289,11 +412,18 @@ Execute(Cursor column will move back when new text is shorter): AssertEqual ' value: string', getline('.') call ale#code_action#HandleCodeAction( \ g:test.create_change(2, 3, 2, 8, 'val'), - \ {'should_save': 1}, - \) + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) AssertEqual ' val: string', getline('.') AssertEqual [2, 6], getpos('.')[1:2] + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + # ==== C Execute(Cursor column will move forward when new text is longer): @@ -302,10 +432,19 @@ Execute(Cursor column will move forward when new text is longer): call setpos('.', [0, 2, 8, 0]) AssertEqual ' value: string', getline('.') call ale#code_action#HandleCodeAction( - \ g:test.create_change(2, 3, 2, 8, 'longValue'), {'should_save': 1}) + \ g:test.create_change(2, 3, 2, 8, 'longValue'), + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) AssertEqual ' longValue: string', getline('.') AssertEqual [2, 12], getpos('.')[1:2] + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + # ========= # = # C @@ -314,10 +453,19 @@ Execute(Cursor line will move when updates are happening on lines above): call setpos('.', [0, 3, 1, 0]) AssertEqual '}', getline('.') call ale#code_action#HandleCodeAction( - \ g:test.create_change(1, 1, 2, 1, "test\ntest\n"), {'should_save': 1}) + \ g:test.create_change(1, 1, 2, 1, "test\ntest\n"), + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) AssertEqual '}', getline('.') AssertEqual [4, 1], getpos('.')[1:2] + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + # ========= # =C @@ -326,10 +474,19 @@ Execute(Cursor line and column will move when change on lines above and just bef call setpos('.', [0, 2, 2, 0]) AssertEqual ' value: string', getline('.') call ale#code_action#HandleCodeAction( - \ g:test.create_change(1, 1, 2, 1, "test\ntest\n123"), {'should_save': 1}) + \ g:test.create_change(1, 1, 2, 1, "test\ntest\n123"), + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) AssertEqual '123 value: string', getline('.') AssertEqual [3, 5], getpos('.')[1:2] + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + # ========= # ======C== # = @@ -338,10 +495,19 @@ Execute(Cursor line and column will move at the end of changes): call setpos('.', [0, 2, 10, 0]) AssertEqual ' value: string', getline('.') call ale#code_action#HandleCodeAction( - \ g:test.create_change(1, 1, 3, 1, "test\n"), {'should_save': 1}) + \ g:test.create_change(1, 1, 3, 1, "test\n"), + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) AssertEqual '}', getline('.') AssertEqual [2, 1], getpos('.')[1:2] + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + # C == # === Execute(Cursor will not move when changes happening on lines >= cursor, but after cursor): @@ -349,23 +515,42 @@ Execute(Cursor will not move when changes happening on lines >= cursor, but afte call setpos('.', [0, 2, 3, 0]) AssertEqual ' value: string', getline('.') call ale#code_action#HandleCodeAction( - \ g:test.create_change(2, 10, 3, 1, "number\n"), {'should_save': 1}) + \ g:test.create_change(2, 10, 3, 1, "number\n"), + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) AssertEqual ' value: number', getline('.') AssertEqual [2, 3], getpos('.')[1:2] + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + Execute(Cursor will not move when change covers entire file): call WriteFileAndEdit() call setpos('.', [0, 2, 3, 0]) call ale#code_action#HandleCodeAction( \ g:test.create_change(1, 1, len(g:test.text) + 1, 1, \ join(g:test.text + ['x'], "\n")), - \ {'should_save': 1}) + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) AssertEqual [2, 3], getpos('.')[1:2] + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + Execute(It should just modify file when should_save is set to v:false): call WriteFileAndEdit() let g:test.change = g:test.create_change(1, 1, 1, 1, "import { writeFile } from 'fs';\n") - call ale#code_action#HandleCodeAction(g:test.change, {}) + call ale#code_action#HandleCodeAction(g:test.change, { + \ 'conn_id': 'test_conn', + \}) AssertEqual 1, getbufvar(bufnr(''), '&modified') AssertEqual [ \ 'import { writeFile } from ''fs'';', @@ -374,6 +559,11 @@ Execute(It should just modify file when should_save is set to v:false): \ '}', \], getline(1, '$') + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + Given typescript(An example TypeScript file): type Foo = {} @@ -393,7 +583,14 @@ Execute(): \ {'end': {'offset': 14, 'line': 9}, 'newText': 'foo', 'start': {'offset': 3, 'line': 9}}, \] - call ale#code_action#ApplyChanges(expand('%:p'), g:changes, 0) + call ale#code_action#ApplyChanges(expand('%:p'), g:changes, { + \ 'conn_id': 'test_conn', + \}) + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes Expect(The changes should be applied correctly): type Foo = {} diff --git a/vim-config/plugins/ale/test/test_code_action_corner_cases.vader b/vim-config/plugins/ale/test/test_code_action_corner_cases.vader index c44cf0ea..b5741d43 100644 --- a/vim-config/plugins/ale/test/test_code_action_corner_cases.vader +++ b/vim-config/plugins/ale/test/test_code_action_corner_cases.vader @@ -34,20 +34,24 @@ Before: Save &fileformats set fileformats=unix - " two files, one accessed through a buffer, the other using write/readfile only - let g:files = [tempname(), tempname()] - - function! TestChanges(contents, changes, mode) abort - let l:file = g:files[a:mode is 'file' ? 0 : 1] - call writefile(split(a:contents, '\n', 1), l:file, 'bS') - if a:mode isnot 'file' - execute 'edit ' . l:file - endif - call ale#code_action#ApplyChanges(l:file, a:changes, a:mode isnot 'buffer') - if a:mode is 'buffer' - execute 'write ' . l:file - endif - return join(readfile(l:file, 'b'), "\n") + function! TestChanges(contents, changes) abort + let l:file = tempname() + + try + call writefile(split(a:contents, '\n', 1), l:file, 'bs') + + call ale#code_action#ApplyChanges(l:file, a:changes, { + \ 'should_save': 1, + \}) + + let l:result = join(readfile(l:file, 'b'), "\n") + finally + if filereadable(l:file) + call delete(l:file) + endif + endtry + + return l:result endfunction! function! MkPos(line, offset) abort @@ -63,18 +67,6 @@ Before: endfunction! After: - for g:file in g:files - if bufnr(g:file) != -1 - execute ':bp! | :bd! ' . bufnr(g:file) - endif - if filereadable(g:file) - call delete(g:file) - endif - endfor - unlet! g:files g:file - - unlet! g:mode - delfunction TestChanges delfunction MkPos delfunction MkInsert @@ -83,97 +75,67 @@ After: Restore Execute(Preserve (no)eol at eof): - for g:mode in ['save', 'file', 'buffer'] - Log g:mode - AssertEqual "noeol", TestChanges("noeol", [], g:mode) - AssertEqual "eol\n", TestChanges("eol\n", [], g:mode) - AssertEqual "eols\n\n", TestChanges("eols\n\n", [], g:mode) - endfor - - " there doesn't seem to be a way to tell if a buffer is empty or contains one - " empty line :-( - AssertEqual "", TestChanges("", [], 'file') + AssertEqual "noeol", TestChanges("noeol", []) + AssertEqual "eol\n", TestChanges("eol\n", []) + AssertEqual "eols\n\n", TestChanges("eols\n\n", []) Execute(Respect fixeol): set fixeol - for g:mode in ['save', 'file', 'buffer'] - Log g:mode - silent echo "vscode skip" | AssertEqual "noeol\n", TestChanges("noeol", [], g:mode) - silent echo "vscode skip" | AssertEqual "eol\n", TestChanges("eol\n", [], g:mode) - endfor + + silent echo "vscode skip" | AssertEqual "noeol\n", TestChanges("noeol", []) + silent echo "vscode skip" | AssertEqual "eol\n", TestChanges("eol\n", []) Execute(Add/del eol at eof): - for g:mode in ['save', 'file', 'buffer'] - Log g:mode - AssertEqual "addeol\n", TestChanges("addeol", [MkInsert(MkPos(1, 7), "\n")], g:mode) - AssertEqual "deleol", TestChanges("deleol\n", [MkDelete(MkPos(1, 7), MkPos(1, 8))], g:mode) - endfor + AssertEqual "addeol\n", TestChanges("addeol", [MkInsert(MkPos(1, 7), "\n")]) + AssertEqual "deleol", TestChanges("deleol\n", [MkDelete(MkPos(1, 7), MkPos(1, 8))]) Execute(One character insertions to first line): - for g:mode in ['save', 'file', 'buffer'] - Log g:mode - AssertEqual "xabc\ndef1\nghi\n", TestChanges("abc\ndef1\nghi\n", [MkInsert(MkPos(1, 0), "x")], g:mode) - AssertEqual "xabc\ndef2\nghi\n", TestChanges("abc\ndef2\nghi\n", [MkInsert(MkPos(1, 1), "x")], g:mode) - AssertEqual "axbc\ndef3\nghi\n", TestChanges("abc\ndef3\nghi\n", [MkInsert(MkPos(1, 2), "x")], g:mode) - AssertEqual "abcx\ndef4\nghi\n", TestChanges("abc\ndef4\nghi\n", [MkInsert(MkPos(1, 4), "x")], g:mode) - AssertEqual "abc\nxdef5\nghi\n", TestChanges("abc\ndef5\nghi\n", [MkInsert(MkPos(1, 5), "x")], g:mode) - AssertEqual "abc\nxdef6\nghi\n", TestChanges("abc\ndef6\nghi\n", [MkInsert(MkPos(1, 6), "x")], g:mode) - endfor + AssertEqual "xabc\ndef1\nghi\n", TestChanges("abc\ndef1\nghi\n", [MkInsert(MkPos(1, 0), "x")]) + AssertEqual "xabc\ndef2\nghi\n", TestChanges("abc\ndef2\nghi\n", [MkInsert(MkPos(1, 1), "x")]) + AssertEqual "axbc\ndef3\nghi\n", TestChanges("abc\ndef3\nghi\n", [MkInsert(MkPos(1, 2), "x")]) + AssertEqual "abcx\ndef4\nghi\n", TestChanges("abc\ndef4\nghi\n", [MkInsert(MkPos(1, 4), "x")]) + AssertEqual "abc\nxdef5\nghi\n", TestChanges("abc\ndef5\nghi\n", [MkInsert(MkPos(1, 5), "x")]) + AssertEqual "abc\nxdef6\nghi\n", TestChanges("abc\ndef6\nghi\n", [MkInsert(MkPos(1, 6), "x")]) Execute(One character + newline insertions to first line): - for g:mode in ['save', 'file', 'buffer'] - Log g:mode - AssertEqual "x\nabc\ndef1\nghi\n", TestChanges("abc\ndef1\nghi\n", [MkInsert(MkPos(1, 0), "x\n")], g:mode) - AssertEqual "x\nabc\ndef2\nghi\n", TestChanges("abc\ndef2\nghi\n", [MkInsert(MkPos(1, 1), "x\n")], g:mode) - AssertEqual "ax\nbc\ndef3\nghi\n", TestChanges("abc\ndef3\nghi\n", [MkInsert(MkPos(1, 2), "x\n")], g:mode) - AssertEqual "abcx\n\ndef4\nghi\n", TestChanges("abc\ndef4\nghi\n", [MkInsert(MkPos(1, 4), "x\n")], g:mode) - AssertEqual "abc\nx\ndef5\nghi\n", TestChanges("abc\ndef5\nghi\n", [MkInsert(MkPos(1, 5), "x\n")], g:mode) - AssertEqual "abc\nx\ndef6\nghi\n", TestChanges("abc\ndef6\nghi\n", [MkInsert(MkPos(1, 6), "x\n")], g:mode) - endfor + AssertEqual "x\nabc\ndef1\nghi\n", TestChanges("abc\ndef1\nghi\n", [MkInsert(MkPos(1, 0), "x\n")]) + AssertEqual "x\nabc\ndef2\nghi\n", TestChanges("abc\ndef2\nghi\n", [MkInsert(MkPos(1, 1), "x\n")]) + AssertEqual "ax\nbc\ndef3\nghi\n", TestChanges("abc\ndef3\nghi\n", [MkInsert(MkPos(1, 2), "x\n")]) + AssertEqual "abcx\n\ndef4\nghi\n", TestChanges("abc\ndef4\nghi\n", [MkInsert(MkPos(1, 4), "x\n")]) + AssertEqual "abc\nx\ndef5\nghi\n", TestChanges("abc\ndef5\nghi\n", [MkInsert(MkPos(1, 5), "x\n")]) + AssertEqual "abc\nx\ndef6\nghi\n", TestChanges("abc\ndef6\nghi\n", [MkInsert(MkPos(1, 6), "x\n")]) Execute(One character insertions near end): - for g:mode in ['save', 'file', 'buffer'] - Log g:mode - AssertEqual "abc\ndef1\nghxi\n", TestChanges("abc\ndef1\nghi\n", [MkInsert(MkPos(3, 3), "x")], g:mode) - AssertEqual "abc\ndef2\nghix\n", TestChanges("abc\ndef2\nghi\n", [MkInsert(MkPos(3, 4), "x")], g:mode) - AssertEqual "abc\ndef3\nghi\nx", TestChanges("abc\ndef3\nghi\n", [MkInsert(MkPos(3, 5), "x")], g:mode) - AssertEqual "abc\ndef4\nghi\nx", TestChanges("abc\ndef4\nghi\n", [MkInsert(MkPos(3, 6), "x")], g:mode) - AssertEqual "abc\ndef5\nghi\nx", TestChanges("abc\ndef5\nghi\n", [MkInsert(MkPos(4, 1), "x")], g:mode) - AssertEqual "abc\ndef6\nghi\nx", TestChanges("abc\ndef6\nghi\n", [MkInsert(MkPos(4, 2), "x")], g:mode) - AssertEqual "abc\ndef7\nghi\nx", TestChanges("abc\ndef7\nghi\n", [MkInsert(MkPos(5, 1), "x")], g:mode) - AssertEqual "abc\ndef8\nghi\nx", TestChanges("abc\ndef8\nghi\n", [MkInsert(MkPos(5, 2), "x")], g:mode) - endfor + AssertEqual "abc\ndef1\nghxi\n", TestChanges("abc\ndef1\nghi\n", [MkInsert(MkPos(3, 3), "x")]) + AssertEqual "abc\ndef2\nghix\n", TestChanges("abc\ndef2\nghi\n", [MkInsert(MkPos(3, 4), "x")]) + AssertEqual "abc\ndef3\nghi\nx", TestChanges("abc\ndef3\nghi\n", [MkInsert(MkPos(3, 5), "x")]) + AssertEqual "abc\ndef4\nghi\nx", TestChanges("abc\ndef4\nghi\n", [MkInsert(MkPos(3, 6), "x")]) + AssertEqual "abc\ndef5\nghi\nx", TestChanges("abc\ndef5\nghi\n", [MkInsert(MkPos(4, 1), "x")]) + AssertEqual "abc\ndef6\nghi\nx", TestChanges("abc\ndef6\nghi\n", [MkInsert(MkPos(4, 2), "x")]) + AssertEqual "abc\ndef7\nghi\nx", TestChanges("abc\ndef7\nghi\n", [MkInsert(MkPos(5, 1), "x")]) + AssertEqual "abc\ndef8\nghi\nx", TestChanges("abc\ndef8\nghi\n", [MkInsert(MkPos(5, 2), "x")]) Execute(One character + newline insertions near end): - for g:mode in ['save', 'file', 'buffer'] - Log g:mode - AssertEqual "abc\ndef1\nghx\ni\n", TestChanges("abc\ndef1\nghi\n", [MkInsert(MkPos(3, 3), "x\n")], g:mode) - AssertEqual "abc\ndef2\nghix\n\n", TestChanges("abc\ndef2\nghi\n", [MkInsert(MkPos(3, 4), "x\n")], g:mode) - AssertEqual "abc\ndef3\nghi\nx\n", TestChanges("abc\ndef3\nghi\n", [MkInsert(MkPos(3, 5), "x\n")], g:mode) - AssertEqual "abc\ndef4\nghi\nx\n", TestChanges("abc\ndef4\nghi\n", [MkInsert(MkPos(3, 6), "x\n")], g:mode) - AssertEqual "abc\ndef5\nghi\nx\n", TestChanges("abc\ndef5\nghi\n", [MkInsert(MkPos(4, 1), "x\n")], g:mode) - AssertEqual "abc\ndef6\nghi\nx\n", TestChanges("abc\ndef6\nghi\n", [MkInsert(MkPos(4, 2), "x\n")], g:mode) - endfor + AssertEqual "abc\ndef1\nghx\ni\n", TestChanges("abc\ndef1\nghi\n", [MkInsert(MkPos(3, 3), "x\n")]) + AssertEqual "abc\ndef2\nghix\n\n", TestChanges("abc\ndef2\nghi\n", [MkInsert(MkPos(3, 4), "x\n")]) + AssertEqual "abc\ndef3\nghi\nx\n", TestChanges("abc\ndef3\nghi\n", [MkInsert(MkPos(3, 5), "x\n")]) + AssertEqual "abc\ndef4\nghi\nx\n", TestChanges("abc\ndef4\nghi\n", [MkInsert(MkPos(3, 6), "x\n")]) + AssertEqual "abc\ndef5\nghi\nx\n", TestChanges("abc\ndef5\nghi\n", [MkInsert(MkPos(4, 1), "x\n")]) + AssertEqual "abc\ndef6\nghi\nx\n", TestChanges("abc\ndef6\nghi\n", [MkInsert(MkPos(4, 2), "x\n")]) Execute(Newline insertions near end): - for g:mode in ['save', 'file', 'buffer'] - Log g:mode - AssertEqual "abc\ndef1\ngh\ni\n", TestChanges("abc\ndef1\nghi\n", [MkInsert(MkPos(3, 3), "\n")], g:mode) - AssertEqual "abc\ndef2\nghi\n\n", TestChanges("abc\ndef2\nghi\n", [MkInsert(MkPos(3, 4), "\n")], g:mode) - AssertEqual "abc\ndef3\nghi\n\n", TestChanges("abc\ndef3\nghi\n", [MkInsert(MkPos(3, 5), "\n")], g:mode) - AssertEqual "abc\ndef4\nghi\n\n", TestChanges("abc\ndef4\nghi\n", [MkInsert(MkPos(3, 6), "\n")], g:mode) - AssertEqual "abc\ndef5\nghi\n\n", TestChanges("abc\ndef5\nghi\n", [MkInsert(MkPos(4, 1), "\n")], g:mode) - endfor + AssertEqual "abc\ndef1\ngh\ni\n", TestChanges("abc\ndef1\nghi\n", [MkInsert(MkPos(3, 3), "\n")]) + AssertEqual "abc\ndef2\nghi\n\n", TestChanges("abc\ndef2\nghi\n", [MkInsert(MkPos(3, 4), "\n")]) + AssertEqual "abc\ndef3\nghi\n\n", TestChanges("abc\ndef3\nghi\n", [MkInsert(MkPos(3, 5), "\n")]) + AssertEqual "abc\ndef4\nghi\n\n", TestChanges("abc\ndef4\nghi\n", [MkInsert(MkPos(3, 6), "\n")]) + AssertEqual "abc\ndef5\nghi\n\n", TestChanges("abc\ndef5\nghi\n", [MkInsert(MkPos(4, 1), "\n")]) Execute(Single char deletions): - for g:mode in ['save', 'file', 'buffer'] - Log g:mode - AssertEqual "bc\ndef1\nghi\n", TestChanges("abc\ndef1\nghi\n", [MkDelete(MkPos(1, 1), MkPos(1, 2))], g:mode) - AssertEqual "ab\ndef2\nghi\n", TestChanges("abc\ndef2\nghi\n", [MkDelete(MkPos(1, 3), MkPos(1, 4))], g:mode) - AssertEqual "abcdef3\nghi\n", TestChanges("abc\ndef3\nghi\n", [MkDelete(MkPos(1, 4), MkPos(1, 5))], g:mode) - AssertEqual "abcdef4\nghi\n", TestChanges("abc\ndef4\nghi\n", [MkDelete(MkPos(1, 4), MkPos(1, 6))], g:mode) - AssertEqual "abc\ndef5\ngh\n", TestChanges("abc\ndef5\nghi\n", [MkDelete(MkPos(3, 3), MkPos(3, 4))], g:mode) - AssertEqual "abc\ndef6\nghi", TestChanges("abc\ndef6\nghi\n", [MkDelete(MkPos(3, 4), MkPos(3, 5))], g:mode) - AssertEqual "abc\ndef7\nghi", TestChanges("abc\ndef7\nghi\n", [MkDelete(MkPos(3, 4), MkPos(3, 6))], g:mode) - AssertEqual "abc\ndef8\nghi\n", TestChanges("abc\ndef8\nghi\n", [MkDelete(MkPos(4, 1), MkPos(4, 2))], g:mode) - endfor + AssertEqual "bc\ndef1\nghi\n", TestChanges("abc\ndef1\nghi\n", [MkDelete(MkPos(1, 1), MkPos(1, 2))]) + AssertEqual "ab\ndef2\nghi\n", TestChanges("abc\ndef2\nghi\n", [MkDelete(MkPos(1, 3), MkPos(1, 4))]) + AssertEqual "abcdef3\nghi\n", TestChanges("abc\ndef3\nghi\n", [MkDelete(MkPos(1, 4), MkPos(1, 5))]) + AssertEqual "abcdef4\nghi\n", TestChanges("abc\ndef4\nghi\n", [MkDelete(MkPos(1, 4), MkPos(1, 6))]) + AssertEqual "abc\ndef5\ngh\n", TestChanges("abc\ndef5\nghi\n", [MkDelete(MkPos(3, 3), MkPos(3, 4))]) + AssertEqual "abc\ndef6\nghi", TestChanges("abc\ndef6\nghi\n", [MkDelete(MkPos(3, 4), MkPos(3, 5))]) + AssertEqual "abc\ndef7\nghi", TestChanges("abc\ndef7\nghi\n", [MkDelete(MkPos(3, 4), MkPos(3, 6))]) + AssertEqual "abc\ndef8\nghi\n", TestChanges("abc\ndef8\nghi\n", [MkDelete(MkPos(4, 1), MkPos(4, 2))]) diff --git a/vim-config/plugins/ale/test/test_code_action_python.vader b/vim-config/plugins/ale/test/test_code_action_python.vader index 2aac1ec7..3c784816 100644 --- a/vim-config/plugins/ale/test/test_code_action_python.vader +++ b/vim-config/plugins/ale/test/test_code_action_python.vader @@ -10,7 +10,7 @@ Execute(): \ {'end': {'offset': 15, 'line': 3}, 'newText': " return c\n\n\ndef main():\n c = func_qtffgsvi()\n", 'start': {'offset': 15, 'line': 3}} \] - call ale#code_action#ApplyChanges(expand('%:p'), g:changes, 0) + call ale#code_action#ApplyChanges(expand('%:p'), g:changes, {}) Expect(The changes should be applied correctly): def func_qtffgsvi(): @@ -40,7 +40,7 @@ Execute(): \ {'end': {'offset': 42, 'line': 8}, 'newText': "ivlpdpao(f)\n", 'start': {'offset': 33, 'line': 6}} \] - call ale#code_action#ApplyChanges(expand('%:p'), g:changes, 0) + call ale#code_action#ApplyChanges(expand('%:p'), g:changes, {}) Expect(The changes should be applied correctly): import sys diff --git a/vim-config/plugins/ale/test/test_codefix.vader b/vim-config/plugins/ale/test/test_codefix.vader index 88a3676c..2d6d215b 100644 --- a/vim-config/plugins/ale/test/test_codefix.vader +++ b/vim-config/plugins/ale/test/test_codefix.vader @@ -511,7 +511,7 @@ Execute(LSP code action requests should be sent): \ 'diagnostics': [{'range': {'end': {'character': 6, 'line': 1}, 'start': {'character': 4, 'line': 1}}, 'code': 2304, 'message': 'oops'}] \ }, \ 'range': {'end': {'character': 5, 'line': 1}, 'start': {'character': 4, 'line': 1}}, - \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))} + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))} \ }] \ ], \ g:message_list[-1:] @@ -543,7 +543,7 @@ Execute(LSP code action requests should be sent only for error with code): \ 'diagnostics': [{'range': {'end': {'character': 6, 'line': 1}, 'start': {'character': 4, 'line': 1}}, 'code': 2304, 'message': 'oops'}] \ }, \ 'range': {'end': {'character': 5, 'line': 1}, 'start': {'character': 4, 'line': 1}}, - \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))} + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))} \ }] \ ], \ g:message_list[-1:] diff --git a/vim-config/plugins/ale/test/test_computed_lint_file_values.vader b/vim-config/plugins/ale/test/test_computed_lint_file_values.vader index ed0d4c0c..6c3d209d 100644 --- a/vim-config/plugins/ale/test/test_computed_lint_file_values.vader +++ b/vim-config/plugins/ale/test/test_computed_lint_file_values.vader @@ -125,13 +125,13 @@ Execute(lint_file results where the result is eventually computed should be run) \ 'valid': 1, \ }, \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() Execute(Linters where lint_file eventually evaluates to 1 shouldn't be run if we don't want to run them): call ale#Queue(0, '') call ale#test#FlushJobs() - AssertEqual [], ale#test#GetLoclistWithoutModule() + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() Execute(Keeping computed lint_file jobs running should work): AssertEqual 'testlinter2', ale#linter#Get('foobar')[1].name diff --git a/vim-config/plugins/ale/test/test_cursor_warnings.vader b/vim-config/plugins/ale/test/test_cursor_warnings.vader index ef385061..7aac7740 100644 --- a/vim-config/plugins/ale/test/test_cursor_warnings.vader +++ b/vim-config/plugins/ale/test/test_cursor_warnings.vader @@ -85,14 +85,12 @@ Before: let g:ale_set_highlights = 0 let g:ale_echo_cursor = 1 - function GetLastMessage() - redir => l:output - silent mess - redir END + runtime autoload/ale/cursor.vim - let l:lines = split(l:output, "\n") + let g:last_message = '' - return empty(l:lines) ? '' : l:lines[-1] + function! ale#cursor#Echom(message) abort + let g:last_message = a:message endfunction call ale#linter#Reset() @@ -101,6 +99,10 @@ Before: After: Restore + unlet! g:last_message + + runtime autoload/ale/cursor.vim + call cursor(1, 1) let g:ale_set_loclist = 1 @@ -112,8 +114,6 @@ After: unlet! g:output unlet! b:ale_loclist_msg_format - delfunction GetLastMessage - " Clearing the messages breaks tests on NeoVim for some reason, but all " we need to do for these tests is just make it so the last message isn't " carried over between test cases. @@ -129,25 +129,25 @@ After: Given javascript(A Javscript file with warnings/errors): var x = 3 + 12345678 var x = 5*2 + parseInt("10"); - // comment + //" comment Execute(Messages should be shown for the correct lines): call cursor(1, 1) call ale#cursor#EchoCursorWarning() - AssertEqual 'semi: Missing semicolon.', GetLastMessage() + AssertEqual 'semi: Missing semicolon.', g:last_message Execute(Messages should be shown for earlier columns): call cursor(2, 1) call ale#cursor#EchoCursorWarning() - AssertEqual 'space-infix-ops: Infix operators must be spaced.', GetLastMessage() + AssertEqual 'space-infix-ops: Infix operators must be spaced.', g:last_message Execute(Messages should be shown for later columns): call cursor(2, 16) call ale#cursor#EchoCursorWarning() - AssertEqual 'radix: Missing radix parameter', GetLastMessage() + AssertEqual 'radix: Missing radix parameter', g:last_message Execute(The message at the cursor should be shown when linting ends): call cursor(1, 1) @@ -156,13 +156,13 @@ Execute(The message at the cursor should be shown when linting ends): \ g:ale_buffer_info[bufnr('%')].loclist, \) - AssertEqual 'semi: Missing semicolon.', GetLastMessage() + AssertEqual 'semi: Missing semicolon.', g:last_message Execute(The message at the cursor should be shown on InsertLeave): call cursor(2, 9) doautocmd InsertLeave - AssertEqual 'space-infix-ops: Infix operators must be spaced.', GetLastMessage() + AssertEqual 'space-infix-ops: Infix operators must be spaced.', g:last_message Execute(ALEDetail should print 'detail' attributes): call cursor(1, 1) @@ -187,7 +187,7 @@ Execute(ALEDetail should not capitlise cursor messages): call cursor(3, 1) call ale#cursor#EchoCursorWarning() - AssertEqual 'lowercase error', GetLastMessage() + AssertEqual 'lowercase error', g:last_message Execute(The linter name should be formatted into the message correctly): let g:ale_echo_msg_format = '%linter%: %s' @@ -197,7 +197,7 @@ Execute(The linter name should be formatted into the message correctly): AssertEqual \ 'bettercode: Infix operators must be spaced.', - \ GetLastMessage() + \ g:last_message Execute(The severity should be formatted into the message correctly): let g:ale_echo_msg_format = '%severity%: %s' @@ -207,17 +207,37 @@ Execute(The severity should be formatted into the message correctly): AssertEqual \ 'Warning: Infix operators must be spaced.', - \ GetLastMessage() + \ g:last_message + + call cursor(1, 10) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'Error: Missing semicolon.', g:last_message + + call cursor(1, 14) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'Info: Some information', g:last_message + +Execute(The type should be formatted into the message correctly): + let g:ale_echo_msg_format = '%type%: %s' + + call cursor(2, 9) + call ale#cursor#EchoCursorWarning() + + AssertEqual + \ 'W: Infix operators must be spaced.', + \ g:last_message call cursor(1, 10) call ale#cursor#EchoCursorWarning() - AssertEqual 'Error: Missing semicolon.', GetLastMessage() + AssertEqual 'E: Missing semicolon.', g:last_message call cursor(1, 14) call ale#cursor#EchoCursorWarning() - AssertEqual 'Info: Some information', GetLastMessage() + AssertEqual 'I: Some information', g:last_message Execute(The %code% and %ifcode% should show the code and some text): let g:ale_echo_msg_format = '%(code) %%s' @@ -227,7 +247,7 @@ Execute(The %code% and %ifcode% should show the code and some text): AssertEqual \ '(space-infix-ops) Infix operators must be spaced.', - \ GetLastMessage() + \ g:last_message Execute(The %code% and %ifcode% should be removed when there's no code): let g:ale_echo_msg_format = '%(code) %%s' @@ -235,7 +255,7 @@ Execute(The %code% and %ifcode% should be removed when there's no code): call cursor(1, 14) call ale#cursor#EchoCursorWarning() - AssertEqual 'Some information', GetLastMessage() + AssertEqual 'Some information', g:last_message Execute(The buffer message format option should take precedence): let g:ale_echo_msg_format = '%(code) %%s' @@ -244,13 +264,13 @@ Execute(The buffer message format option should take precedence): call cursor(1, 14) call ale#cursor#EchoCursorWarning() - AssertEqual 'FOO Some information', GetLastMessage() + AssertEqual 'FOO Some information', g:last_message Execute(The cursor message shouldn't be echoed if the option is off): let g:ale_echo_cursor = 0 - echom 'foo' + let g:last_message = 'foo' call cursor(1, 1) call ale#cursor#EchoCursorWarning() - AssertEqual 'foo', GetLastMessage() + AssertEqual 'foo', g:last_message diff --git a/vim-config/plugins/ale/test/test_dockerfile_hadolint_linter.vader b/vim-config/plugins/ale/test/test_dockerfile_hadolint_linter.vader index 6e02b212..ba7e2187 100644 --- a/vim-config/plugins/ale/test/test_dockerfile_hadolint_linter.vader +++ b/vim-config/plugins/ale/test/test_dockerfile_hadolint_linter.vader @@ -19,6 +19,7 @@ After: Restore silent! unlet b:ale_dockerfile_hadolint_use_docker silent! unlet b:ale_dockerfile_hadolint_docker_image + silent! unlet b:ale_dockerfile_hadolint_options Execute(linter honors ..._use_docker correctly): @@ -55,15 +56,30 @@ Execute(command is correct when using docker): let b:ale_dockerfile_hadolint_use_docker = 'always' AssertEqual - \ "docker run --rm -i hadolint/hadolint hadolint --no-color -", + \ "docker run --rm -i hadolint/hadolint hadolint --no-color -", \ ale_linters#dockerfile#hadolint#GetCommand(bufnr('')) +Execute(command is correct when using docker and supplying options): + let b:ale_dockerfile_hadolint_use_docker = 'always' + let b:ale_dockerfile_hadolint_options = '--ignore DL3006' + + AssertEqual + \ "docker run --rm -i hadolint/hadolint hadolint --ignore DL3006 --no-color -", + \ ale_linters#dockerfile#hadolint#GetCommand(bufnr('')) Execute(command is correct when not docker): let b:ale_dockerfile_hadolint_use_docker = 'never' AssertEqual - \ "hadolint --no-color -", + \ "hadolint --no-color -", + \ ale_linters#dockerfile#hadolint#GetCommand(bufnr('')) + +Execute(command is correct when not docker and supplying options): + let b:ale_dockerfile_hadolint_use_docker = 'never' + let b:ale_dockerfile_hadolint_options = '--ignore DL3006' + + AssertEqual + \ "hadolint --ignore DL3006 --no-color -", \ ale_linters#dockerfile#hadolint#GetCommand(bufnr('')) Execute(test warnings from hadolint): diff --git a/vim-config/plugins/ale/test/test_errors_removed_after_filetype_changed.vader b/vim-config/plugins/ale/test/test_errors_removed_after_filetype_changed.vader index 7ad97f94..7c6c55af 100644 --- a/vim-config/plugins/ale/test/test_errors_removed_after_filetype_changed.vader +++ b/vim-config/plugins/ale/test/test_errors_removed_after_filetype_changed.vader @@ -58,7 +58,7 @@ Execute(Error should be removed when the filetype changes to something else we c call ale#test#FlushJobs() sleep 1ms - AssertEqual 1, len(ale#test#GetLoclistWithoutModule()) + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()) noautocmd let &filetype = 'foobar2' @@ -67,7 +67,7 @@ Execute(Error should be removed when the filetype changes to something else we c sleep 1ms " We should get some items from the second filetype. - AssertEqual 1, len(ale#test#GetLoclistWithoutModule()) + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()) noautocmd let &filetype = 'xxx' @@ -75,4 +75,4 @@ Execute(Error should be removed when the filetype changes to something else we c call ale#test#FlushJobs() sleep 1ms - AssertEqual 0, len(ale#test#GetLoclistWithoutModule()) + AssertEqual 0, len(ale#test#GetLoclistWithoutNewerKeys()) diff --git a/vim-config/plugins/ale/test/test_filerename.vader b/vim-config/plugins/ale/test/test_filerename.vader new file mode 100644 index 00000000..c91b3556 --- /dev/null +++ b/vim-config/plugins/ale/test/test_filerename.vader @@ -0,0 +1,224 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + call ale#test#SetFilename('dummy.txt') + + let g:old_filename = expand('%:p') + let g:Callback = '' + let g:expr_list = [] + let g:message_list = [] + let g:handle_code_action_called = 0 + let g:code_actions = [] + let g:options = {} + let g:capability_checked = '' + let g:conn_id = v:null + let g:InitCallback = v:null + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/filerename.vim + runtime autoload/ale/code_action.vim + + function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {}) + call ale#lsp#MarkDocumentAsOpen(g:conn_id, a:buffer) + + if a:linter.lsp is# 'tsserver' + call ale#lsp#MarkConnectionAsTsserver(g:conn_id) + endif + + let l:details = { + \ 'command': 'foobar', + \ 'buffer': a:buffer, + \ 'connection_id': g:conn_id, + \ 'project_root': '/foo/bar', + \} + + let g:InitCallback = {-> ale#lsp_linter#OnInit(a:linter, l:details, a:Callback)} + endfunction + + function! ale#lsp#HasCapability(conn_id, capability) abort + let g:capability_checked = a:capability + + return 1 + endfunction + + function! ale#lsp#RegisterCallback(conn_id, callback) abort + let g:Callback = a:callback + endfunction + + function! ale#lsp#Send(conn_id, message) abort + call add(g:message_list, a:message) + + return 42 + endfunction + + function! ale#util#Execute(expr) abort + call add(g:expr_list, a:expr) + endfunction + + function! ale#code_action#HandleCodeAction(code_action, options) abort + let g:handle_code_action_called = 1 + Assert get(a:options, 'should_save') + call add(g:code_actions, a:code_action) + endfunction + + function! ale#util#Input(message, value, completion) abort + return 'a-new-name' + endfunction + + call ale#filerename#SetMap({ + \ 3: { + \ 'old_name': 'oldName', + \ 'new_name': 'aNewName', + \ }, + \}) + +After: + if g:conn_id isnot v:null + call ale#lsp#RemoveConnectionWithID(g:conn_id) + endif + + call ale#filerename#SetMap({}) + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + unlet! g:capability_checked + unlet! g:InitCallback + unlet! g:old_filename + unlet! g:conn_id + unlet! g:Callback + unlet! g:message_list + unlet! g:expr_list + unlet! b:ale_linters + unlet! g:options + unlet! g:code_actions + unlet! g:handle_code_action_called + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/filerename.vim + runtime autoload/ale/code_action.vim + +Execute(Other messages for the tsserver handler should be ignored): + call ale#filerename#HandleTSServerResponse(1, {'command': 'foo'}) + AssertEqual g:handle_code_action_called, 0 + +Execute(Failed file rename responses should be handled correctly): + call ale#filerename#SetMap({3: {'old_name': 'oldName', 'new_name': 'a-test'}}) + call ale#filerename#HandleTSServerResponse( + \ 1, + \ {'command': 'getEditsForFileRename', 'request_seq': 3} + \) + AssertEqual g:handle_code_action_called, 0 + +Given typescript(Some typescript file): + foo + somelongerline + bazxyzxyzxyz + +Execute(Code actions from tsserver should be handled): + call ale#filerename#HandleTSServerResponse(1, { + \ 'command': 'getEditsForFileRename', + \ 'seq': 0, + \ 'request_seq': 3, + \ 'type': 'response', + \ 'success': v:true, + \ 'body': [ + \ { + \ 'fileName': '/foo/bar/file1.tsx', + \ 'textChanges': [ + \ { + \ 'end': {'offset': 55, 'line': 22}, + \ 'newText': './file2', + \ 'start': {'offset': 34, 'line': 22}, + \ } + \ ] + \ } + \ ], + \}) + + AssertEqual + \ [ + \ { + \ 'description': 'filerename', + \ 'changes': [ + \ { + \ 'fileName': '/foo/bar/file1.tsx', + \ 'textChanges': [ + \ { + \ 'end': {'offset': 55, 'line': 22}, + \ 'newText': './file2', + \ 'start': {'offset': 34, 'line': 22}, + \ } + \ ] + \ } + \ ], + \ } + \ ], + \ g:code_actions + +Execute(HandleTSServerResponse does nothing when no data in filerename_map): + call ale#filerename#HandleTSServerResponse(1, { + \ 'command': 'getEditsForFileRename', + \ 'request_seq': -9, + \ 'success': v:true, + \ 'body': {} + \}) + + AssertEqual g:handle_code_action_called, 0 + +Execute(Prints a tsserver error message when unsuccessful): + call ale#filerename#HandleTSServerResponse(1, { + \ 'command': 'getEditsForFileRename', + \ 'request_seq': 3, + \ 'success': v:false, + \ 'message': 'This file cannot be renamed', + \}) + + AssertEqual g:handle_code_action_called, 0 + AssertEqual ['echom ''Error renaming file "oldName" to "aNewName". ' . + \ 'Reason: This file cannot be renamed'''], g:expr_list + +Execute(Does nothing when no changes): + call ale#filerename#HandleTSServerResponse(1, { + \ 'command': 'getEditsForFileRename', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': [], + \}) + + AssertEqual g:handle_code_action_called, 0 + AssertEqual ['echom ''No changes while renaming "oldName" to "aNewName"'''], g:expr_list + +Execute(tsserver file rename requests should be sent): + call ale#filerename#SetMap({}) + call ale#linter#Reset() + + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEFileRename + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'filerename', g:capability_checked + AssertEqual + \ 'function(''ale#filerename#HandleTSServerResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@getEditsForFileRename', { + \ 'oldFilePath': expand('%:p'), + \ 'newFilePath': 'a-new-name', + \ }] + \ ], + \ g:message_list + AssertEqual {'42': {'old_name': expand('%:p'), 'new_name': 'a-new-name'}}, + \ ale#filerename#GetMap() diff --git a/vim-config/plugins/ale/test/test_filetype_linter_defaults.vader b/vim-config/plugins/ale/test/test_filetype_linter_defaults.vader index 563a093f..ca73a8e5 100644 --- a/vim-config/plugins/ale/test/test_filetype_linter_defaults.vader +++ b/vim-config/plugins/ale/test/test_filetype_linter_defaults.vader @@ -6,7 +6,7 @@ Before: let g:ale_linters = {} function! GetLinterNames(filetype) abort - return map(ale#linter#Get(a:filetype), 'v:val.name') + return sort(map(ale#linter#Get(a:filetype), 'v:val.name')) endfunction After: @@ -14,6 +14,13 @@ After: call ale#linter#Reset() +Execute(The defaults for the apkbuild filetype should be correct): + AssertEqual ['apkbuild_lint', 'secfixes_check'], GetLinterNames('apkbuild') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('apkbuild') + Execute(The defaults for the csh filetype should be correct): AssertEqual ['shell'], GetLinterNames('csh') @@ -21,6 +28,13 @@ Execute(The defaults for the csh filetype should be correct): AssertEqual [], GetLinterNames('csh') +Execute(The defaults for the elixir filetype should be correct): + AssertEqual ['credo', 'dialyxir', 'dogma'], GetLinterNames('elixir') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('elixir') + Execute(The defaults for the go filetype should be correct): AssertEqual ['gofmt', 'golint', 'gopls', 'govet'], GetLinterNames('go') @@ -28,11 +42,48 @@ Execute(The defaults for the go filetype should be correct): AssertEqual [], GetLinterNames('go') +Execute(The defaults for the hack filetype should be correct): + AssertEqual ['hack'], GetLinterNames('hack') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('hack') + Execute(The defaults for the help filetype should be correct): AssertEqual [], GetLinterNames('help') +Execute(The defaults for the inko filetype should be correct): + AssertEqual ['inko'], GetLinterNames('inko') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('inko') + +Execute(The defaults for the json filetype should be correct): + AssertEqual ['jsonlint', 'spectral', 'vscodejson'], GetLinterNames('json') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('json') + +Execute(The defaults for the json5 filetype should be correct): + AssertEqual [], GetLinterNames('json5') + +Execute(The defaults for the jsonc filetype should be correct): + AssertEqual [], GetLinterNames('jsonc') + +Execute(The defaults for the perl filetype should be correct): + AssertEqual ['perlcritic'], GetLinterNames('perl') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('perl') + +Execute(The defaults for the perl6 filetype should be correct): + AssertEqual [], GetLinterNames('perl6') + Execute(The defaults for the python filetype should be correct): - AssertEqual ['flake8', 'mypy', 'pylint', 'pyright'], GetLinterNames('python') + AssertEqual ['flake8', 'mypy', 'pylint', 'pyright', 'ruff'], GetLinterNames('python') let g:ale_linters_explicit = 1 @@ -51,6 +102,13 @@ Execute(The defaults for the spec filetype should be correct): Execute(The defaults for the text filetype should be correct): AssertEqual [], GetLinterNames('text') +Execute(The defaults for the vue filetype should be correct): + AssertEqual ['eslint', 'vls'], GetLinterNames('vue') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('vue') + Execute(The defaults for the zsh filetype should be correct): AssertEqual ['shell'], GetLinterNames('zsh') @@ -67,13 +125,13 @@ Execute(The defaults for the verilog filetype should be correct): AssertEqual [], GetLinterNames('verilog') -Execute(Default aliases for React should be defined): - AssertEqual ['javascript', 'jsx'], ale#linter#ResolveFiletype('javascriptreact') - AssertEqual ['typescript', 'tsx'], ale#linter#ResolveFiletype('typescriptreact') - -Execute(The defaults for the apkbuild filetype should be correct): - AssertEqual ['apkbuild_lint', 'secfixes_check'], GetLinterNames('apkbuild') +Execute(The defaults for the vader filetype should be correct): + AssertEqual ['vimls'], GetLinterNames('vader') let g:ale_linters_explicit = 1 - AssertEqual [], GetLinterNames('apkbuild') + AssertEqual [], GetLinterNames('vader') + +Execute(Default aliases for React should be defined): + AssertEqual ['javascript', 'jsx'], ale#linter#ResolveFiletype('javascriptreact') + AssertEqual ['typescript', 'tsx'], ale#linter#ResolveFiletype('typescriptreact') diff --git a/vim-config/plugins/ale/test/test_find_references.vader b/vim-config/plugins/ale/test/test_find_references.vader index 9931e740..01c15469 100644 --- a/vim-config/plugins/ale/test/test_find_references.vader +++ b/vim-config/plugins/ale/test/test_find_references.vader @@ -187,6 +187,57 @@ Execute(Results should be shown for tsserver responses): \ }, \ g:options +Execute(Results should be put to quickfix for tsserver responses): + call ale#references#SetMap( + \ { + \ 3: { + \ 'ignorethis': 'x', + \ 'open_in': 'quickfix', + \ } + \ } + \) + call ale#references#HandleTSServerResponse(1, { + \ 'command': 'references', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': { + \ 'symbolStartOffset': 9, + \ 'refs': [ + \ { + \ 'file': '/foo/bar/app.ts', + \ 'isWriteAccess': v:true, + \ 'lineText': 'import {doSomething} from ''./whatever''', + \ 'end': {'offset': 24, 'line': 9}, + \ 'start': {'offset': 9, 'line': 9}, + \ 'isDefinition': v:true, + \ }, + \ { + \ 'file': '/foo/bar/app.ts', + \ 'isWriteAccess': v:false, + \ 'lineText': ' doSomething()', + \ 'end': {'offset': 18, 'line': 804}, + \ 'start': {'offset': 3, 'line': 804}, + \ 'isDefinition': v:false, + \ }, + \ { + \ 'file': '/foo/bar/other/app.ts', + \ 'isWriteAccess': v:false, + \ 'lineText': ' doSomething()', + \ 'end': {'offset': 18, 'line': 51}, + \ 'start': {'offset': 3, 'line': 51}, + \ 'isDefinition': v:false, + \ }, + \ ], + \ 'symbolDisplayString': 'import doSomething', + \ 'symbolName': 'doSomething()', + \ }, + \}) + + AssertEqual + \ 3, + \ len(getqflist()) + AssertEqual {}, ale#references#GetMap() + Execute(The preview window should not be opened for empty tsserver responses): call ale#references#SetMap({3: {}}) call ale#references#HandleTSServerResponse(1, { @@ -283,6 +334,16 @@ Execute(`-vsplit` should display results in vsplits): AssertEqual {'42': {'open_in': 'vsplit', 'use_relative_paths': 0}}, ale#references#GetMap() +Execute(`-quickfix` should display results in quickfix): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEFindReferences -quickfix + + call g:InitCallback() + + AssertEqual {'42': {'open_in': 'quickfix', 'use_relative_paths': 0}}, ale#references#GetMap() + Given python(Some Python file): foo somelongerline @@ -296,13 +357,13 @@ Execute(LSP reference responses should be handled): \ 'id': 3, \ 'result': [ \ { - \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), \ 'range': { \ 'start': {'line': 2, 'character': 7}, \ }, \ }, \ { - \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/other_file')), + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')), \ 'range': { \ 'start': {'line': 7, 'character': 15}, \ }, @@ -327,6 +388,33 @@ Execute(LSP reference responses should be handled): \ g:item_list AssertEqual {}, ale#references#GetMap() +Execute(LSP reference responses should be put to quickfix): + call ale#references#SetMap({3: { 'open_in': 'quickfix' }}) + call ale#references#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': [ + \ { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'range': { + \ 'start': {'line': 2, 'character': 7}, + \ }, + \ }, + \ { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')), + \ 'range': { + \ 'start': {'line': 7, 'character': 15}, + \ }, + \ }, + \ ], + \ } + \) + + AssertEqual + \ 2, + \ len(getqflist()) + Execute(Preview windows should not be opened for empty LSP reference responses): call ale#references#SetMap({3: {}}) call ale#references#HandleLSPResponse(1, {'id': 3, 'result': []}) @@ -365,13 +453,13 @@ Execute(LSP reference requests should be sent): \ [ \ [1, 'textDocument/didChange', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ }, \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] \ }], \ [0, 'textDocument/references', { - \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}, + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, \ 'position': {'line': 0, 'character': 2}, \ 'context': {'includeDeclaration': v:false}, \ }], diff --git a/vim-config/plugins/ale/test/test_format_command.vader b/vim-config/plugins/ale/test/test_format_command.vader index b0440dcd..3b7ee98b 100644 --- a/vim-config/plugins/ale/test/test_format_command.vader +++ b/vim-config/plugins/ale/test/test_format_command.vader @@ -178,7 +178,7 @@ Execute(FormatCommand should apply regular cwd paths): \ 'cd ' . (has('unix') ? '' : '/d ') . ale#Escape('/foo /bar') . ' && abc', \ ale#command#FormatCommand(bufnr('%'), '', 'abc', 0, v:null, '/foo /bar', [])[1] \ -Execute(FormatCommand should apply cwd subsitution and formatting): +Execute(FormatCommand should apply cwd substitution and formatting): call ale#test#SetFilename('foo.txt') AssertEqual diff --git a/vim-config/plugins/ale/test/test_go_to_definition.vader b/vim-config/plugins/ale/test/test_go_to_definition.vader index 90e49979..726de551 100644 --- a/vim-config/plugins/ale/test/test_go_to_definition.vader +++ b/vim-config/plugins/ale/test/test_go_to_definition.vader @@ -266,6 +266,30 @@ Execute(tsserver type definition requests should be sent): \ g:message_list AssertEqual {'42': {'open_in': 'current-buffer'}}, ale#definition#GetMap() +Execute(tsserver implementation requests should be sent): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEGoToImplementation + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'implementation', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleTSServerResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@implementation', {'file': expand('%:p'), 'line': 2, 'offset': 5}] + \ ], + \ g:message_list + AssertEqual {'42': {'open_in': 'current-buffer'}}, ale#definition#GetMap() + Execute(tsserver tab definition requests should be sent): runtime ale_linters/typescript/tsserver.vim call setpos('.', [bufnr(''), 2, 5, 0]) @@ -327,7 +351,7 @@ Execute(Other files should be jumped to for LSP definition responses): \ { \ 'id': 3, \ 'result': { - \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), \ 'range': { \ 'start': {'line': 2, 'character': 7}, \ }, @@ -350,7 +374,7 @@ Execute(Newer LocationLink items should be supported): \ { \ 'id': 3, \ 'result': { - \ 'targetUri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'targetUri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), \ 'targetRange': { \ 'start': {'line': 2, 'character': 7}, \ }, @@ -373,7 +397,7 @@ Execute(Locations inside the same file should be jumped to without using :edit): \ { \ 'id': 3, \ 'result': { - \ 'uri': ale#path#ToURI(ale#path#Simplify(expand('%:p'))), + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(expand('%:p'))), \ 'range': { \ 'start': {'line': 2, 'character': 7}, \ }, @@ -395,7 +419,7 @@ Execute(Other files should be jumped to in tabs for LSP definition responses): \ { \ 'id': 3, \ 'result': { - \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), \ 'range': { \ 'start': {'line': 2, 'character': 7}, \ }, @@ -419,13 +443,13 @@ Execute(Definition responses with lists should be handled): \ 'id': 3, \ 'result': [ \ { - \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), \ 'range': { \ 'start': {'line': 2, 'character': 7}, \ }, \ }, \ { - \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/other_file')), + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')), \ 'range': { \ 'start': {'line': 20, 'character': 3}, \ }, @@ -470,13 +494,13 @@ Execute(LSP definition requests should be sent): \ [ \ [1, 'textDocument/didChange', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ }, \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] \ }], \ [0, 'textDocument/definition', { - \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}, + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, \ 'position': {'line': 0, 'character': 2}, \ }], \ ], @@ -506,13 +530,49 @@ Execute(LSP type definition requests should be sent): \ [ \ [1, 'textDocument/didChange', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ }, \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] \ }], \ [0, 'textDocument/typeDefinition', { - \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}, + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'line': 0, 'character': 2}, + \ }], + \ ], + \ g:message_list + + AssertEqual {'42': {'open_in': 'current-buffer'}}, ale#definition#GetMap() + +Execute(LSP implementation requests should be sent): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALEGoToImplementation + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'implementation', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleLSPResponse'')', + \ string(g:Callback) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] + \ }], + \ [0, 'textDocument/implementation', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, \ 'position': {'line': 0, 'character': 2}, \ }], \ ], @@ -542,13 +602,13 @@ Execute(LSP tab definition requests should be sent): \ [ \ [1, 'textDocument/didChange', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ }, \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] \ }], \ [0, 'textDocument/definition', { - \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}, + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, \ 'position': {'line': 0, 'character': 2}, \ }], \ ], @@ -578,13 +638,49 @@ Execute(LSP tab type definition requests should be sent): \ [ \ [1, 'textDocument/didChange', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ }, \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] \ }], \ [0, 'textDocument/typeDefinition', { - \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}, + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'line': 0, 'character': 2}, + \ }], + \ ], + \ g:message_list + + AssertEqual {'42': {'open_in': 'tab'}}, ale#definition#GetMap() + +Execute(LSP tab implementation requests should be sent): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALEGoToImplementation -tab + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'implementation', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleLSPResponse'')', + \ string(g:Callback) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] + \ }], + \ [0, 'textDocument/implementation', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, \ 'position': {'line': 0, 'character': 2}, \ }], \ ], diff --git a/vim-config/plugins/ale/test/test_helptags.vader b/vim-config/plugins/ale/test/test_helptags.vader new file mode 100644 index 00000000..8c9c5469 --- /dev/null +++ b/vim-config/plugins/ale/test/test_helptags.vader @@ -0,0 +1,2 @@ +Execute (helptags should run without issue): + helptags ALL diff --git a/vim-config/plugins/ale/test/test_highlight_placement.vader b/vim-config/plugins/ale/test/test_highlight_placement.vader index dab73073..e8b7ac27 100644 --- a/vim-config/plugins/ale/test/test_highlight_placement.vader +++ b/vim-config/plugins/ale/test/test_highlight_placement.vader @@ -10,6 +10,7 @@ Before: Save g:ale_exclude_highlights Save b:ale_exclude_highlights + runtime autoload/ale/virtualtext.vim runtime autoload/ale/highlight.vim let g:ale_run_synchronously = 1 @@ -98,6 +99,10 @@ Before: endif endfunction + function! GetLinkedGroup(grp) abort + return synIDattr(synIDtrans(hlID(a:grp)), 'name') + endfunction + call ale#linter#Define('testft', { \ 'name': 'x', \ 'executable': has('win32') ? 'cmd': 'echo', @@ -119,6 +124,9 @@ After: call ale#linter#Reset() call clearmatches() call ale#sign#Clear() + if has('textprop') && has('popupwin') + call prop_type_delete('ale') + endif highlight clear SomeOtherGroup runtime autoload/ale/highlight.vim @@ -129,6 +137,15 @@ Given testft(A Javscript file with warnings/errors): baz wat line four +" Autoloading virtualtext.vim first should still properly initialize hl-groups +Execute(Loading virtualtext first does not break highlight groups): + AssertEqual + \ "SpellBad", + \ GetLinkedGroup("ALEError") + AssertEqual + \ "SpellCap", + \ GetLinkedGroup("ALEWarning") + Execute(Highlights should be set when a linter runs): ALELint call ale#test#FlushJobs() @@ -244,7 +261,7 @@ Execute(Only ALE highlights should be restored when buffers are restored): \ sort(GetMatchesWithoutIDs(), {m1, m2 -> m1.group < m2.group ? -1 : 1}) endif -Execute(Higlight end columns should set an appropriate size): +Execute(Highlight end columns should set an appropriate size): call ale#highlight#SetHighlights(bufnr('%'), [ \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2, 'end_col': 5}, \ {'bufnr': bufnr('%'), 'type': 'W', 'lnum': 4, 'col': 1, 'end_col': 5}, @@ -257,7 +274,7 @@ Execute(Higlight end columns should set an appropriate size): \ ], \ GetMatchesWithoutIDs() -Execute(Higlight end columns should set an appropriate size): +Execute(Highlight end columns should set an appropriate size): call ale#highlight#SetHighlights(bufnr('%'), [ \ {'bufnr': bufnr('%') - 1, 'type': 'E', 'lnum': 1, 'col': 1}, \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 1, 'col': 1}, @@ -407,7 +424,7 @@ Execute(Highlights should be cleared when ALE is disabled): Execute(Line highlights should be set when signs are disabled): " This will mess with your settings, but it needs to be tested. - " We need to match highlights case-insenstive when removing them. + " We need to match highlights case-insensitively when removing them. hi link aleerrorline spellbad let g:ale_set_signs = 0 diff --git a/vim-config/plugins/ale/test/test_ignoring_linters.vader b/vim-config/plugins/ale/test/test_ignoring_linters.vader index 19f45add..f97a0cf6 100644 --- a/vim-config/plugins/ale/test/test_ignoring_linters.vader +++ b/vim-config/plugins/ale/test/test_ignoring_linters.vader @@ -271,7 +271,7 @@ Execute(Buffer ignore lists should be applied for LSP linters): \ 'jsonrpc': '2.0', \ 'method': 'textDocument/publishDiagnostics', \ 'params': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'diagnostics': [ \ { \ 'severity': 1, @@ -366,7 +366,7 @@ Execute(ale_disable_lsp should be applied for LSP linters): \ 'jsonrpc': '2.0', \ 'method': 'textDocument/publishDiagnostics', \ 'params': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'diagnostics': [ \ { \ 'severity': 1, diff --git a/vim-config/plugins/ale/test/test_lint_file_linters.vader b/vim-config/plugins/ale/test/test_lint_file_linters.vader index d16f4aa1..682e4130 100644 --- a/vim-config/plugins/ale/test/test_lint_file_linters.vader +++ b/vim-config/plugins/ale/test/test_lint_file_linters.vader @@ -51,7 +51,7 @@ Before: function! GetSimplerLoclist() let l:loclist = [] - for l:item in ale#test#GetLoclistWithoutModule() + for l:item in ale#test#GetLoclistWithoutNewerKeys() call add(l:loclist, { \ 'lnum': l:item.lnum, \ 'col': l:item.col, diff --git a/vim-config/plugins/ale/test/test_lint_on_enter_when_file_changed.vader b/vim-config/plugins/ale/test/test_lint_on_enter_when_file_changed.vader index 0d4c4af8..9d5e64e2 100644 --- a/vim-config/plugins/ale/test/test_lint_on_enter_when_file_changed.vader +++ b/vim-config/plugins/ale/test/test_lint_on_enter_when_file_changed.vader @@ -62,7 +62,7 @@ Execute(The file changed event function should lint the current buffer when it h \ 'nr': -1, \ 'pattern': '', \ 'valid': 1, - \ }], ale#test#GetLoclistWithoutModule() + \ }], ale#test#GetLoclistWithoutNewerKeys() Execute(The buffer should be checked after entering it after the file has changed): let b:ale_file_changed = 1 @@ -81,4 +81,4 @@ Execute(The buffer should be checked after entering it after the file has change \ 'nr': -1, \ 'pattern': '', \ 'valid': 1, - \ }], ale#test#GetLoclistWithoutModule() + \ }], ale#test#GetLoclistWithoutNewerKeys() diff --git a/vim-config/plugins/ale/test/test_list_formatting.vader b/vim-config/plugins/ale/test/test_list_formatting.vader index d79a664b..eaa67a9d 100644 --- a/vim-config/plugins/ale/test/test_list_formatting.vader +++ b/vim-config/plugins/ale/test/test_list_formatting.vader @@ -53,7 +53,7 @@ Execute(Formatting with codes should work for the loclist): \ 'text': 'nocode', \ }, \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() call remove(g:loclist, 0) call AddItem({'text': 'withcode', 'code': 'E123'}) @@ -73,7 +73,7 @@ Execute(Formatting with codes should work for the loclist): \ 'text': 'E123: withcode', \ }, \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() Execute(Formatting with codes should work for the quickfix list): let g:ale_set_loclist = 0 @@ -96,7 +96,7 @@ Execute(Formatting with codes should work for the quickfix list): \ 'text': 'nocode', \ }, \ ], - \ ale#test#GetQflistWithoutModule() + \ ale#test#GetQflistWithoutNewerKeys() call remove(g:loclist, 0) call AddItem({'text': 'withcode', 'code': 'E123'}) @@ -116,7 +116,7 @@ Execute(Formatting with codes should work for the quickfix list): \ 'text': 'E123: withcode', \ }, \ ], - \ ale#test#GetQflistWithoutModule() + \ ale#test#GetQflistWithoutNewerKeys() Execute(Formatting with the linter name should work for the loclist): let g:ale_loclist_msg_format = '(%linter%) %s' @@ -138,7 +138,7 @@ Execute(Formatting with the linter name should work for the loclist): \ 'text': '(some_linter) whatever', \ }, \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() Execute(Formatting with the linter name should work for the quickfix list): let g:ale_loclist_msg_format = '(%linter%) %s' @@ -162,7 +162,7 @@ Execute(Formatting with the linter name should work for the quickfix list): \ 'text': '(some_linter) whatever', \ }, \ ], - \ ale#test#GetQflistWithoutModule() + \ ale#test#GetQflistWithoutNewerKeys() Execute(The buffer loclist format option should take precedence): let g:ale_loclist_msg_format = '(%linter%) %s' @@ -185,4 +185,4 @@ Execute(The buffer loclist format option should take precedence): \ 'text': 'FOO whatever', \ }, \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() diff --git a/vim-config/plugins/ale/test/test_list_opening.vader b/vim-config/plugins/ale/test/test_list_opening.vader index 8f0b2fd5..44004182 100644 --- a/vim-config/plugins/ale/test/test_list_opening.vader +++ b/vim-config/plugins/ale/test/test_list_opening.vader @@ -97,6 +97,34 @@ Execute(The quickfix window should open for just the loclist): call ale#list#SetLists(bufnr('%'), []) Assert !ale#list#IsQuickfixOpen() +Execute(The quickfix window should open on the correct threshold): + " The window should open for a value lower than number of entries. + let g:ale_open_list = len(g:loclist) - 1 + call ale#list#SetLists(bufnr('%'), g:loclist) + Assert ale#list#IsQuickfixOpen() + + " Clear the list to be ready for a new value. + call ale#list#SetLists(bufnr('%'), []) + Assert !ale#list#IsQuickfixOpen() + + " It should also open for a value equal to the number of entries. + let g:ale_open_list = len(g:loclist) + call ale#list#SetLists(bufnr('%'), g:loclist) + Assert ale#list#IsQuickfixOpen() + + " Clear the list again, preparing for a final value. + call ale#list#SetLists(bufnr('%'), []) + Assert !ale#list#IsQuickfixOpen() + + " Window should not open for values higher than number of loclist entries. + let g:ale_open_list = len(g:loclist) + 1 + call ale#list#SetLists(bufnr('%'), g:loclist) + Assert !ale#list#IsQuickfixOpen() + + " Clear the list just to clean up. + call ale#list#SetLists(bufnr('%'), []) + Assert !ale#list#IsQuickfixOpen() + Execute(The quickfix window height should be correct for the loclist): let g:ale_open_list = 1 let g:ale_list_window_size = 7 diff --git a/vim-config/plugins/ale/test/test_list_titles.vader b/vim-config/plugins/ale/test/test_list_titles.vader index 1f0b2308..dfb042f5 100644 --- a/vim-config/plugins/ale/test/test_list_titles.vader +++ b/vim-config/plugins/ale/test/test_list_titles.vader @@ -38,7 +38,7 @@ Execute(The loclist titles should be set appropriately): \ 'nr': 0, \ 'type': 'E', \ 'pattern': '', - \}], ale#test#GetLoclistWithoutModule() + \}], ale#test#GetLoclistWithoutNewerKeys() if !has('nvim') AssertEqual @@ -68,7 +68,7 @@ Execute(The quickfix titles should be set appropriately): \ 'nr': 0, \ 'type': 'E', \ 'pattern': '', - \}], ale#test#GetQflistWithoutModule() + \}], ale#test#GetQflistWithoutNewerKeys() if !has('nvim') AssertEqual diff --git a/vim-config/plugins/ale/test/test_loclist_corrections.vader b/vim-config/plugins/ale/test/test_loclist_corrections.vader index d53b1411..60b1eba7 100644 --- a/vim-config/plugins/ale/test/test_loclist_corrections.vader +++ b/vim-config/plugins/ale/test/test_loclist_corrections.vader @@ -124,6 +124,7 @@ Execute(FixLocList should set items with lines beyond the end to the last line): \ 'text': 'a', \ 'lnum': 10, \ 'col': 0, + \ 'end_lnum': 10, \ 'bufnr': bufnr('%'), \ 'vcol': 0, \ 'type': 'E', @@ -135,7 +136,7 @@ Execute(FixLocList should set items with lines beyond the end to the last line): \ bufnr('%'), \ 'foobar', \ 0, - \ [{'text': 'a', 'lnum': 11}], + \ [{'text': 'a', 'lnum': 11, 'end_lnum': 12}], \ ) Execute(FixLocList should move line 0 to line 1): @@ -223,9 +224,9 @@ Execute(FixLocList should pass on end_lnum values): \ [ \ { \ 'text': 'a', - \ 'lnum': 10, + \ 'lnum': 7, \ 'col': 10, - \ 'end_lnum': 13, + \ 'end_lnum': 10, \ 'end_col': 12, \ 'bufnr': bufnr('%'), \ 'vcol': 0, @@ -235,9 +236,9 @@ Execute(FixLocList should pass on end_lnum values): \ }, \ { \ 'text': 'a', - \ 'lnum': 10, + \ 'lnum': 7, \ 'col': 11, - \ 'end_lnum': 13, + \ 'end_lnum': 10, \ 'end_col': 12, \ 'bufnr': bufnr('%'), \ 'vcol': 0, @@ -251,8 +252,8 @@ Execute(FixLocList should pass on end_lnum values): \ 'foobar', \ 0, \ [ - \ {'text': 'a', 'lnum': '010', 'col': '010', 'end_col': '012', 'end_lnum': '013'}, - \ {'text': 'a', 'lnum': '010', 'col': '011', 'end_col': 12, 'end_lnum': 13}, + \ {'text': 'a', 'lnum': '07', 'col': '010', 'end_col': '012', 'end_lnum': '010'}, + \ {'text': 'a', 'lnum': '07', 'col': '011', 'end_col': 12, 'end_lnum': 10}, \ ], \ ) diff --git a/vim-config/plugins/ale/test/test_no_linting_on_write_quit.vader b/vim-config/plugins/ale/test/test_no_linting_on_write_quit.vader index 3e49b506..161e6165 100644 --- a/vim-config/plugins/ale/test/test_no_linting_on_write_quit.vader +++ b/vim-config/plugins/ale/test/test_no_linting_on_write_quit.vader @@ -60,7 +60,7 @@ Execute(No linting should be done on :wq or :x): call ale#events#SaveEvent(bufnr('')) call ale#test#FlushJobs() - AssertEqual 1, len(ale#test#GetLoclistWithoutModule()) + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()) " Now try doing it again, but where we run the quit event first. call setloclist(0, []) @@ -68,7 +68,7 @@ Execute(No linting should be done on :wq or :x): call ale#events#SaveEvent(bufnr('')) call ale#test#FlushJobs() - AssertEqual [], ale#test#GetLoclistWithoutModule() + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() Execute(No linting should be for :w after :q fails): let g:ale_lint_on_save = 1 @@ -83,7 +83,7 @@ Execute(No linting should be for :w after :q fails): call ale#events#SaveEvent(bufnr('')) call ale#test#FlushJobs() - AssertEqual 1, len(ale#test#GetLoclistWithoutModule()) + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()) Execute(No linting should be done on :wq or :x after fixing files): let g:ale_lint_on_save = 1 @@ -92,7 +92,7 @@ Execute(No linting should be done on :wq or :x after fixing files): call ale#events#SaveEvent(bufnr('')) call ale#test#FlushJobs() - AssertEqual 1, len(ale#test#GetLoclistWithoutModule()) + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()) " Now try doing it again, but where we run the quit event first. call setloclist(0, []) @@ -100,7 +100,7 @@ Execute(No linting should be done on :wq or :x after fixing files): call ale#events#SaveEvent(bufnr('')) call ale#test#FlushJobs() - AssertEqual [], ale#test#GetLoclistWithoutModule() + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() Execute(Linting should be done after :q fails and fixing files): let g:ale_lint_on_save = 1 @@ -115,4 +115,4 @@ Execute(Linting should be done after :q fails and fixing files): call ale#events#SaveEvent(bufnr('')) call ale#test#FlushJobs() - AssertEqual 1, len(ale#test#GetLoclistWithoutModule()) + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()) diff --git a/vim-config/plugins/ale/test/test_organize_imports.vader b/vim-config/plugins/ale/test/test_organize_imports.vader index 63973a54..87cd295a 100644 --- a/vim-config/plugins/ale/test/test_organize_imports.vader +++ b/vim-config/plugins/ale/test/test_organize_imports.vader @@ -59,7 +59,7 @@ Before: function! ale#code_action#HandleCodeAction(code_action, options) abort let g:handle_code_action_called = 1 - Assert !get(a:options, 'should_save') + AssertEqual !&hidden, get(a:options, 'should_save') call add(g:code_actions, a:code_action) endfunction diff --git a/vim-config/plugins/ale/test/test_other_sources.vader b/vim-config/plugins/ale/test/test_other_sources.vader index e6f9911c..45a7d306 100644 --- a/vim-config/plugins/ale/test/test_other_sources.vader +++ b/vim-config/plugins/ale/test/test_other_sources.vader @@ -55,7 +55,7 @@ Execute(StartChecking should mark a buffer as being actively checked): Assert ale#engine#IsCheckingBuffer(bufnr('')) -Execute(ShowResults sould make a buffer inactive): +Execute(ShowResults should make a buffer inactive): call ale#other_source#StartChecking(bufnr(''), 'other-source-linter') call ale#other_source#StartChecking(bufnr(''), 'second-other-source-linter') @@ -86,11 +86,11 @@ Execute(ShowResults should show results at any time): \ 'text': 'xyz', \ }, \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() call ale#other_source#ShowResults(bufnr(''), 'other-source-linter', []) - AssertEqual [], ale#test#GetLoclistWithoutModule() + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() Execute(A regular lint cycle shouldn't clear results from other sources): call ale#other_source#ShowResults(bufnr(''), 'other-source-linter', [ @@ -112,7 +112,7 @@ Execute(A regular lint cycle shouldn't clear results from other sources): \ 'text': 'xyz', \ }, \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() Execute(ALEWantResults should be signaled when a buffer is checked): augroup VaderTest diff --git a/vim-config/plugins/ale/test/test_path_uri.vader b/vim-config/plugins/ale/test/test_path_uri.vader index 0f2cba7e..e2daccf4 100644 --- a/vim-config/plugins/ale/test/test_path_uri.vader +++ b/vim-config/plugins/ale/test/test_path_uri.vader @@ -1,73 +1,73 @@ Before: scriptencoding utf-8 -Execute(ale#path#ToURI should work for Windows paths): - AssertEqual 'file:///C:/foo/bar/baz.tst', ale#path#ToURI('C:\foo\bar\baz.tst') - AssertEqual 'foo/bar/baz.tst', ale#path#ToURI('foo\bar\baz.tst') +Execute(ale#path#ToFileURI should work for Windows paths): + AssertEqual 'file:///C:/foo/bar/baz.tst', ale#path#ToFileURI('C:\foo\bar\baz.tst') + AssertEqual 'foo/bar/baz.tst', ale#path#ToFileURI('foo\bar\baz.tst') -Execute(ale#path#FromURI should work for Unix paths): - AssertEqual '/foo/bar/baz.tst', ale#path#FromURI('file:///foo/bar/baz.tst') - AssertEqual '/foo/bar/baz.tst', ale#path#FromURI('file:/foo/bar/baz.tst') - AssertEqual '/foo/bar/baz.tst', ale#path#FromURI('FILE:///foo/bar/baz.tst') - AssertEqual '/foo/bar/baz.tst', ale#path#FromURI('FILE:/foo/bar/baz.tst') +Execute(ale#path#FromFileURI should work for Unix paths): + AssertEqual '/foo/bar/baz.tst', ale#path#FromFileURI('file:///foo/bar/baz.tst') + AssertEqual '/foo/bar/baz.tst', ale#path#FromFileURI('file:/foo/bar/baz.tst') + AssertEqual '/foo/bar/baz.tst', ale#path#FromFileURI('FILE:///foo/bar/baz.tst') + AssertEqual '/foo/bar/baz.tst', ale#path#FromFileURI('FILE:/foo/bar/baz.tst') -Execute(ale#path#FromURI should work for Windows paths): +Execute(ale#path#FromFileURI should work for Windows paths): if has('win32') - AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('file:///C:/foo/bar/baz.tst') - AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('file:/C:/foo/bar/baz.tst') - AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromURI('file:///c:/foo/bar/baz.tst') - AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromURI('file:/c:/foo/bar/baz.tst') - AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('FILE:///C:/foo/bar/baz.tst') - AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('FILE:/C:/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:///C:/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:/C:/foo/bar/baz.tst') + AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromFileURI('file:///c:/foo/bar/baz.tst') + AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromFileURI('file:/c:/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('FILE:///C:/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('FILE:/C:/foo/bar/baz.tst') else - AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromURI('file:///C:/foo/bar/baz.tst') - AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromURI('file:/C:/foo/bar/baz.tst') - AssertEqual '/c:/foo/bar/baz.tst', ale#path#FromURI('file:///c:/foo/bar/baz.tst') - AssertEqual '/c:/foo/bar/baz.tst', ale#path#FromURI('file:/c:/foo/bar/baz.tst') - AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromURI('FILE:///C:/foo/bar/baz.tst') - AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromURI('FILE:/C:/foo/bar/baz.tst') + AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('file:///C:/foo/bar/baz.tst') + AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('file:/C:/foo/bar/baz.tst') + AssertEqual '/c:/foo/bar/baz.tst', ale#path#FromFileURI('file:///c:/foo/bar/baz.tst') + AssertEqual '/c:/foo/bar/baz.tst', ale#path#FromFileURI('file:/c:/foo/bar/baz.tst') + AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('FILE:///C:/foo/bar/baz.tst') + AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('FILE:/C:/foo/bar/baz.tst') endif -Execute(ale#path#FromURI parse Windows paths with a pipe): +Execute(ale#path#FromFileURI parse Windows paths with a pipe): if has('win32') - AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('file:///C|/foo/bar/baz.tst') - AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('file:/C|/foo/bar/baz.tst') - AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromURI('file:///c|/foo/bar/baz.tst') - AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromURI('file:/c|/foo/bar/baz.tst') - AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('FILE:///C|/foo/bar/baz.tst') - AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('FILE:/C|/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:///C|/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:/C|/foo/bar/baz.tst') + AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromFileURI('file:///c|/foo/bar/baz.tst') + AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromFileURI('file:/c|/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('FILE:///C|/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('FILE:/C|/foo/bar/baz.tst') else - AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromURI('file:///C|/foo/bar/baz.tst') - AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromURI('file:/C|/foo/bar/baz.tst') - AssertEqual '/c|/foo/bar/baz.tst', ale#path#FromURI('file:///c|/foo/bar/baz.tst') - AssertEqual '/c|/foo/bar/baz.tst', ale#path#FromURI('file:/c|/foo/bar/baz.tst') - AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromURI('FILE:///C|/foo/bar/baz.tst') - AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromURI('FILE:/C|/foo/bar/baz.tst') + AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromFileURI('file:///C|/foo/bar/baz.tst') + AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromFileURI('file:/C|/foo/bar/baz.tst') + AssertEqual '/c|/foo/bar/baz.tst', ale#path#FromFileURI('file:///c|/foo/bar/baz.tst') + AssertEqual '/c|/foo/bar/baz.tst', ale#path#FromFileURI('file:/c|/foo/bar/baz.tst') + AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromFileURI('FILE:///C|/foo/bar/baz.tst') + AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromFileURI('FILE:/C|/foo/bar/baz.tst') endif -Execute(ale#path#FromURI should handle the colon for the drive letter being encoded): +Execute(ale#path#FromFileURI should handle the colon for the drive letter being encoded): " These URIs shouldn't be created, but we'll handle them anyway. if has('win32') - AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('file:///C%3A/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:///C%3A/foo/bar/baz.tst') else - AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromURI('file:///C%3A/foo/bar/baz.tst') + AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('file:///C%3A/foo/bar/baz.tst') endif -Execute(ale#path#ToURI should work for Unix paths): - AssertEqual 'file:///foo/bar/baz.tst', ale#path#ToURI('/foo/bar/baz.tst') - AssertEqual 'foo/bar/baz.tst', ale#path#ToURI('foo/bar/baz.tst') +Execute(ale#path#ToFileURI should work for Unix paths): + AssertEqual 'file:///foo/bar/baz.tst', ale#path#ToFileURI('/foo/bar/baz.tst') + AssertEqual 'foo/bar/baz.tst', ale#path#ToFileURI('foo/bar/baz.tst') -Execute(ale#path#ToURI should keep safe characters): - AssertEqual '//a-zA-Z0-9$-_.!*''(),', ale#path#ToURI('\/a-zA-Z0-9$-_.!*''(),') +Execute(ale#path#ToFileURI should keep safe characters): + AssertEqual '//a-zA-Z0-9$-_.!*''(),', ale#path#ToFileURI('\/a-zA-Z0-9$-_.!*''(),') -Execute(ale#path#ToURI should percent encode unsafe characters): - AssertEqual '%20%2b%3a%3f%26%3d', ale#path#ToURI(' +:?&=') +Execute(ale#path#ToFileURI should percent encode unsafe characters): + AssertEqual '%20%2b%3a%3f%26%3d', ale#path#ToFileURI(' +:?&=') -Execute(ale#path#FromURI should decode percent encodings): - AssertEqual ' +:?&=', ale#path#FromURI('%20%2b%3a%3f%26%3d') +Execute(ale#path#FromFileURI should decode percent encodings): + AssertEqual ' +:?&=', ale#path#FromFileURI('%20%2b%3a%3f%26%3d') -Execute(ale#path#ToURI should handle UTF-8): - AssertEqual 'file:///T%c3%a9l%c3%a9chargement', ale#path#ToURI('/Téléchargement') +Execute(ale#path#ToFileURI should handle UTF-8): + AssertEqual 'file:///T%c3%a9l%c3%a9chargement', ale#path#ToFileURI('/Téléchargement') -Execute(ale#path#FromURI should handle UTF-8): - AssertEqual '/Téléchargement', ale#path#FromURI('file:///T%C3%A9l%C3%A9chargement') +Execute(ale#path#FromFileURI should handle UTF-8): + AssertEqual '/Téléchargement', ale#path#FromFileURI('file:///T%C3%A9l%C3%A9chargement') diff --git a/vim-config/plugins/ale/test/test_prepare_command.vader b/vim-config/plugins/ale/test/test_prepare_command.vader index 6a71eaed..4e963b82 100644 --- a/vim-config/plugins/ale/test/test_prepare_command.vader +++ b/vim-config/plugins/ale/test/test_prepare_command.vader @@ -4,6 +4,12 @@ Before: Save g:ale_shell Save g:ale_shell_arguments + Save b:ale_shell + Save b:ale_shell_arguments + + unlet! b:ale_shell + unlet! b:ale_shell_arguments + unlet! g:ale_shell unlet! g:ale_shell_arguments @@ -61,7 +67,7 @@ Execute(cmd /s/c as a string should be used on Windows): AssertEqual 'cmd /s/c "foobar"', ale#job#PrepareCommand(bufnr(''), 'foobar') endif -Execute(Setting ale_shell should cause ale#job#PrepareCommand to use set shell): +Execute(Setting g:ale_shell should cause ale#job#PrepareCommand to use set shell): let g:ale_shell = '/foo/bar' if has('win32') @@ -73,3 +79,18 @@ Execute(Setting ale_shell should cause ale#job#PrepareCommand to use set shell): let g:ale_shell_arguments = '-x' AssertEqual ['/foo/bar', '-x', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar") + +Execute(Setting b:ale_shell should cause ale#job#PrepareCommand to use set shell): + let g:ale_shell = '/wrong/foo/bar' + let b:ale_shell = '/foo/bar' + + if has('win32') + AssertEqual ['/foo/bar', '/c', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar") + else + AssertEqual ['/foo/bar', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar") + endif + + let g:ale_shell_arguments = '--verbose -x' + let b:ale_shell_arguments = '-x' + + AssertEqual ['/foo/bar', '-x', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar") diff --git a/vim-config/plugins/ale/test/test_rename.vader b/vim-config/plugins/ale/test/test_rename.vader index 42bcfd95..83f0aa7e 100644 --- a/vim-config/plugins/ale/test/test_rename.vader +++ b/vim-config/plugins/ale/test/test_rename.vader @@ -59,7 +59,7 @@ Before: function! ale#code_action#HandleCodeAction(code_action, options) abort let g:handle_code_action_called = 1 - Assert get(a:options, 'should_save') + AssertEqual !&hidden, get(a:options, 'should_save', 0) call add(g:code_actions, a:code_action) endfunction @@ -487,13 +487,13 @@ Execute(LSP rename requests should be sent): \ [ \ [1, 'textDocument/didChange', { \ 'textDocument': { - \ 'uri': ale#path#ToURI(expand('%:p')), + \ 'uri': ale#path#ToFileURI(expand('%:p')), \ 'version': g:ale_lsp_next_version_id - 1, \ }, \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] \ }], \ [0, 'textDocument/rename', { - \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}, + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, \ 'position': {'line': 0, 'character': 2}, \ 'newName': 'a-new-name', \ }], diff --git a/vim-config/plugins/ale/test/test_results_not_cleared_when_opening_loclist.vader b/vim-config/plugins/ale/test/test_results_not_cleared_when_opening_loclist.vader index 5621eb35..c586345a 100644 --- a/vim-config/plugins/ale/test/test_results_not_cleared_when_opening_loclist.vader +++ b/vim-config/plugins/ale/test/test_results_not_cleared_when_opening_loclist.vader @@ -27,4 +27,4 @@ Execute(The loclist shouldn't be cleared when opening the loclist): :lopen :q - AssertEqual 1, len(ale#test#GetLoclistWithoutModule()), 'The loclist was cleared' + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()), 'The loclist was cleared' diff --git a/vim-config/plugins/ale/test/test_set_list_timers.vader b/vim-config/plugins/ale/test/test_set_list_timers.vader index e53b97a4..07e0202d 100644 --- a/vim-config/plugins/ale/test/test_set_list_timers.vader +++ b/vim-config/plugins/ale/test/test_set_list_timers.vader @@ -26,4 +26,4 @@ Execute(The SetLists function should work when run in a timer): \ 'nr': 0, \ 'type': 'E', \ 'pattern': '', - \}], ale#test#GetLoclistWithoutModule() + \}], ale#test#GetLoclistWithoutNewerKeys() diff --git a/vim-config/plugins/ale/test/test_setting_loclist_from_another_buffer.vader b/vim-config/plugins/ale/test/test_setting_loclist_from_another_buffer.vader index 028ffb1e..d33fa075 100644 --- a/vim-config/plugins/ale/test/test_setting_loclist_from_another_buffer.vader +++ b/vim-config/plugins/ale/test/test_setting_loclist_from_another_buffer.vader @@ -21,6 +21,6 @@ Execute(Errors should be set in the loclist for the original buffer, not the new \ g:ale_buffer_info[(g:original_buffer)].loclist, \ ) - AssertEqual [], ale#test#GetLoclistWithoutModule() + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() AssertEqual 1, len(getloclist(bufwinid(g:original_buffer))) AssertEqual 'foo', getloclist(bufwinid(g:original_buffer))[0].text diff --git a/vim-config/plugins/ale/test/test_setting_problems_found_in_previous_buffers.vader b/vim-config/plugins/ale/test/test_setting_problems_found_in_previous_buffers.vader index a5c8e0d3..f1a31fc1 100644 --- a/vim-config/plugins/ale/test/test_setting_problems_found_in_previous_buffers.vader +++ b/vim-config/plugins/ale/test/test_setting_problems_found_in_previous_buffers.vader @@ -95,4 +95,4 @@ Execute(Problems found from previously opened buffers should be set when linting \ {'lnum': 2, 'bufnr': bufnr(''), 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'E', 'pattern': '', 'text': 'bar'}, \ {'lnum': 3, 'bufnr': bufnr(''), 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'E', 'pattern': '', 'text': 'baz'}, \ ], - \ ale#test#GetLoclistWithoutModule() + \ ale#test#GetLoclistWithoutNewerKeys() diff --git a/vim-config/plugins/ale/test/test_symbol_search.vader b/vim-config/plugins/ale/test/test_symbol_search.vader index 382b2b40..754826aa 100644 --- a/vim-config/plugins/ale/test/test_symbol_search.vader +++ b/vim-config/plugins/ale/test/test_symbol_search.vader @@ -94,7 +94,7 @@ Execute(LSP symbol responses should be handled): \ { \ 'name': 'foo', \ 'location': { - \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), \ 'range': { \ 'start': {'line': 2, 'character': 7}, \ }, @@ -103,7 +103,7 @@ Execute(LSP symbol responses should be handled): \ { \ 'name': 'foobar', \ 'location': { - \ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/other_file')), + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')), \ 'range': { \ 'start': {'line': 7, 'character': 15}, \ }, diff --git a/vim-config/plugins/ale/test/test_virtualtext.vader b/vim-config/plugins/ale/test/test_virtualtext.vader new file mode 100644 index 00000000..8fc1ead5 --- /dev/null +++ b/vim-config/plugins/ale/test/test_virtualtext.vader @@ -0,0 +1,179 @@ +Before: + Save g:ale_buffer_info + Save g:ale_virtualtext_cursor + Save g:ale_virtualtext_delay + Save g:ale_virtualtext_prefix + Save b:ale_virtualtext_prefix + + call ale#virtualtext#ResetDataForTests() + + let g:setting = '' + let g:ale_virtualtext_delay = 0 + let g:ale_buffer_info = { + \ bufnr(''): { + \ 'loclist': [ + \ { + \ 'bufnr': bufnr(''), + \ 'type': 'E', + \ 'lnum': 1, + \ 'col': 5, + \ 'text': 'Line 1 error', + \ }, + \ { + \ 'bufnr': bufnr(''), + \ 'type': 'W', + \ 'lnum': 2, + \ 'col': 1, + \ 'text': 'Line 2 warning 1', + \ }, + \ { + \ 'bufnr': bufnr(''), + \ 'type': 'W', + \ 'lnum': 2, + \ 'col': 5, + \ 'text': 'Line 2 warning 2', + \ }, + \ ], + \ }, + \} + +After: + Restore + + unlet! g:setting + unlet! g:ns_id + +Execute(The correct highlight groups should be loaded for virtual-text): + AssertEqual 'ALEVirtualTextError', ale#virtualtext#GetGroup({}) + AssertEqual 'ALEVirtualTextError', ale#virtualtext#GetGroup({'type': 'E'}) + AssertEqual 'ALEVirtualTextStyleError', + \ ale#virtualtext#GetGroup({'type': 'E', 'sub_type': 'style'}) + AssertEqual 'ALEVirtualTextWarning', ale#virtualtext#GetGroup({'type': 'W'}) + AssertEqual 'ALEVirtualTextStyleWarning', + \ ale#virtualtext#GetGroup({'type': 'W', 'sub_type': 'style'}) + AssertEqual 'ALEVirtualTextInfo', ale#virtualtext#GetGroup({'type': 'I'}) + +Given python (An empty Python file): +Execute(Comment text should be detected correctly for Python files): + if has('patch-9.0.0297') || has('nvim-0.8.0') + AssertEqual '#', ale#virtualtext#GetComment(bufnr('')) + endif + +Given java (An empty Java file): +Execute(Comment text should be detected correctly for Java files): + if has('patch-9.0.0297') || has('nvim-0.8.0') + AssertEqual '//', ale#virtualtext#GetComment(bufnr('')) + endif + +Given html (An empty HTML file): +Execute(Comment text should be detected correctly for HTML files): + if has('patch-9.0.0297') || has('nvim-0.8.0') + AssertEqual "\