Compare commits

..
Author SHA1 Message Date
Andrew Wray 0b0f8d91bc Prefer ale_root setting for project roots 2025-06-25 20:50:15 +01:00
57 changed files with 228 additions and 577 deletions

No files matched your search

+2 -2
View File
@@ -41,10 +41,10 @@ install:
- ps: >-
if (!(Test-Path -Path C:\vim)){
Add-Type -A System.IO.Compression.FileSystem
Invoke-WebRequest https://github.com/dense-analysis/ale/releases/download/v4.0.0/vim80-586w32.zip `
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586w32.zip `
-OutFile C:\vim.zip
[IO.Compression.ZipFile]::ExtractToDirectory('C:\vim.zip', 'C:\vim')
Invoke-WebRequest https://github.com/dense-analysis/ale/releases/download/v4.0.0/vim80-586rt.zip `
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586rt.zip `
-OutFile C:\rt.zip
[IO.Compression.ZipFile]::ExtractToDirectory('C:\rt.zip', 'C:\vim')
}
+6 -1
View File
@@ -1,4 +1,9 @@
" Author: rhysd https://rhysd.github.io
" Description: Redpen, a proofreading tool (http://redpen.cc)
call ale#handlers#redpen#DefineLinter('asciidoc')
call ale#linter#Define('asciidoc', {
\ 'name': 'redpen',
\ 'executable': 'redpen',
\ 'command': 'redpen -f asciidoc -r json %t',
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
\})
+6 -1
View File
@@ -1,4 +1,9 @@
" Author: rhysd https://rhysd.github.io
" Description: Redpen, a proofreading tool (http://redpen.cc)
call ale#handlers#redpen#DefineLinter('markdown')
call ale#linter#Define('markdown', {
\ 'name': 'redpen',
\ 'executable': 'redpen',
\ 'command': 'redpen -f markdown -r json %t',
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
\})
+1 -1
View File
@@ -36,7 +36,7 @@ function! ale_linters#python#pylsp#GetCwd(buffer) abort
\ 'name': 'pylsp',
\ 'project_root': function('ale#python#FindProjectRoot'),
\}
let l:root = ale#lsp_linter#FindProjectRoot(a:buffer, l:fake_linter)
let l:root = ale#linter#GetRoot(a:buffer, l:fake_linter)
return !empty(l:root) ? l:root : v:null
endfunction
+1 -1
View File
@@ -13,7 +13,7 @@ function! ale_linters#python#pyright#GetCwd(buffer) abort
\ 'name': 'pyright',
\ 'project_root': function('ale#python#FindProjectRoot'),
\}
let l:root = ale#lsp_linter#FindProjectRoot(a:buffer, l:fake_linter)
let l:root = ale#linter#GetRoot(a:buffer, l:fake_linter)
return !empty(l:root) ? l:root : v:null
endfunction
-4
View File
@@ -76,10 +76,6 @@ function! ale_linters#python#ruff#Handle(buffer, lines) abort
continue
endtry
if empty(l:item)
continue
endif
if (l:item.code is# 'W291' || l:item.code is# 'W293')
\&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
" Skip warnings for trailing whitespace if the option is off.
+6 -1
View File
@@ -1,4 +1,9 @@
" Author: rhysd https://rhysd.github.io
" Description: Redpen, a proofreading tool (http://redpen.cc)
call ale#handlers#redpen#DefineLinter('review')
call ale#linter#Define('review', {
\ 'name': 'redpen',
\ 'executable': 'redpen',
\ 'command': 'redpen -f review -r json %t',
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
\})
+6 -1
View File
@@ -1,4 +1,9 @@
" Author: rhysd https://rhysd.github.io
" Description: Redpen, a proofreading tool (http://redpen.cc)
call ale#handlers#redpen#DefineLinter('rst')
call ale#linter#Define('rst', {
\ 'name': 'redpen',
\ 'executable': 'redpen',
\ 'command': 'redpen -f rest -r json %t',
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
\})
+2 -3
View File
@@ -1,7 +1,6 @@
call ale#Set('ruby_sorbet_executable', 'srb')
call ale#Set('ruby_sorbet_options', '')
call ale#Set('ruby_sorbet_enable_watchman', 0)
call ale#Set('ruby_sorbet_initialization_options', { 'highlightUntyped': v:false })
function! ale_linters#ruby#sorbet#GetCommand(buffer) abort
let l:executable = ale#Var(a:buffer, 'ruby_sorbet_executable')
@@ -22,6 +21,6 @@ call ale#linter#Define('ruby', {
\ 'language': 'ruby',
\ 'executable': {b -> ale#Var(b, 'ruby_sorbet_executable')},
\ 'command': function('ale_linters#ruby#sorbet#GetCommand'),
\ 'project_root': function('ale#ruby#FindProjectRoot'),
\ 'initialization_options': {b -> ale#Var(b, 'ruby_sorbet_initialization_options')}
\ 'project_root': function('ale#ruby#FindProjectRoot')
\})
+6 -1
View File
@@ -1,4 +1,9 @@
" Author: rhysd https://rhysd.github.io
" Description: Redpen, a proofreading tool (http://redpen.cc)
call ale#handlers#redpen#DefineLinter('tex')
call ale#linter#Define('tex', {
\ 'name': 'redpen',
\ 'executable': 'redpen',
\ 'command': 'redpen -f latex -r json %t',
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
\})
+6 -1
View File
@@ -1,4 +1,9 @@
" Author: rhysd https://rhysd.github.io
" Description: Redpen, a proofreading tool (http://redpen.cc)
call ale#handlers#redpen#DefineLinter('text')
call ale#linter#Define('text', {
\ 'name': 'redpen',
\ 'executable': 'redpen',
\ 'command': 'redpen -f plain -r json %t',
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
\})
-38
View File
@@ -1,38 +0,0 @@
" Author: Ben Boeckel <github@me.benboeckel.net>
" Description: TOML Formatter / Linter / Language Server
call ale#Set('toml_tombi_executable', 'tombi')
call ale#Set('toml_tombi_lsp_options', '')
function! ale_linters#toml#tombi#GetProjectRoot(buffer) abort
" Try to find nearest tombi.toml
let l:tombiconfig_file = ale#path#FindNearestFile(a:buffer, 'tombi.toml')
if !empty(l:tombiconfig_file)
return fnamemodify(l:tombiconfig_file . '/', ':p:h:h')
endif
" Try to find nearest pyproject.toml
let l:pyproject_file = ale#path#FindNearestFile(a:buffer, 'pyproject.toml')
if !empty(l:pyproject_file)
return fnamemodify(l:pyproject_file . '/', ':p:h:h')
endif
" Try to find nearest `git` directory
let l:gitdir = ale#path#FindNearestFile(a:buffer, '.git')
if !empty(l:gitdir)
return fnamemodify(l:gitdir . '/', ':p:h:h')
endif
return ''
endfunction
call ale#linter#Define('toml', {
\ 'name': 'tombi',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'toml_tombi_executable')},
\ 'command': {b -> '%e lsp' . ale#Pad(ale#Var(b, 'toml_tombi_lsp_options'))},
\ 'project_root': function('ale_linters#toml#tombi#GetProjectRoot'),
\})
-3
View File
@@ -9,9 +9,7 @@ endif
" --lint-only
function! ale_linters#verilog#slang#GetCommand(buffer) abort
return 'slang -Weverything '
\ . '--diag-abs-paths '
\ . '-I%s:h '
\ . '-y%s:h '
\ . ale#Var(a:buffer, 'verilog_slang_options') .' '
\ . '%t'
endfunction
@@ -30,7 +28,6 @@ function! ale_linters#verilog#slang#Handle(buffer, lines) abort
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:item = {
\ 'filename': l:match[1],
\ 'lnum': str2nr(l:match[2]),
\ 'type': (l:match[4] is# 'error') ? 'E' : 'W',
\ 'text': s:RemoveUnicodeQuotes(l:match[5]),
-1
View File
@@ -10,7 +10,6 @@ function! ale_linters#verilog#verilator#GetCommand(buffer) abort
" the path to the current file is systematically added to the search path
return 'verilator --lint-only -Wall -Wno-DECLFILENAME '
\ . '-I%s:h '
\ . '-y %s:h '
\ . ale#Var(a:buffer, 'verilog_verilator_options') .' '
\ . '%t'
endfunction
+1 -1
View File
@@ -216,7 +216,7 @@ endfunction
function! ale#assert#LSPProject(expected_root) abort
let l:buffer = bufnr('')
let l:linter = s:GetLinter()
let l:root = ale#lsp_linter#FindProjectRoot(l:buffer, l:linter)
let l:root = ale#linter#GetRoot(l:buffer, l:linter)
AssertEqual a:expected_root, l:root
endfunction
-2
View File
@@ -12,8 +12,6 @@ let g:__ale_c_project_filenames = ['.git/HEAD', 'configure', 'Makefile', 'CMakeL
let g:ale_c_build_dir_names = get(g:, 'ale_c_build_dir_names', [
\ 'build',
\ 'build/Debug',
\ 'build/Release',
\ 'bin',
\])
+1 -2
View File
@@ -23,7 +23,7 @@ function! ale#cursor#TruncatedEcho(original_message) abort
" 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')
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')
@@ -93,7 +93,6 @@ function! ale#cursor#EchoCursorWarning(...) abort
if !empty(l:loc)
let l:format = ale#Var(l:buffer, 'echo_msg_format')
let l:msg = ale#GetLocItemMessage(l:loc, l:format)
call ale#cursor#TruncatedEcho(l:msg)
let l:info.echoed = 1
elseif get(l:info, 'echoed')
-10
View File
@@ -732,16 +732,6 @@ let s:default_registry = {
\ 'suggested_filetypes': ['roc'],
\ 'description': 'Annotates all top-level definitions in Roc files.',
\ },
\ 'tombi_format': {
\ 'function': 'ale#fixers#tombi_format#Fix',
\ 'suggested_filetypes': ['toml'],
\ 'description': 'Formats TOML files',
\ },
\ 'tombi_lint': {
\ 'function': 'ale#fixers#tombi_lint#Fix',
\ 'suggested_filetypes': ['toml'],
\ 'description': 'Lints TOML files',
\ },
\}
" Reset the function registry to the default entries.
-15
View File
@@ -1,15 +0,0 @@
" Author: Ben Boeckel <github@me.benboeckel.net>
" Description: Integration of tombi formatting with ALE.
call ale#Set('toml_tombi_executable', 'tombi')
call ale#Set('toml_tombi_format_options', '')
function! ale#fixers#tombi_format#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'toml_tombi_executable')
return {
\ 'command': ale#Escape(l:executable)
\ . ' format'
\ . ale#Pad(ale#Var(a:buffer, 'toml_tombi_format_options')),
\}
endfunction
-15
View File
@@ -1,15 +0,0 @@
" Author: Ben Boeckel <github@me.benboeckel.net>
" Description: Integration of tombi linting with ALE.
call ale#Set('toml_tombi_executable', 'tombi')
call ale#Set('toml_tombi_lint_options', '')
function! ale#fixers#tombi_lint#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'toml_tombi_executable')
return {
\ 'command': ale#Escape(l:executable)
\ . ' lint'
\ . ale#Pad(ale#Var(a:buffer, 'toml_tombi_lint_options')),
\}
endfunction
-13
View File
@@ -1,8 +1,6 @@
" Author: rhysd https://rhysd.github.io
" Description: Redpen, a proofreading tool (http://redpen.cc)
call ale#Set('redpen_options', '')
function! ale#handlers#redpen#HandleRedpenOutput(buffer, lines) abort
" Only one file was passed to redpen. So response array has only one
" element.
@@ -65,14 +63,3 @@ function! ale#handlers#redpen#HandleRedpenOutput(buffer, lines) abort
return l:output
endfunction
" Define the redpen linter for a given filetype.
function! ale#handlers#redpen#DefineLinter(filetype) abort
call ale#linter#Define(a:filetype, {
\ 'name': 'redpen',
\ 'executable': 'redpen',
\ 'command': {b -> 'redpen -f ' . a:filetype . ' -r json' . ale#Pad(ale#Var(b, 'redpen_options')) . ' %t'},
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
\})
endfunction
+3 -20
View File
@@ -63,12 +63,6 @@ function! ale#handlers#shellcheck#GetCommand(buffer, version) abort
\ . ' -f ' . l:format . ' -'
endfunction
function! s:ShouldIgnoreErrorCode(buffer, code) abort
" Skip warnings for trailing whitespace if the option is off.
return a:code is# 'SC1101'
\ && !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
endfunction
function! s:HandleShellcheckJSON(buffer, lines) abort
try
let l:errors = json_decode(a:lines[0])
@@ -93,17 +87,11 @@ function! s:HandleShellcheckJSON(buffer, lines) abort
let l:type = 'W'
endif
let l:code = 'SC' . l:error['code']
if s:ShouldIgnoreErrorCode(a:buffer, l:code)
continue
endif
let l:item = {
\ 'lnum': l:error['line'],
\ 'type': l:type,
\ 'text': l:error['message'],
\ 'code': l:code,
\ 'code': 'SC' . l:error['code'],
\ 'detail': l:error['message'] . "\n\nFor more information:\n https://www.shellcheck.net/wiki/SC" . l:error['code'],
\}
@@ -119,6 +107,7 @@ function! s:HandleShellcheckJSON(buffer, lines) abort
let l:item.end_lnum = l:error['endLine']
endif
" If the filename is something like <stdin>, <nofile> or -, then
" this is an error for the file we checked.
if has_key(l:error, 'file')
@@ -146,17 +135,11 @@ function! s:HandleShellcheckGCC(buffer, lines) abort
let l:type = 'W'
endif
let l:code = l:match[6]
if s:ShouldIgnoreErrorCode(a:buffer, l:code)
continue
endif
let l:item = {
\ 'lnum': str2nr(l:match[2]),
\ 'type': l:type,
\ 'text': l:match[5],
\ 'code': l:code,
\ 'code': l:match[6],
\ 'detail': l:match[5] . "\n\nFor more information:\n https://www.shellcheck.net/wiki/" . l:match[6],
\}
+29
View File
@@ -447,3 +447,32 @@ function! ale#linter#GetAddress(buffer, linter) abort
return type(l:Address) is v:t_func ? l:Address(a:buffer) : l:Address
endfunction
" Get the project root for a linter.
" If |b:ale_root| or |g:ale_root| is set to either a String or a Dict mapping
" linter names to roots or callbacks, return that value immediately. When no
" value is available, fall back to the linter-specific configuration.
function! ale#linter#GetRoot(buffer, linter) abort
let l:buffer_ale_root = getbufvar(a:buffer, 'ale_root', {})
if type(l:buffer_ale_root) is v:t_string
return l:buffer_ale_root
endif
if has_key(l:buffer_ale_root, a:linter.name)
let l:Root = l:buffer_ale_root[a:linter.name]
return type(l:Root) is v:t_func ? l:Root(a:buffer) : l:Root
endif
if has_key(g:ale_root, a:linter.name)
let l:Root = g:ale_root[a:linter.name]
return type(l:Root) is v:t_func ? l:Root(a:buffer) : l:Root
endif
if has_key(a:linter, 'project_root')
let l:Root = a:linter.project_root
return type(l:Root) is v:t_func ? l:Root(a:buffer) : l:Root
endif
return ''
endfunction
+1 -1
View File
@@ -28,7 +28,7 @@ function! ale#lsp#response#ReadDiagnostics(diagnostics) abort
for l:diagnostic in a:diagnostics
let l:severity = get(l:diagnostic, 'severity', 0)
let l:loclist_item = {
\ 'text': l:diagnostic.message,
\ 'text': substitute(l:diagnostic.message, '\(\r\n\|\n\|\r\)', ' ', 'g'),
\ 'type': 'E',
\ 'lnum': l:diagnostic.range.start.line + 1,
\ 'col': l:diagnostic.range.start.character + 1,
+1 -39
View File
@@ -296,44 +296,6 @@ function! ale#lsp_linter#GetConfig(buffer, linter) abort
return {}
endfunction
function! ale#lsp_linter#FindProjectRoot(buffer, linter) abort
let l:buffer_ale_root = getbufvar(a:buffer, 'ale_root', {})
if type(l:buffer_ale_root) is v:t_string
return l:buffer_ale_root
endif
" Try to get a buffer-local setting for the root
if has_key(l:buffer_ale_root, a:linter.name)
let l:Root = l:buffer_ale_root[a:linter.name]
if type(l:Root) is v:t_func
return l:Root(a:buffer)
else
return l:Root
endif
endif
" Try to get a global setting for the root
if has_key(g:ale_root, a:linter.name)
let l:Root = g:ale_root[a:linter.name]
if type(l:Root) is v:t_func
return l:Root(a:buffer)
else
return l:Root
endif
endif
" Fall back to the linter-specific configuration
if has_key(a:linter, 'project_root')
let l:Root = a:linter.project_root
return type(l:Root) is v:t_func ? l:Root(a:buffer) : l:Root
endif
return ale#util#GetFunction(a:linter.project_root_callback)(a:buffer)
endfunction
" This function is accessible so tests can call it.
function! ale#lsp_linter#OnInit(linter, details, Callback) abort
@@ -504,7 +466,7 @@ endfunction
function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort
let l:command = ''
let l:address = ''
let l:root = ale#lsp_linter#FindProjectRoot(a:buffer, a:linter)
let l:root = ale#linter#GetRoot(a:buffer, a:linter)
if empty(l:root) && a:linter.lsp isnot# 'tsserver'
" If there's no project root, then we can't check files with LSP,
+6
View File
@@ -61,6 +61,12 @@ endfunction
" through paths, including the current directory, until no __init__.py files
" is found.
function! ale#python#FindProjectRoot(buffer) abort
let l:root = ale#linter#GetRoot(a:buffer, {'name': 'python'})
if !empty(l:root)
return l:root
endif
let l:ini_root = ale#python#FindProjectRootIni(a:buffer)
if !empty(l:ini_root)
-6
View File
@@ -20,11 +20,5 @@ textlint *ale-asciidoc-textlint*
See |ale-text-textlint|
===============================================================================
redpen *ale-asciidoc-redpen*
See |ale-redpen-options|
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
+1 -1
View File
@@ -26,7 +26,7 @@ g:ale_c_always_make
c_build_dir_names
g:ale_c_build_dir_names
Type: |List|
Default: `['build', 'build/Debug', 'build/Release', 'bin']`
Default: `['build', 'bin']`
A list of directory names to be used when searching upwards from C files
to discover compilation databases with. For directory named `'foo'`, ALE
+2 -2
View File
@@ -424,11 +424,11 @@ running tests. >
Add-Type -A System.IO.Compression.FileSystem
Invoke-WebRequest https://github.com/dense-analysis/ale/releases/download/v4.0.0/vim80-586w32.zip -OutFile C:\vim.zip
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586w32.zip -OutFile C:\vim.zip
[IO.Compression.ZipFile]::ExtractToDirectory('C:\vim.zip', 'C:\vim')
rm C:\vim.zip
Invoke-WebRequest https://github.com/dense-analysis/ale/releases/download/v4.0.0/vim80-586rt.zip -OutFile C:\rt.zip
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586rt.zip -OutFile C:\rt.zip
[IO.Compression.ZipFile]::ExtractToDirectory('C:\rt.zip', 'C:\vim')
rm C:\rt.zip
-6
View File
@@ -225,11 +225,5 @@ write-good *ale-markdown-write-good*
See |ale-write-good-options|
===============================================================================
redpen *ale-markdown-redpen*
See |ale-redpen-options|
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
+3
View File
@@ -55,6 +55,9 @@ For some linters, ALE will search for a Python project root by looking at the
files in directories on or above where a file being checked is. ALE applies
the following methods, in order:
If |g:ale_root| or |b:ale_root| provides a value, that value is used as the
project root instead and the searching described below is skipped.
1. Find the first directory containing a common Python configuration file.
2. If no configuration file can be found, use the first directory which does
not contain a readable file named `__init__.py`.
-17
View File
@@ -267,23 +267,6 @@ g:ale_ruby_sorbet_enable_watchman
to files from outside of vim. Defaults to disable watchman because it
requires watchman to be installed separately from sorbet.
*ale-options.ruby_sorbet_initialization_options*
*g:ale_ruby_sorbet_initialization_options*
*b:ale_ruby_sorbet_initialization_options*
ruby_sorbet_initialization_options
g:ale_ruby_sorbet_initialization_options
Type: |Dictionary|
Default: `{ 'highlightUntyped': v:false }`
This variable can be changed to modify initialization options provided to
the Sorbet language server. By default, a minimal object with defaults is
provided to ensure proper LSP initialization.
Setting this variable to a an empty object will cause sorbet LSP to
fail during initialization.
See https://sorbet.org/docs/lsp#initialize-request for available options.
===============================================================================
standardrb *ale-ruby-standardrb*
+2 -2
View File
@@ -33,8 +33,8 @@ Integration Information
5. rustfmt -- If you have `rustfmt` installed, you can use it as a fixer to
consistently reformat your Rust code.
Only cargo and rust-analyzer are enabled by default. To switch to using
rustc instead of cargo, configure |b:ale_linters| in your ftplugin file
Only cargo and rust-analyze are enabled by default. To switch to using rustc
instead of cargo, configure |b:ale_linters| in your ftplugin file
appropriately: >
" See the help text for the option for more information.
@@ -698,7 +698,6 @@ Notes:
* `thriftcheck`
* TOML
* `dprint`
* `tombi`
* TypeScript
* `biome`
* `cspell`
-6
View File
@@ -111,11 +111,5 @@ g:ale_tex_texlab_config
let g:ale_tex_texlab_config = {"build":{"onSave":v:true}}
<
===============================================================================
redpen *ale-tex-redpen*
See |ale-redpen-options|
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
-6
View File
@@ -51,11 +51,5 @@ write-good *ale-text-write-good*
See |ale-write-good-options|
===============================================================================
redpen *ale-text-redpen*
See |ale-redpen-options|
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
-53
View File
@@ -8,58 +8,5 @@ dprint *ale-toml-dprint*
See |ale-dprint-options| and https://dprint.dev/plugins/toml
===============================================================================
tombi *ale-toml-tombi*
`'tombi'` is a TOML formatter, linter, and language server.
*ale-options.toml_tombi_executable*
*g:ale_toml_tombi_executable*
*b:ale_toml_tombi_executable*
toml_tombi_executable
g:ale_toml_tombi_executable
Type: |String|
Default: `'tombi'`
This variable can be modified to change the executable path for
`tombi`.
*ale-options.toml_tombi_lsp_options*
*g:ale_toml_tombi_lsp_options*
*b:ale_toml_tombi_lsp_options*
toml_tombi_lsp_options
g:ale_toml_tombi_lsp_options
Type: |String|
Default: `''`
This variable can be modified to provide options when using `tombi` as an
LSP server.
*ale-options.toml_tombi_format_options*
*g:ale_toml_tombi_format_options*
*b:ale_toml_tombi_format_options*
toml_tombi_format_options
g:ale_toml_tombi_format_options
Type: |String|
Default: `''`
This variable can be modified to provide options when using `tombi` as a
formatter.
*ale-options.toml_tombi_lint_options*
*g:ale_toml_tombi_lint_options*
*b:ale_toml_tombi_lint_options*
toml_tombi_lint_options
g:ale_toml_tombi_lint_options
Type: |String|
Default: `''`
This variable can be modified to provide options when using `tombi` as a
linter.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
+11 -33
View File
@@ -30,8 +30,7 @@ CONTENTS *ale-contents*
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 Options for redpen................|ale-redpen-options|
7.6 Other Linter/Fixer Options........|ale-other-integration-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|
@@ -2298,17 +2297,18 @@ g:ale_root
Type: |Dictionary| or |String|
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
project root or a |Funcref| to call to look up the root. The |Funcref| is
provided the buffer number as its argument.
This option is used to determine the project root for a linter. When set to a
|String| it will be used for all linters. When set to a |Dictionary|, the
keys are linter names and the values are either |Strings| containing project
roots or |Funcref|s which are passed the buffer number.
The buffer-specific variable may additionally be a string containing the
The buffer-specific variable may additionally be a |String| containing the
project root itself.
If neither variable yields a result, a linter-specific function is invoked to
detect a project root. If this, too, yields no result, and the linter is an
LSP linter, it will not run.
If a value can be found from either variable, ALE uses it directly and skips
searching for a project root. If no value is found, a linter-specific
function is invoked to detect a project root. If this, too, yields no result
and the linter is an LSP linter, it will not run.
*ale-options.save_hidden*
*g:ale_save_hidden*
@@ -3322,24 +3322,7 @@ g:ale_writegood_use_global
-------------------------------------------------------------------------------
7.6. Options for redpen *ale-redpen-options*
The options for `redpen` are shared between all filetypes, so options can
be configured once.
*ale-options.redpen_options*
*g:ale_redpen_options*
*b:ale_redpen_options*
redpen_options
g:ale_redpen_options
Type: |String|
Default: `''`
This variable can be set to pass additional options to redpen.
-------------------------------------------------------------------------------
7.7. 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.
@@ -3360,7 +3343,6 @@ documented in additional help files.
cspell................................|ale-asciidoc-cspell|
write-good............................|ale-asciidoc-write-good|
textlint..............................|ale-asciidoc-textlint|
redpen................................|ale-asciidoc-redpen|
asm.....................................|ale-asm-options|
gcc...................................|ale-asm-gcc|
llvm_mc...............................|ale-asm-llvm_mc|
@@ -3684,7 +3666,6 @@ documented in additional help files.
remark-lint...........................|ale-markdown-remark-lint|
textlint..............................|ale-markdown-textlint|
write-good............................|ale-markdown-write-good|
redpen................................|ale-markdown-redpen|
mercury.................................|ale-mercury-options|
mmc...................................|ale-mercury-mmc|
nasm....................................|ale-nasm-options|
@@ -3936,7 +3917,6 @@ documented in additional help files.
lacheck...............................|ale-tex-lacheck|
latexindent...........................|ale-tex-latexindent|
texlab................................|ale-tex-texlab|
redpen................................|ale-tex-redpen|
texinfo.................................|ale-texinfo-options|
cspell................................|ale-texinfo-cspell|
write-good............................|ale-texinfo-write-good|
@@ -3944,13 +3924,11 @@ documented in additional help files.
cspell................................|ale-text-cspell|
textlint..............................|ale-text-textlint|
write-good............................|ale-text-write-good|
redpen................................|ale-text-redpen|
thrift..................................|ale-thrift-options|
thrift................................|ale-thrift-thrift|
thriftcheck...........................|ale-thrift-thriftcheck|
toml....................................|ale-toml-options|
dprint................................|ale-toml-dprint|
tombi.................................|ale-toml-tombi|
typescript..............................|ale-typescript-options|
biome.................................|ale-typescript-biome|
cspell................................|ale-typescript-cspell|
-1
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env bash
# shellcheck disable=SC2317
DOCKER=${DOCKER:-docker}
export DOCKER
# Author: w0rp <devw0rp@gmail.com>
+86 -88
View File
@@ -14,16 +14,15 @@ formatting.
**Legend**
| Key | Definition |
| -------------- | ----------------------------------------------------------------- |
|:speech_balloon:| Language Server Protocol (LSP) |
| :floppy_disk: | May only run on files on disk (see: `help ale-lint-file-linters` |
| :warning: | Disabled by default |
| Key | Definition |
| ------------- | ----------------------------------------------------------------- |
| :floppy_disk: | May only run on files on disk (see: `help ale-lint-file-linters` |
| :warning: | Disabled by default |
---
* Ada
* [ada_language_server](https://github.com/AdaCore/ada_language_server) :speech_balloon:
* [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:
@@ -33,13 +32,13 @@ formatting.
* API Blueprint
* [drafter](https://github.com/apiaryio/drafter)
* APKBUILD
* [apkbuild-fixer](https://gitlab.alpinelinux.org/Leo/atools) :speech_balloon:
* [apkbuild-lint](https://gitlab.alpinelinux.org/Leo/atools) :speech_balloon:
* [secfixes-check](https://gitlab.alpinelinux.org/Leo/atools) :speech_balloon:
* [apkbuild-fixer](https://gitlab.alpinelinux.org/Leo/atools)
* [apkbuild-lint](https://gitlab.alpinelinux.org/Leo/atools)
* [secfixes-check](https://gitlab.alpinelinux.org/Leo/atools)
* AsciiDoc
* [alex](https://github.com/get-alex/alex)
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
* [languagetool](https://languagetool.org/) :floppy_disk: :speech_balloon:
* [languagetool](https://languagetool.org/) :floppy_disk:
* [proselint](http://proselint.com/)
* [redpen](http://redpen.cc/)
* [textlint](https://textlint.github.io/)
@@ -65,11 +64,11 @@ formatting.
* Bats
* [shellcheck](https://www.shellcheck.net/)
* Bazel
* [buildifier](https://github.com/bazelbuild/buildtools) :speech_balloon:
* [buildifier](https://github.com/bazelbuild/buildtools)
* BibTeX
* [bibclean](http://ftp.math.utah.edu/pub/bibclean/)
* Bicep
* [bicep](https://github.com/Azure/bicep) :floppy_disk: :speech_balloon:
* [bicep](https://github.com/Azure/bicep) :floppy_disk:
* Bindzone
* [checkzone](https://bind9.readthedocs.io/en/stable/manpages.html#named-checkzone-zone-file-validation-tool)
* BitBake
@@ -80,15 +79,15 @@ formatting.
* [shfmt](https://github.com/mvdan/sh)
* C
* [astyle](http://astyle.sourceforge.net/)
* [ccls](https://github.com/MaskRay/ccls) :speech_balloon:
* [ccls](https://github.com/MaskRay/ccls)
* [clang](http://clang.llvm.org/)
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
* [clangcheck](http://clang.llvm.org/docs/ClangCheck.html) :floppy_disk:
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
* [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/cpplint/cpplint)
* [cquery](https://github.com/cquery-project/cquery) :speech_balloon:
* [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/)
@@ -103,22 +102,22 @@ formatting.
* [uncrustify](https://github.com/uncrustify/uncrustify)
* C++ (filetype cpp)
* [astyle](http://astyle.sourceforge.net/)
* [ccls](https://github.com/MaskRay/ccls) :speech_balloon:
* [ccls](https://github.com/MaskRay/ccls)
* [clang](http://clang.llvm.org/)
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
* [clangcheck](http://clang.llvm.org/docs/ClangCheck.html) :floppy_disk:
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
* [clangd](https://clang.llvm.org/extra/clangd.html)
* [clangtidy](http://clang.llvm.org/extra/clang-tidy/) :floppy_disk:
* [clazy](https://github.com/KDE/clazy) :floppy_disk:
* [cppcheck](http://cppcheck.sourceforge.net)
* [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint) :floppy_disk:
* [cquery](https://github.com/cquery-project/cquery) :speech_balloon:
* [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)
* C3
* [c3lsp](https://github.com/pherrymason/c3-lsp) :speech_balloon:
* [c3lsp](https://github.com/pherrymason/c3-lsp)
* Cairo
* [scarb](https://docs.swmansion.com/scarb/) :floppy_disk:
* [starknet](https://starknet.io/docs)
@@ -153,7 +152,7 @@ formatting.
* [cucumber](https://cucumber.io/)
* CUDA
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
* [clangd](https://clang.llvm.org/extra/clangd.html)
* [nvcc](http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html) :floppy_disk:
* Cypher
* [cypher-lint](https://github.com/cleishm/libcypher-parser)
@@ -188,8 +187,8 @@ formatting.
* [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: :speech_balloon:
* [lexical](https://github.com/lexical-lsp/lexical) :warning: :speech_balloon:
* [elixir-ls](https://github.com/elixir-lsp/elixir-ls) :warning:
* [lexical](https://github.com/lexical-lsp/lexical) :warning:
* [mix](https://hexdocs.pm/mix/Mix.html) :warning: :floppy_disk:
* Elm
* [elm-format](https://github.com/avh4/elm-format)
@@ -207,8 +206,8 @@ 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-mode](https://www.erlang.org/doc/apps/tools/erlang_mode_chapter.html) (The Erlang mode for Emacs) :speech_balloon:
* [erlang_ls](https://github.com/erlang-ls/erlang_ls) :speech_balloon:
* [erlang-mode](https://www.erlang.org/doc/apps/tools/erlang_mode_chapter.html) (The Erlang mode for Emacs)
* [erlang_ls](https://github.com/erlang-ls/erlang_ls)
* [erlc](http://erlang.org/doc/man/erlc.html)
* [erlfmt](https://github.com/WhatsApp/erlfmt)
* Fish
@@ -216,7 +215,7 @@ formatting.
* [fish_indent](https://fishshell.com/docs/current/cmds/fish_indent.html)
* Fortran
* [gcc](https://gcc.gnu.org/)
* [language_server](https://github.com/hansec/fortran-language-server) :speech_balloon:
* [language_server](https://github.com/hansec/fortran-language-server)
* Fountain
* [proselint](http://proselint.com/)
* FusionScript
@@ -224,11 +223,11 @@ formatting.
* Git Commit Messages
* [gitlint](https://github.com/jorisroovers/gitlint)
* Gleam
* [gleam_format](https://github.com/gleam-lang/gleam) :speech_balloon:
* [gleamlsp](https://github.com/gleam-lang/gleam) :speech_balloon:
* [gleam_format](https://github.com/gleam-lang/gleam)
* [gleamlsp](https://github.com/gleam-lang/gleam)
* GLSL
* [glslang](https://github.com/KhronosGroup/glslang)
* [glslls](https://github.com/svenstaro/glsl-language-server) :speech_balloon:
* [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:
@@ -237,15 +236,15 @@ formatting.
* [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: :speech_balloon:
* [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:
* [golines](https://github.com/segmentio/golines)
* [gopls](https://github.com/golang/go/wiki/gopls) :speech_balloon:
* [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple) :warning: :floppy_disk: :speech_balloon:
* [gotype](https://godoc.org/golang.org/x/tools/cmd/gotype) :warning: :floppy_disk: :speech_balloon:
* [gopls](https://github.com/golang/go/wiki/gopls)
* [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple) :warning: :floppy_disk:
* [gotype](https://godoc.org/golang.org/x/tools/cmd/gotype) :warning: :floppy_disk:
* [revive](https://github.com/mgechev/revive) :warning: :floppy_disk:
* [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) :warning: :floppy_disk: :speech_balloon:
* [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) :warning: :floppy_disk:
* Go HTML Templates
* [djlint](https://djlint.com/)
* GraphQL
@@ -257,21 +256,21 @@ formatting.
* Hack
* [hack](http://hacklang.org/)
* [hackfmt](https://github.com/facebook/hhvm/tree/master/hphp/hack/hackfmt)
* [hhast](https://github.com/hhvm/hhast) :warning: (see `:help ale-integration-hack`) :speech_balloon:
* [hhast](https://github.com/hhvm/hhast) :warning: (see `:help ale-integration-hack`)
* Haml
* [haml-lint](https://github.com/brigade/haml-lint)
* Handlebars
* [djlint](https://djlint.com/)
* [ember-template-lint](https://github.com/rwjblue/ember-template-lint)
* Haskell
* [brittany](https://github.com/lspitzner/brittany) :speech_balloon:
* [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)
* [fourmolu](https://github.com/fourmolu/fourmolu)
* [ghc](https://www.haskell.org/ghc/)
* [ghc-mod](https://github.com/DanielG/ghc-mod)
* [hdevtools](https://hackage.haskell.org/package/hdevtools) :speech_balloon:
* [hdevtools](https://hackage.haskell.org/package/hdevtools)
* [hfmt](https://github.com/danstiner/hfmt)
* [hie](https://github.com/haskell/haskell-ide-engine)
* [hindent](https://hackage.haskell.org/package/hindent)
@@ -320,10 +319,10 @@ formatting.
* [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) :speech_balloon:
* [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) :speech_balloon:
* [javalsp](https://github.com/georgewfraser/vscode-javac)
* [uncrustify](https://github.com/uncrustify/uncrustify)
* JavaScript
* [biome](https://biomejs.dev/)
@@ -333,7 +332,7 @@ formatting.
* [dprint](https://dprint.dev/)
* [eslint](http://eslint.org/)
* [fecs](http://fecs.baidu.com/)
* [flow](https://flowtype.org/) :speech_balloon:
* [flow](https://flowtype.org/)
* [jscs](https://jscs-dev.github.io/)
* [jshint](http://jshint.com/)
* [prettier](https://github.com/prettier/prettier)
@@ -363,8 +362,8 @@ formatting.
* [biome](https://biomejs.dev/)
* [eslint](http://eslint.org/) :warning:
* Jsonnet
* [jsonnet-lint](https://jsonnet.org/learning/tools.html) :speech_balloon:
* [jsonnetfmt](https://jsonnet.org/learning/tools.html) :speech_balloon:
* [jsonnet-lint](https://jsonnet.org/learning/tools.html)
* [jsonnetfmt](https://jsonnet.org/learning/tools.html)
* Julia
* [languageserver](https://github.com/JuliaEditorSupport/LanguageServer.jl)
* Kotlin
@@ -378,7 +377,7 @@ formatting.
* [lacheck](https://www.ctan.org/pkg/lacheck)
* [proselint](http://proselint.com/)
* [redpen](http://redpen.cc/)
* [texlab](https://texlab.netlify.com) :speech_balloon:
* [texlab](https://texlab.netlify.com)
* [textlint](https://textlint.github.io/)
* [vale](https://github.com/ValeLint/vale)
* [write-good](https://github.com/btford/write-good)
@@ -393,7 +392,7 @@ formatting.
* Lua
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
* [lua-format](https://github.com/Koihik/LuaFormatter)
* [lua-language-server](https://github.com/LuaLS/lua-language-server) :speech_balloon:
* [lua-language-server](https://github.com/LuaLS/lua-language-server)
* [luac](https://www.lua.org/manual/5.1/luac.html)
* [luacheck](https://github.com/mpeterv/luacheck)
* [luafmt](https://github.com/trixnz/lua-fmt)
@@ -401,7 +400,7 @@ formatting.
* [stylua](https://github.com/johnnymorganz/stylua)
* Mail
* [alex](https://github.com/get-alex/alex)
* [languagetool](https://languagetool.org/) :floppy_disk: :speech_balloon:
* [languagetool](https://languagetool.org/) :floppy_disk:
* [proselint](http://proselint.com/)
* [vale](https://github.com/ValeLint/vale)
* Make
@@ -409,9 +408,9 @@ formatting.
* Markdown
* [alex](https://github.com/get-alex/alex)
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
* [languagetool](https://languagetool.org/) :floppy_disk: :speech_balloon:
* [languagetool](https://languagetool.org/) :floppy_disk:
* [markdownlint](https://github.com/DavidAnson/markdownlint) :floppy_disk:
* [marksman](https://github.com/artempyanykh/marksman) :speech_balloon:
* [marksman](https://github.com/artempyanykh/marksman)
* [mdl](https://github.com/mivok/markdownlint)
* [pandoc](https://pandoc.org)
* [prettier](https://github.com/prettier/prettier)
@@ -423,7 +422,7 @@ formatting.
* [vale](https://github.com/ValeLint/vale)
* [write-good](https://github.com/btford/write-good)
* MATLAB
* [mlint](https://www.mathworks.com/help/matlab/ref/mlint.html) :speech_balloon:
* [mlint](https://www.mathworks.com/help/matlab/ref/mlint.html)
* Mercury
* [mmc](http://mercurylang.org) :floppy_disk:
* NASM
@@ -432,7 +431,7 @@ formatting.
* [nickel_format](https://github.com/tweag/nickel#formatting)
* Nim
* [nim check](https://nim-lang.org/docs/nimc.html) :floppy_disk:
* [nimlsp](https://github.com/PMunch/nimlsp) :speech_balloon:
* [nimlsp](https://github.com/PMunch/nimlsp)
* nimpretty
* nix
* [alejandra](https://github.com/kamadorueda/alejandra)
@@ -440,7 +439,7 @@ formatting.
* [nix-instantiate](http://nixos.org/nix/manual/#sec-nix-instantiate)
* [nixfmt](https://github.com/serokell/nixfmt)
* [nixpkgs-fmt](https://github.com/nix-community/nixpkgs-fmt)
* [rnix-lsp](https://github.com/nix-community/rnix-lsp) :speech_balloon:
* [rnix-lsp](https://github.com/nix-community/rnix-lsp)
* [statix](https://github.com/nerdypepper/statix)
* nroff
* [alex](https://github.com/get-alex/alex)
@@ -449,24 +448,24 @@ formatting.
* Nunjucks
* [djlint](https://djlint.com/)
* Objective-C
* [ccls](https://github.com/MaskRay/ccls) :speech_balloon:
* [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) :speech_balloon:
* [clangd](https://clang.llvm.org/extra/clangd.html)
* [uncrustify](https://github.com/uncrustify/uncrustify)
* Objective-C++
* [clang](http://clang.llvm.org/)
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
* [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) :speech_balloon:
* [ocamllsp](https://github.com/ocaml/ocaml-lsp)
* [ocp-indent](https://github.com/OCamlPro/ocp-indent)
* [ols](https://github.com/freebroccolo/ocaml-language-server) :speech_balloon:
* [ols](https://github.com/freebroccolo/ocaml-language-server)
* Odin
* [ols](https://github.com/DanielGavin/ols) :speech_balloon:
* [ols](https://github.com/DanielGavin/ols)
* OpenApi
* [ibm_validator](https://github.com/IBM/openapi-validator)
* [prettier](https://github.com/prettier/prettier)
@@ -477,7 +476,7 @@ formatting.
* Packer (HCL)
* [packer-fmt-fixer](https://github.com/hashicorp/packer)
* Pascal
* [ptop](https://www.freepascal.org/tools/ptop.var) :speech_balloon:
* [ptop](https://www.freepascal.org/tools/ptop.var)
* Pawn
* [uncrustify](https://github.com/uncrustify/uncrustify)
* Perl
@@ -488,12 +487,12 @@ formatting.
* [perl6 -c](https://perl6.org) :warning:
* PHP
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
* [intelephense](https://github.com/bmewburn/intelephense-docs) :speech_balloon:
* [langserver](https://github.com/felixfbecker/php-language-server) :speech_balloon:
* [phan](https://github.com/phan/phan) see `:help ale-php-phan` to instructions :speech_balloon:
* [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](https://cs.symfony.com)
* [phpactor](https://github.com/phpactor/phpactor) :speech_balloon:
* [phpactor](https://github.com/phpactor/phpactor)
* [phpcbf](https://github.com/squizlabs/PHP_CodeSniffer)
* [phpcs](https://github.com/squizlabs/PHP_CodeSniffer)
* [phpmd](https://phpmd.org)
@@ -531,7 +530,7 @@ formatting.
* [puppet](https://puppet.com)
* [puppet-lint](https://puppet-lint.com)
* PureScript
* [purescript-language-server](https://github.com/nwolverson/purescript-language-server) :speech_balloon:
* [purescript-language-server](https://github.com/nwolverson/purescript-language-server)
* [purs-tidy](https://github.com/natefaubion/purescript-tidy)
* [purty](https://gitlab.com/joneshf/purty)
* Python
@@ -553,10 +552,10 @@ formatting.
* [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: :speech_balloon:
* [pylsp](https://github.com/python-lsp/python-lsp-server) :warning:
* [pyre](https://github.com/facebook/pyre-check) :warning:
* [pyrefly](https://github.com/facebook/pyrefly) :warning: :speech_balloon:
* [pyright](https://github.com/microsoft/pyright) :speech_balloon:
* [pyrefly](https://github.com/facebook/pyrefly) :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)
@@ -566,21 +565,21 @@ formatting.
* [yapf](https://github.com/google/yapf)
* QML
* [qmlfmt](https://github.com/jesperhh/qmlfmt)
* [qmllint](https://github.com/qt/qtdeclarative/tree/5.11/tools/qmllint) :speech_balloon:
* [qmllint](https://github.com/qt/qtdeclarative/tree/5.11/tools/qmllint)
* R
* [languageserver](https://github.com/REditorSupport/languageserver)
* [lintr](https://github.com/jimhester/lintr)
* [styler](https://github.com/r-lib/styler)
* Racket
* [racket-langserver](https://github.com/jeapostrophe/racket-langserver/tree/master) :speech_balloon:
* [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
* [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-reasonml-ols` for configuration instructions
* [ols](https://github.com/freebroccolo/ocaml-language-server) :speech_balloon:
* [reason-language-server](https://github.com/jaredly/reason-language-server) :speech_balloon:
* [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)
@@ -604,7 +603,7 @@ formatting.
* [roc_format](https://github.com/roc-lang/roc)
* [roc_language_server](https://github.com/roc-lang/roc)
* RPM spec
* [rpmlint](https://github.com/rpm-software-management/rpmlint) :warning: (see `:help ale-integration-spec`) :speech_balloon:
* [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)
@@ -617,13 +616,13 @@ formatting.
* [ruby](https://www.ruby-lang.org)
* [rubyfmt](https://github.com/fables-tales/rubyfmt)
* [rufo](https://github.com/ruby-formatter/rufo)
* [solargraph](https://solargraph.org) :speech_balloon:
* [sorbet](https://github.com/sorbet/sorbet) :speech_balloon:
* [solargraph](https://solargraph.org)
* [sorbet](https://github.com/sorbet/sorbet)
* [standardrb](https://github.com/testdouble/standard)
* [steep](https://github.com/soutaro/steep)
* [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) :speech_balloon:
* [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:
@@ -636,8 +635,8 @@ formatting.
* [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) :speech_balloon:
* [metals](https://scalameta.org/metals/) :speech_balloon:
* [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)
* [scalac](http://scala-lang.org)
* [scalafmt](https://scalameta.org/scalafmt/)
@@ -670,11 +669,11 @@ formatting.
* [stylelint](https://github.com/stylelint/stylelint)
* Svelte
* [prettier](https://github.com/prettier/prettier)
* [svelteserver](https://github.com/sveltejs/language-tools/tree/master/packages/language-server) :speech_balloon:
* [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) :speech_balloon:
* [sourcekit-lsp](https://github.com/apple/sourcekit-lsp)
* [swiftformat](https://github.com/nicklockwood/SwiftFormat)
* [swiftlint](https://github.com/realm/SwiftLint)
* systemd
@@ -685,8 +684,8 @@ formatting.
* [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) :speech_balloon:
* [terraform-lsp](https://github.com/juliosueiras/terraform-lsp) :speech_balloon:
* [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
@@ -697,7 +696,7 @@ formatting.
* Text
* [alex](https://github.com/get-alex/alex) :warning:
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
* [languagetool](https://languagetool.org/) :floppy_disk: :speech_balloon:
* [languagetool](https://languagetool.org/) :floppy_disk:
* [proselint](http://proselint.com/) :warning:
* [redpen](http://redpen.cc/) :warning:
* [textlint](https://textlint.github.io/) :warning:
@@ -708,7 +707,6 @@ formatting.
* [thriftcheck](https://github.com/pinterest/thriftcheck)
* TOML
* [dprint](https://dprint.dev)
* [tombi](https://tombi-toml.github.io/tombi/)
* TypeScript
* [biome](https://biomejs.dev/)
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
@@ -735,14 +733,14 @@ formatting.
* [slang](https://github.com/MikePopoloski/slang)
* [verilator](http://www.veripool.org/projects/verilator/wiki/Intro)
* [vlog](https://www.mentor.com/products/fv/questa/)
* [xvlog](https://www.xilinx.com/products/design-tools/vivado.html) :speech_balloon:
* [xvlog](https://www.xilinx.com/products/design-tools/vivado.html)
* [yosys](http://www.clifford.at/yosys/) :floppy_disk:
* VHDL
* [ghdl](https://github.com/ghdl/ghdl)
* [vcom](https://www.mentor.com/products/fv/questa/)
* [xvhdl](https://www.xilinx.com/products/design-tools/vivado.html) :speech_balloon:
* [xvhdl](https://www.xilinx.com/products/design-tools/vivado.html)
* Vim
* [vimls](https://github.com/iamcco/vim-language-server) :speech_balloon:
* [vimls](https://github.com/iamcco/vim-language-server)
* [vint](https://github.com/Kuniwak/vint)
* Vim help
* [alex](https://github.com/get-alex/alex) :warning:
@@ -751,7 +749,7 @@ formatting.
* 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) :speech_balloon:
* [vls](https://github.com/vuejs/vetur/tree/master/server)
* [volar](https://github.com/johnsoncodehk/volar)
* WGSL
* [naga](https://github.com/gfx-rs/naga)
@@ -768,14 +766,14 @@ formatting.
* [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) :warning: :speech_balloon:
* [yaml-language-server](https://github.com/redhat-developer/yaml-language-server) :speech_balloon:
* [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)
* [yamlfmt](https://github.com/google/yamlfmt)
* [yamllint](https://yamllint.readthedocs.io/)
* [yq](https://github.com/mikefarah/yq)
* YANG
* [yang-lsp](https://github.com/theia-ide/yang-lsp) :speech_balloon:
* [yang-lsp](https://github.com/theia-ide/yang-lsp)
* Yara
* [yls](https://github.com/avast/yls)
* Zeek
@@ -783,4 +781,4 @@ formatting.
* Zig
* [zigfmt](https://github.com/ziglang/zig)
* [zlint](https://github.com/DonIsaac/zlint)
* [zls](https://github.com/zigtools/zls) :speech_balloon:
* [zls](https://github.com/zigtools/zls)
@@ -1,26 +0,0 @@
Before:
Save g:ale_toml_tombi_executable
Save g:ale_toml_tombi_format_options
" Use an invalid global executable, so we don't match it.
let g:ale_toml_tombi_executable = 'xxxinvalid'
let g:ale_toml_tombi_format_options = ''
call ale#test#SetDirectory('/testplugin/test/fixers')
After:
Restore
call ale#test#RestoreDirectory()
Execute(The tombi format callback should return the correct default values):
AssertEqual
\ {'command': ale#Escape('xxxinvalid') . ' format'},
\ ale#fixers#tombi_format#Fix(bufnr(''))
Execute(The tombi format callback should include custom options):
let g:ale_toml_tombi_format_options = "--offline"
AssertEqual
\ {'command': ale#Escape('xxxinvalid') . ' format --offline'},
\ ale#fixers#tombi_format#Fix(bufnr(''))
@@ -1,26 +0,0 @@
Before:
Save g:ale_toml_tombi_executable
Save g:ale_toml_tombi_lint_options
" Use an invalid global executable, so we don't match it.
let g:ale_toml_tombi_executable = 'xxxinvalid'
let g:ale_toml_tombi_lint_options = ''
call ale#test#SetDirectory('/testplugin/test/fixers')
After:
Restore
call ale#test#RestoreDirectory()
Execute(The tombi lint callback should return the correct default values):
AssertEqual
\ {'command': ale#Escape('xxxinvalid') . ' lint'},
\ ale#fixers#tombi_lint#Fix(bufnr(''))
Execute(The tombi lint callback should include custom options):
let g:ale_toml_tombi_lint_options = "--offline"
AssertEqual
\ {'command': ale#Escape('xxxinvalid') . ' lint --offline'},
\ ale#fixers#tombi_lint#Fix(bufnr(''))
+2 -57
View File
@@ -1,8 +1,8 @@
Before:
Save g:ale_warn_about_trailing_whitespace
runtime ale_linters/shell/shellcheck.vim
After:
Restore
call ale#linter#Reset()
Execute(The shellcheck handler should handle basic errors or warnings <0.7.0):
AssertEqual
@@ -150,58 +150,3 @@ Execute(The shellcheck handler should handle info and style >=0.7.0):
\ ]
\ }'
\ ])
Execute(shellcheck errors for trailing whitespace should show by default):
AssertEqual
\ [
\ {
\ 'lnum': 8,
\ 'col': 12,
\ 'code': 'SC1101',
\ 'end_lnum': 8,
\ 'type': 'E',
\ 'end_col': 11,
\ 'text': 'Delete trailing spaces after \ to break line (or use quotes for literal space).',
\ 'detail': 'Delete trailing spaces after \ to break line (or use quotes for literal space).' . "\n\nFor more information:\n https://www.shellcheck.net/wiki/" . 'SC1101',
\ },
\ ],
\ ale#handlers#shellcheck#Handle(bufnr(''), [0, 7, 0], [
\ '{
\ "comments": [
\ {
\ "file": "-",
\ "line": 8,
\ "endLine": 8,
\ "column": 12,
\ "endColumn": 12,
\ "level": "error",
\ "code":1101,
\ "message":"Delete trailing spaces after \\ to break line (or use quotes for literal space).",
\ "fix":null
\ }
\ ]
\ }',
\ ])
Execute(shellcheck errors for trailing whitepsace should be able to be silenced by ale_warn_about_trailing_whitespace):
let g:ale_warn_about_trailing_whitespace = 0
AssertEqual
\ [],
\ ale#handlers#shellcheck#Handle(bufnr(''), [0, 7, 0], [
\ '{
\ "comments": [
\ {
\ "file": "-",
\ "line": 8,
\ "endLine": 8,
\ "column": 12,
\ "endColumn": 12,
\ "level": "error",
\ "code":1101,
\ "message":"Delete trailing spaces after \\ to break line (or use quotes for literal space).",
\ "fix":null
\ }
\ ]
\ }',
\ ])
+1 -3
View File
@@ -8,14 +8,12 @@ Execute(The slang handler should parse lines correctly):
AssertEqual
\ [
\ {
\ 'filename' : 'foo.sv',
\ 'lnum': 11,
\ 'col': 1,
\ 'type': 'W',
\ 'text': 'extra '';'' has no effect [-Wempty-member]',
\ },
\ {
\ 'filename' : 'bar.sv',
\ 'lnum': 24,
\ 'col': 12,
\ 'type': 'E',
@@ -24,5 +22,5 @@ Execute(The slang handler should parse lines correctly):
\ ],
\ ale_linters#verilog#slang#Handle(bufnr(''), [
\ 'foo.sv:11:1: warning: extra '';'' has no effect [-Wempty-member]',
\ 'bar.sv:24:12: error: cannot mix continuous and procedural assignments to variable ''data_o''',
\ 'foo.sv:24:12: error: cannot mix continuous and procedural assignments to variable ''data_o''',
\ ])
-30
View File
@@ -1,30 +0,0 @@
Before:
" This is just one example of a language using the linter.
call ale#assert#SetUpLinterTest('markdown', 'redpen')
Save g:ale_redpen_options
let g:ale_redpen_options = ''
After:
call ale#assert#TearDownLinterTest()
Execute(The options should be omitted by default):
AssertLinter
\ 'redpen',
\ 'redpen -f markdown -r json %t'
Execute(The options should be used in the command):
let g:ale_redpen_options = '--foo --bar'
AssertLinter
\ 'redpen',
\ 'redpen -f markdown -r json --foo --bar %t'
Execute(The command should work with different filetypes):
" Test with a different filetype
call ale#assert#SetUpLinterTest('text', 'redpen')
AssertLinter
\ 'redpen',
\ 'redpen -f text -r json %t'
+2 -2
View File
@@ -5,10 +5,10 @@ After:
call ale#assert#TearDownLinterTest()
Execute(The default slang command should be correct):
AssertLinter 'slang', 'slang -Weverything --diag-abs-paths -I%s:h -y%s:h %t'
AssertLinter 'slang', 'slang -Weverything -I%s:h %t'
Execute(slang options should be configurable):
" Additional args for the linter
let g:ale_verilog_slang_options = '--define-macro DWIDTH=12'
AssertLinter 'slang', 'slang -Weverything --diag-abs-paths -I%s:h -y%s:h --define-macro DWIDTH=12 %t'
AssertLinter 'slang', 'slang -Weverything -I%s:h --define-macro DWIDTH=12 %t'
-9
View File
@@ -6,7 +6,6 @@ Before:
let g:ale_ruby_sorbet_executable = 'srb'
let g:ale_ruby_sorbet_options = ''
let g:ale_ruby_sorbet_enable_watchman = 0
let g:ale_ruby_sorbet_initialization_options = { 'highlightUntyped': v:false }
After:
call ale#assert#TearDownLinterTest()
@@ -33,11 +32,3 @@ Execute(Setting bundle appends 'exec srb tc'):
AssertLinter 'path to/bundle', ale#Escape('path to/bundle')
\ . ' exec srb'
\ . ' tc --lsp --disable-watchman'
Execute(Should use predetermined initialization_options by default):
AssertLSPOptions { 'highlightUntyped': v:false }
Execute(Should be able to set custom initialization_options):
let g:ale_ruby_sorbet_initialization_options = {'enableTypedFalse': v:true}
AssertLSPOptions {'enableTypedFalse': v:true}
-18
View File
@@ -1,18 +0,0 @@
Before:
call ale#assert#SetUpLinterTest('toml', 'tombi')
After:
call ale#assert#TearDownLinterTest()
Execute(The default executable path should be correct):
AssertLinter 'tombi', ale#Escape('tombi') . ' lsp'
Execute(The project root should be detected correctly with a configuration file):
call ale#test#SetFilename('../test-files/toml/tombi/tombitoml/subdir/file.ext')
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/toml/tombi/tombitoml')
Execute(The project root should be detected correctly in Python projects):
call ale#test#SetFilename('../test-files/toml/tombi/pyprojecttoml/subdir/file.ext')
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/toml/tombi/pyprojecttoml')
+2 -2
View File
@@ -5,10 +5,10 @@ After:
call ale#assert#TearDownLinterTest()
Execute(The default verilator command should be correct):
AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h -y %s:h %t'
AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h %t'
Execute(verilator options should be configurable):
" Additional args for the linter
let g:ale_verilog_verilator_options = '-sv --default-language "1800-2012"'
AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h -y %s:h -sv --default-language "1800-2012" %t'
AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h -sv --default-language "1800-2012" %t'
+2 -2
View File
@@ -109,11 +109,11 @@ Execute(ale#lsp#response#ReadDiagnostics() should include sources in detail):
\ }
\ ])
Execute(ale#lsp#response#ReadDiagnostics() should keep line breaks in text):
Execute(ale#lsp#response#ReadDiagnostics() should keep detail with line breaks but replace with spaces in text):
AssertEqual [
\ {
\ 'type': 'E',
\ 'text': "cannot borrow `cap` as mutable\r\nmore than once at a time\n\nmutable borrow starts here\rin previous iteration of loop",
\ 'text': 'cannot borrow `cap` as mutable more than once at a time mutable borrow starts here in previous iteration of loop',
\ 'detail': "[rustc] cannot borrow `cap` as mutable\r\nmore than once at a time\n\nmutable borrow starts here\rin previous iteration of loop",
\ 'lnum': 10,
\ 'col': 15,
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
+1 -1
View File
@@ -30,7 +30,7 @@ Before:
\ 'nr': -1,
\ 'type': 'E',
\ 'code': 'semi',
\ 'text': "Missing\nsemicolon.\r",
\ 'text': "Missing semicolon.\r",
\ 'detail': "Every statement should end with a semicolon\nsecond line",
\ },
\ {
+2 -2
View File
@@ -407,7 +407,7 @@ Execute(PreProcess should allow the `project_root` to be set as a String):
\ 'project_root': '/foo/bar',
\})
AssertEqual '/foo/bar', ale#lsp_linter#FindProjectRoot(0, g:linter)
AssertEqual '/foo/bar', ale#linter#GetRoot(0, g:linter)
Execute(PreProcess should `project_root` be set as a Function):
let g:linter = ale#linter#PreProcess('testft', {
@@ -418,7 +418,7 @@ Execute(PreProcess should `project_root` be set as a Function):
\ 'project_root': {-> '/foo/bar'},
\})
AssertEqual '/foo/bar', ale#lsp_linter#FindProjectRoot(0, g:linter)
AssertEqual '/foo/bar', ale#linter#GetRoot(0, g:linter)
Execute(PreProcess should complain when `project_root` is invalid):
AssertThrows call ale#linter#PreProcess('testft', {
+27
View File
@@ -0,0 +1,27 @@
Before:
Save g:ale_root
Save b:ale_root
call ale#test#SetDirectory('/testplugin/test')
After:
Restore
call ale#test#RestoreDirectory()
Execute(The global setting is used as the project root):
let g:ale_root = '/foo/python'
call ale#test#SetFilename('test-files/python/no_virtualenv/subdir/foo/bar.py')
AssertEqual '/foo/python', ale#python#FindProjectRoot(bufnr(''))
Execute(The buffer setting overrides the global setting):
let g:ale_root = '/foo/python'
let b:ale_root = '/bar/python'
call ale#test#SetFilename('test-files/python/no_virtualenv/subdir/foo/bar.py')
AssertEqual '/bar/python', ale#python#FindProjectRoot(bufnr(''))
Execute(Fallback to searching when no setting is used):
unlet! g:ale_root
unlet! b:ale_root
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'),
\ ale#python#FindProjectRoot(bufnr(''))