mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-25 17:58:42 +08:00
Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d2f4090c33 | |||
| 59c6b4f7b0 | |||
| 21d5de18b2 | |||
| ed26d1f1d9 | |||
| 9811114948 | |||
| 4217461c48 | |||
| 528e25954b | |||
| b415dddf9f | |||
| 55acb6536e | |||
| 34d1fd266b | |||
| 84eae97bf2 | |||
| 9acafa8018 | |||
| 11cbd96667 | |||
| ce1ee7c598 | |||
| a083d58c7f | |||
| 3539f39d4d | |||
| 37e64b5caf | |||
| 822d9a1bf3 | |||
| 92dd497e6c | |||
| 6d7bc15d9a | |||
| 29f1ff2579 | |||
| 7df94447c1 | |||
| c74b917648 | |||
| 206b414120 | |||
| 5dfd1fdb9a | |||
| ac691b0b89 | |||
| 28573c8ada | |||
| d6f1a47647 | |||
| 487d915984 | |||
| c7f3ba9d41 | |||
| 295752ff3e | |||
| 3d68ec7857 | |||
| e670c9781c | |||
| 0d1d0a9f81 | |||
| c8890af8d4 | |||
| 9abe393961 | |||
| 4b1bf3ee8f | |||
| edccdfa9ef |
+2
-2
@@ -41,10 +41,10 @@ install:
|
|||||||
- ps: >-
|
- ps: >-
|
||||||
if (!(Test-Path -Path C:\vim)){
|
if (!(Test-Path -Path C:\vim)){
|
||||||
Add-Type -A System.IO.Compression.FileSystem
|
Add-Type -A System.IO.Compression.FileSystem
|
||||||
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586w32.zip `
|
Invoke-WebRequest https://github.com/dense-analysis/ale/releases/download/v4.0.0/vim80-586w32.zip `
|
||||||
-OutFile C:\vim.zip
|
-OutFile C:\vim.zip
|
||||||
[IO.Compression.ZipFile]::ExtractToDirectory('C:\vim.zip', 'C:\vim')
|
[IO.Compression.ZipFile]::ExtractToDirectory('C:\vim.zip', 'C:\vim')
|
||||||
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586rt.zip `
|
Invoke-WebRequest https://github.com/dense-analysis/ale/releases/download/v4.0.0/vim80-586rt.zip `
|
||||||
-OutFile C:\rt.zip
|
-OutFile C:\rt.zip
|
||||||
[IO.Compression.ZipFile]::ExtractToDirectory('C:\rt.zip', 'C:\vim')
|
[IO.Compression.ZipFile]::ExtractToDirectory('C:\rt.zip', 'C:\vim')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,14 @@ linting and fixing of code in Vim. ALE offers the following.
|
|||||||
* Windows support
|
* Windows support
|
||||||
* Well-integrated with other plugins
|
* Well-integrated with other plugins
|
||||||
|
|
||||||
|
## Sponsorship
|
||||||
|
|
||||||
|
If you would like to donate to Dense Analysis to say thank you for ALE, please
|
||||||
|
consider visiting our [Sponsorship page](https://denseanalysis.org/sponsors/).
|
||||||
|
Funds will be used to pay for our hosting fees and research. Whilst visiting our
|
||||||
|
site, please feel free to make use of our educational resources and other
|
||||||
|
recommended tools.
|
||||||
|
|
||||||
## Supported Languages and Tools
|
## Supported Languages and Tools
|
||||||
|
|
||||||
ALE supports a wide variety of languages and tools. See the
|
ALE supports a wide variety of languages and tools. See the
|
||||||
|
|||||||
@@ -2,11 +2,44 @@
|
|||||||
" Description: ansible-lint for ansible-yaml files
|
" Description: ansible-lint for ansible-yaml files
|
||||||
|
|
||||||
call ale#Set('ansible_ansible_lint_executable', 'ansible-lint')
|
call ale#Set('ansible_ansible_lint_executable', 'ansible-lint')
|
||||||
|
call ale#Set('ansible_ansible_lint_auto_pipenv', 0)
|
||||||
|
call ale#Set('ansible_ansible_lint_auto_poetry', 0)
|
||||||
|
call ale#Set('ansible_ansible_lint_auto_uv', 0)
|
||||||
|
call ale#Set('ansible_ansible_lint_change_directory', 1)
|
||||||
|
|
||||||
function! ale_linters#ansible#ansible_lint#GetExecutable(buffer) abort
|
function! ale_linters#ansible#ansible_lint#GetExecutable(buffer) abort
|
||||||
|
if (ale#Var(a:buffer, 'python_auto_pipenv')
|
||||||
|
\ || ale#Var(a:buffer, 'ansible_ansible_lint_auto_pipenv'))
|
||||||
|
\ && ale#python#PipenvPresent(a:buffer)
|
||||||
|
return 'pipenv'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (ale#Var(a:buffer, 'python_auto_poetry')
|
||||||
|
\ || ale#Var(a:buffer, 'ansible_ansible_lint_auto_poetry'))
|
||||||
|
\ && ale#python#PoetryPresent(a:buffer)
|
||||||
|
return 'poetry'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (ale#Var(a:buffer, 'python_auto_uv')
|
||||||
|
\ || ale#Var(a:buffer, 'ansible_ansible_lint_auto_uv'))
|
||||||
|
\ && ale#python#UvPresent(a:buffer)
|
||||||
|
return 'uv'
|
||||||
|
endif
|
||||||
|
|
||||||
return ale#Var(a:buffer, 'ansible_ansible_lint_executable')
|
return ale#Var(a:buffer, 'ansible_ansible_lint_executable')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! ale_linters#ansible#ansible_lint#GetCwd(buffer) abort
|
||||||
|
if ale#Var(a:buffer, 'ansible_ansible_lint_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#ansible#ansible_lint#Handle(buffer, version, lines) abort
|
function! ale_linters#ansible#ansible_lint#Handle(buffer, version, lines) abort
|
||||||
for l:line in a:lines[:10]
|
for l:line in a:lines[:10]
|
||||||
if match(l:line, '^Traceback') >= 0
|
if match(l:line, '^Traceback') >= 0
|
||||||
@@ -103,28 +136,50 @@ function! ale_linters#ansible#ansible_lint#Handle(buffer, version, lines) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale_linters#ansible#ansible_lint#GetCommand(buffer, version) abort
|
function! ale_linters#ansible#ansible_lint#GetCommand(buffer, version) abort
|
||||||
let l:commands = {
|
let l:executable = ale_linters#ansible#ansible_lint#GetExecutable(a:buffer)
|
||||||
\ '>=6.0.0': '%e --nocolor -f json -x yaml %s',
|
|
||||||
\ '>=5.0.0': '%e --nocolor --parseable-severity -x yaml %s',
|
let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$'
|
||||||
\ '<5.0.0': '%e --nocolor -p %t'
|
\ ? ' run ansible-lint'
|
||||||
|
\ : ''
|
||||||
|
|
||||||
|
let l:opts_map = {
|
||||||
|
\ '>=6.0.0': ' --nocolor -f json -x yaml %s',
|
||||||
|
\ '>=5.0.0': ' --nocolor --parseable-severity -x yaml %s',
|
||||||
|
\ '<5.0.0': ' --nocolor -p %t'
|
||||||
\}
|
\}
|
||||||
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'] :
|
let l:cmd_opts = ale#semver#GTE(a:version, [6, 0]) ? l:opts_map['>=6.0.0'] :
|
||||||
\ l:commands['<5.0.0']
|
\ ale#semver#GTE(a:version, [5, 0]) ? l:opts_map['>=5.0.0'] :
|
||||||
|
\ l:opts_map['<5.0.0']
|
||||||
|
|
||||||
|
let l:command = ale#Escape(l:executable) . l:exec_args . l:cmd_opts
|
||||||
|
|
||||||
return l:command
|
return l:command
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! ale_linters#ansible#ansible_lint#RunWithVersionCheck(buffer) abort
|
||||||
|
let l:executable = ale_linters#ansible#ansible_lint#GetExecutable(a:buffer)
|
||||||
|
|
||||||
|
let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$'
|
||||||
|
\ ? ' run ansible-lint'
|
||||||
|
\ : ''
|
||||||
|
|
||||||
|
let l:command = ale#Escape(l:executable) . l:exec_args . ' --version'
|
||||||
|
|
||||||
|
return ale#semver#RunWithVersionCheck(
|
||||||
|
\ a:buffer,
|
||||||
|
\ l:executable,
|
||||||
|
\ l:command,
|
||||||
|
\ function('ale_linters#ansible#ansible_lint#GetCommand'),
|
||||||
|
\)
|
||||||
|
endfunction
|
||||||
|
|
||||||
call ale#linter#Define('ansible', {
|
call ale#linter#Define('ansible', {
|
||||||
\ 'name': 'ansible_lint',
|
\ 'name': 'ansible_lint',
|
||||||
\ 'aliases': ['ansible', 'ansible-lint'],
|
\ 'aliases': ['ansible', 'ansible-lint'],
|
||||||
\ 'executable': function('ale_linters#ansible#ansible_lint#GetExecutable'),
|
\ 'executable': function('ale_linters#ansible#ansible_lint#GetExecutable'),
|
||||||
\ 'command': {buffer -> ale#semver#RunWithVersionCheck(
|
\ 'cwd': function('ale_linters#ansible#ansible_lint#GetCwd'),
|
||||||
\ buffer,
|
\ 'command': function('ale_linters#ansible#ansible_lint#RunWithVersionCheck'),
|
||||||
\ ale_linters#ansible#ansible_lint#GetExecutable(buffer),
|
|
||||||
\ '%e --version',
|
|
||||||
\ function('ale_linters#ansible#ansible_lint#GetCommand'),
|
|
||||||
\ )},
|
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\ 'callback': {buffer, lines -> ale#semver#RunWithVersionCheck(
|
\ 'callback': {buffer, lines -> ale#semver#RunWithVersionCheck(
|
||||||
\ buffer,
|
\ buffer,
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
" Author: rhysd https://rhysd.github.io
|
" Author: rhysd https://rhysd.github.io
|
||||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||||
|
|
||||||
call ale#linter#Define('asciidoc', {
|
call ale#handlers#redpen#DefineLinter('asciidoc')
|
||||||
\ 'name': 'redpen',
|
|
||||||
\ 'executable': 'redpen',
|
|
||||||
\ 'command': 'redpen -f asciidoc -r json %t',
|
|
||||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
|
||||||
\})
|
|
||||||
|
|||||||
@@ -5,6 +5,14 @@ call ale#Set('bitbake_oelint_adv_executable', 'oelint-adv')
|
|||||||
call ale#Set('bitbake_oelint_adv_options', '')
|
call ale#Set('bitbake_oelint_adv_options', '')
|
||||||
call ale#Set('bitbake_oelint_adv_config', '.oelint.cfg')
|
call ale#Set('bitbake_oelint_adv_config', '.oelint.cfg')
|
||||||
|
|
||||||
|
function! ale_linters#bitbake#oelint_adv#StripAnsiCodes(line) abort
|
||||||
|
return substitute(a:line, '\e\[[0-9;]\+[mK]', '', 'g')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! ale_linters#bitbake#oelint_adv#RemoveBranch(line) abort
|
||||||
|
return substitute(a:line, ' \[branch:.*', '', 'g')
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! ale_linters#bitbake#oelint_adv#Command(buffer) abort
|
function! ale_linters#bitbake#oelint_adv#Command(buffer) abort
|
||||||
let l:config_file = ale#path#FindNearestFile(a:buffer,
|
let l:config_file = ale#path#FindNearestFile(a:buffer,
|
||||||
\ ale#Var(a:buffer, 'bitbake_oelint_adv_config'))
|
\ ale#Var(a:buffer, 'bitbake_oelint_adv_config'))
|
||||||
@@ -17,26 +25,25 @@ function! ale_linters#bitbake#oelint_adv#Command(buffer) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale_linters#bitbake#oelint_adv#Handle(buffer, lines) abort
|
function! ale_linters#bitbake#oelint_adv#Handle(buffer, lines) abort
|
||||||
let l:pattern = '\v^(.+):(.+):(.+):(.+):(.+)$'
|
let l:pattern = '\v^(.{-}):(.{-}):(.{-}):(.{-}):(.{-})$'
|
||||||
let l:output = []
|
let l:output = []
|
||||||
|
|
||||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||||
call add(l:output, {
|
call add(l:output, {
|
||||||
\ 'lnum': str2nr(l:match[2]),
|
\ 'lnum': str2nr(l:match[2]),
|
||||||
\ 'type': l:match[3] is# 'error'
|
\ 'type': l:match[3] is# 'error'
|
||||||
\ ? 'E' : (l:match[3] is# 'warning' ? 'W' : 'I'),
|
\ ? 'E'
|
||||||
\ 'text': StripAnsiCodes(l:match[5]),
|
\ : (l:match[3] is# 'warning' ? 'W' : 'I'),
|
||||||
\ 'code': l:match[4]
|
\ 'text': ale_linters#bitbake#oelint_adv#RemoveBranch(
|
||||||
\ })
|
\ ale_linters#bitbake#oelint_adv#StripAnsiCodes(l:match[5])
|
||||||
|
\ ),
|
||||||
|
\ 'code': l:match[4],
|
||||||
|
\})
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
return l:output
|
return l:output
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! StripAnsiCodes(line) abort
|
|
||||||
return substitute(a:line, '\e\[[0-9;]\+[mK]', '', 'g')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
call ale#linter#Define('bitbake', {
|
call ale#linter#Define('bitbake', {
|
||||||
\ 'name': 'oelint_adv',
|
\ 'name': 'oelint_adv',
|
||||||
\ 'output_stream': 'both',
|
\ 'output_stream': 'both',
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
" Author: J. Handsel <jennpbc@posteo.net>, Thyme-87 <thyme-87@posteo.me>
|
||||||
|
" Description: use checkov for providing warnings for cloudformation via ale
|
||||||
|
|
||||||
|
call ale#Set('cloudformation_checkov_executable', 'checkov')
|
||||||
|
call ale#Set('cloudformation_checkov_options', '')
|
||||||
|
|
||||||
|
function! ale_linters#cloudformation#checkov#GetExecutable(buffer) abort
|
||||||
|
return ale#Var(a:buffer, 'cloudformation_checkov_executable')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! ale_linters#cloudformation#checkov#GetCommand(buffer) abort
|
||||||
|
return '%e ' . '-f %t -o json --quiet --framework cloudformation ' . ale#Var(a:buffer, 'cloudformation_checkov_options')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! ale_linters#cloudformation#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('cloudformation', {
|
||||||
|
\ 'name': 'checkov',
|
||||||
|
\ 'output_stream': 'stdout',
|
||||||
|
\ 'executable': function('ale_linters#cloudformation#checkov#GetExecutable'),
|
||||||
|
\ 'command': function('ale_linters#cloudformation#checkov#GetCommand'),
|
||||||
|
\ 'callback': 'ale_linters#cloudformation#checkov#Handle',
|
||||||
|
\})
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
" Author: gomfol12
|
||||||
|
" Desciption: A linter for fortran using fortitude.
|
||||||
|
|
||||||
|
call ale#Set('fortran_fortitude_executable', 'fortitude')
|
||||||
|
call ale#Set('fortran_fortitude_options', '')
|
||||||
|
|
||||||
|
let s:severity_map = {
|
||||||
|
\ 'E': 'E',
|
||||||
|
\ 'C': 'W',
|
||||||
|
\ 'OB': 'I',
|
||||||
|
\ 'MOD': 'I',
|
||||||
|
\ 'S': 'I',
|
||||||
|
\ 'PORT': 'I',
|
||||||
|
\ 'FORT': 'I',
|
||||||
|
\}
|
||||||
|
|
||||||
|
function! ale_linters#fortran#fortitude#Handle(buffer, lines) abort
|
||||||
|
let l:output = []
|
||||||
|
|
||||||
|
for l:error in ale#util#FuzzyJSONDecode(a:lines, [])
|
||||||
|
let l:prefix = matchstr(l:error['code'], '^\a\+')
|
||||||
|
let l:type = get(s:severity_map, l:prefix, 'I')
|
||||||
|
|
||||||
|
call add(l:output, {
|
||||||
|
\ 'lnum': l:error['location']['row'],
|
||||||
|
\ 'end_lnum': l:error['end_location']['row'],
|
||||||
|
\ 'col': l:error['location']['column'],
|
||||||
|
\ 'end_col': l:error['end_location']['column'],
|
||||||
|
\ 'text': l:error['message'],
|
||||||
|
\ 'type': l:type,
|
||||||
|
\ 'code': l:error['code'],
|
||||||
|
\})
|
||||||
|
endfor
|
||||||
|
|
||||||
|
return l:output
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call ale#linter#Define('fortran', {
|
||||||
|
\ 'name': 'fortitude',
|
||||||
|
\ 'output_stream': 'stdout',
|
||||||
|
\ 'executable': {b -> ale#Var(b, 'fortran_fortitude_executable')},
|
||||||
|
\ 'command': {b ->
|
||||||
|
\ '%e' . ' check --output-format json' . ale#Pad(ale#Var(b, 'fortran_fortitude_options')) . ' %s'
|
||||||
|
\ },
|
||||||
|
\ 'callback': 'ale_linters#fortran#fortitude#Handle',
|
||||||
|
\ 'lint_file': 1,
|
||||||
|
\})
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
" Description: linter for jinja using j2lint
|
||||||
|
|
||||||
|
call ale#Set('jinja_j2lint_executable', 'j2lint')
|
||||||
|
call ale#Set('jinja_j2lint_options', '')
|
||||||
|
call ale#Set('jinja_j2lint_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||||
|
call ale#Set('jinja_j2lint_auto_pipenv', 0)
|
||||||
|
call ale#Set('jinja_j2lint_auto_poetry', 0)
|
||||||
|
call ale#Set('jinja_j2lint_auto_uv', 0)
|
||||||
|
|
||||||
|
function! ale_linters#jinja#j2lint#GetExecutable(buffer) abort
|
||||||
|
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'jinja_j2lint_auto_pipenv'))
|
||||||
|
\ && ale#python#PipenvPresent(a:buffer)
|
||||||
|
return 'pipenv'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'jinja_j2lint_auto_poetry'))
|
||||||
|
\ && ale#python#PoetryPresent(a:buffer)
|
||||||
|
return 'poetry'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (ale#Var(a:buffer, 'python_auto_uv') || ale#Var(a:buffer, 'jinja_j2lint_auto_uv'))
|
||||||
|
\ && ale#python#UvPresent(a:buffer)
|
||||||
|
return 'uv'
|
||||||
|
endif
|
||||||
|
|
||||||
|
return ale#python#FindExecutable(a:buffer, 'jinja_j2lint', ['j2lint'])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! ale_linters#jinja#j2lint#GetCommand(buffer) abort
|
||||||
|
let l:executable = ale_linters#jinja#j2lint#GetExecutable(a:buffer)
|
||||||
|
|
||||||
|
let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$'
|
||||||
|
\ ? ' run j2lint'
|
||||||
|
\ : ''
|
||||||
|
|
||||||
|
return ale#Escape(l:executable) . l:exec_args
|
||||||
|
\ . ale#Pad(ale#Var(a:buffer, 'jinja_j2lint_options'))
|
||||||
|
\ . ' %t'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call ale#linter#Define('jinja', {
|
||||||
|
\ 'name': 'j2lint',
|
||||||
|
\ 'executable': function('ale_linters#jinja#j2lint#GetExecutable'),
|
||||||
|
\ 'command': function('ale_linters#jinja#j2lint#GetCommand'),
|
||||||
|
\ 'callback': 'ale#handlers#unix#HandleAsError',
|
||||||
|
\})
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
" Author: rhysd https://rhysd.github.io
|
" Author: rhysd https://rhysd.github.io
|
||||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||||
|
|
||||||
call ale#linter#Define('markdown', {
|
call ale#handlers#redpen#DefineLinter('markdown')
|
||||||
\ 'name': 'redpen',
|
|
||||||
\ 'executable': 'redpen',
|
|
||||||
\ 'command': 'redpen -f markdown -r json %t',
|
|
||||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
|
||||||
\})
|
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
" Authors: ophirr33 <coghlan.ty@gmail.com>, rymdbar <https://rymdbar.x20.se/>
|
||||||
|
" Description: Perl::LanguageServer for perl, from cpan.org
|
||||||
|
|
||||||
|
" This should have the same value as in perl.vim
|
||||||
|
call ale#Set('perl_perl_executable', 'perl')
|
||||||
|
" Please note that perl_perl_options does not exist here.
|
||||||
|
|
||||||
|
function! ale_linters#perl#languageserver#GetProjectRoot(buffer) abort
|
||||||
|
" Makefile.PL, https://perldoc.perl.org/ExtUtils::MakeMaker
|
||||||
|
" Build.PL, https://metacpan.org/pod/Module::Build
|
||||||
|
" dist.ini, https://metacpan.org/pod/Dist::Zilla
|
||||||
|
let l:potential_roots = [ 'Makefile.PL', 'Build.PL', 'dist.ini', '.git' ]
|
||||||
|
|
||||||
|
for l:root in l:potential_roots
|
||||||
|
let l:project_root = ale#path#FindNearestFile(a:buffer, l:root)
|
||||||
|
|
||||||
|
if !empty(l:project_root)
|
||||||
|
return fnamemodify(l:project_root . '/', ':p:h:h')
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
return fnamemodify(expand('#' . a:buffer . ':p:h'), ':p:h')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call ale#Set('perl_languageserver_config', {})
|
||||||
|
|
||||||
|
function! s:get_lsp_config(buffer) abort
|
||||||
|
" This tool doesn't kick in unless workspace/didChangeConfiguration is
|
||||||
|
" called, thus this function returning a fallback dict when there is no
|
||||||
|
" config.
|
||||||
|
let l:lsp_config = ale#Var(a:buffer, 'perl_languageserver_config')
|
||||||
|
|
||||||
|
return empty(l:lsp_config) ? { 'perl': { 'enable': 1 } } : l:lsp_config
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call ale#linter#Define('perl', {
|
||||||
|
\ 'name': 'languageserver',
|
||||||
|
\ 'lsp': 'stdio',
|
||||||
|
\ 'executable': {b -> ale#Var(b, 'perl_perl_executable')},
|
||||||
|
\ 'command': '%e -MPerl::LanguageServer -ePerl::LanguageServer::run',
|
||||||
|
\ 'lsp_config': {b -> s:get_lsp_config(b)},
|
||||||
|
\ 'project_root': function('ale_linters#perl#languageserver#GetProjectRoot'),
|
||||||
|
\ })
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
" Author: Arizard <https://github.com/Arizard>
|
" Author: Arizard <https://github.com/Arizard>
|
||||||
" Description: PHPactor integration for ALE
|
" Description: PHPactor integration for ALE
|
||||||
|
|
||||||
|
call ale#Set('php_phpactor_executable', 'phpactor')
|
||||||
|
call ale#Set('php_phpactor_init_options', {})
|
||||||
|
|
||||||
" Copied from langserver.vim
|
" Copied from langserver.vim
|
||||||
function! ale_linters#php#phpactor#GetProjectRoot(buffer) abort
|
function! ale_linters#php#phpactor#GetProjectRoot(buffer) abort
|
||||||
let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json')
|
let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json')
|
||||||
@@ -17,7 +20,8 @@ endfunction
|
|||||||
call ale#linter#Define('php', {
|
call ale#linter#Define('php', {
|
||||||
\ 'name': 'phpactor',
|
\ 'name': 'phpactor',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable': 'phpactor',
|
\ 'executable': {b -> ale#Var(b, 'php_phpactor_executable')},
|
||||||
\ 'command': '%e language-server',
|
\ 'command': '%e language-server',
|
||||||
|
\ 'initialization_options': {b -> ale#Var(b, 'php_phpactor_init_options')},
|
||||||
\ 'project_root': function('ale_linters#php#phpactor#GetProjectRoot'),
|
\ 'project_root': function('ale_linters#php#phpactor#GetProjectRoot'),
|
||||||
\})
|
\})
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ function! ale_linters#php#phpstan#GetCommand(buffer, version) abort
|
|||||||
|
|
||||||
let l:level = ale#Var(a:buffer, 'php_phpstan_level')
|
let l:level = ale#Var(a:buffer, 'php_phpstan_level')
|
||||||
|
|
||||||
|
if type(l:level) is v:t_number
|
||||||
|
let l:level = string(l:level)
|
||||||
|
endif
|
||||||
|
|
||||||
if empty(l:level) && empty(ale_linters#php#phpstan#FindConfigFile(a:buffer))
|
if empty(l:level) && empty(ale_linters#php#phpstan#FindConfigFile(a:buffer))
|
||||||
" if no configuration file is found, then use 4 as a default level
|
" if no configuration file is found, then use 4 as a default level
|
||||||
let l:level = '4'
|
let l:level = '4'
|
||||||
@@ -83,6 +87,10 @@ function! ale_linters#php#phpstan#FindConfigFile(buffer) abort
|
|||||||
let l:result = ale#path#FindNearestFile(a:buffer, 'phpstan.neon.dist')
|
let l:result = ale#path#FindNearestFile(a:buffer, 'phpstan.neon.dist')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if empty(l:result)
|
||||||
|
let l:result = ale#path#FindNearestFile(a:buffer, 'phpstan.dist.neon')
|
||||||
|
endif
|
||||||
|
|
||||||
return l:result
|
return l:result
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ function! ale_linters#python#pylsp#GetCwd(buffer) abort
|
|||||||
\ 'name': 'pylsp',
|
\ 'name': 'pylsp',
|
||||||
\ 'project_root': function('ale#python#FindProjectRoot'),
|
\ 'project_root': function('ale#python#FindProjectRoot'),
|
||||||
\}
|
\}
|
||||||
let l:root = ale#linter#GetRoot(a:buffer, l:fake_linter)
|
let l:root = ale#lsp_linter#FindProjectRoot(a:buffer, l:fake_linter)
|
||||||
|
|
||||||
return !empty(l:root) ? l:root : v:null
|
return !empty(l:root) ? l:root : v:null
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ function! ale_linters#python#pyright#GetCwd(buffer) abort
|
|||||||
\ 'name': 'pyright',
|
\ 'name': 'pyright',
|
||||||
\ 'project_root': function('ale#python#FindProjectRoot'),
|
\ 'project_root': function('ale#python#FindProjectRoot'),
|
||||||
\}
|
\}
|
||||||
let l:root = ale#linter#GetRoot(a:buffer, l:fake_linter)
|
let l:root = ale#lsp_linter#FindProjectRoot(a:buffer, l:fake_linter)
|
||||||
|
|
||||||
return !empty(l:root) ? l:root : v:null
|
return !empty(l:root) ? l:root : v:null
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
@@ -34,6 +34,22 @@ function! ale_linters#python#ruff#GetExecutable(buffer) abort
|
|||||||
return ale#python#FindExecutable(a:buffer, 'python_ruff', ['ruff'])
|
return ale#python#FindExecutable(a:buffer, 'python_ruff', ['ruff'])
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! ale_linters#python#ruff#RunWithVersionCheck(buffer) abort
|
||||||
|
let l:executable = ale_linters#python#ruff#GetExecutable(a:buffer)
|
||||||
|
let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$'
|
||||||
|
\ ? ' run ruff'
|
||||||
|
\ : ''
|
||||||
|
|
||||||
|
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#ruff#GetCommand'),
|
||||||
|
\)
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! ale_linters#python#ruff#GetCwd(buffer) abort
|
function! ale_linters#python#ruff#GetCwd(buffer) abort
|
||||||
if ale#Var(a:buffer, 'python_ruff_change_directory')
|
if ale#Var(a:buffer, 'python_ruff_change_directory')
|
||||||
" Run from project root if found, else from buffer dir.
|
" Run from project root if found, else from buffer dir.
|
||||||
@@ -76,6 +92,10 @@ function! ale_linters#python#ruff#Handle(buffer, lines) abort
|
|||||||
continue
|
continue
|
||||||
endtry
|
endtry
|
||||||
|
|
||||||
|
if empty(l:item)
|
||||||
|
continue
|
||||||
|
endif
|
||||||
|
|
||||||
if (l:item.code is# 'W291' || l:item.code is# 'W293')
|
if (l:item.code is# 'W291' || l:item.code is# 'W293')
|
||||||
\&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
|
\&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
|
||||||
" Skip warnings for trailing whitespace if the option is off.
|
" Skip warnings for trailing whitespace if the option is off.
|
||||||
@@ -106,12 +126,7 @@ call ale#linter#Define('python', {
|
|||||||
\ 'name': 'ruff',
|
\ 'name': 'ruff',
|
||||||
\ 'executable': function('ale_linters#python#ruff#GetExecutable'),
|
\ 'executable': function('ale_linters#python#ruff#GetExecutable'),
|
||||||
\ 'cwd': function('ale_linters#python#ruff#GetCwd'),
|
\ 'cwd': function('ale_linters#python#ruff#GetCwd'),
|
||||||
\ 'command': {buffer -> ale#semver#RunWithVersionCheck(
|
\ 'command': function('ale_linters#python#ruff#RunWithVersionCheck'),
|
||||||
\ buffer,
|
|
||||||
\ ale_linters#python#ruff#GetExecutable(buffer),
|
|
||||||
\ '%e --version',
|
|
||||||
\ function('ale_linters#python#ruff#GetCommand'),
|
|
||||||
\ )},
|
|
||||||
\ 'callback': 'ale_linters#python#ruff#Handle',
|
\ 'callback': 'ale_linters#python#ruff#Handle',
|
||||||
\ 'output_stream': 'both',
|
\ 'output_stream': 'both',
|
||||||
\ 'read_buffer': 1,
|
\ 'read_buffer': 1,
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
" Author: rhysd https://rhysd.github.io
|
" Author: rhysd https://rhysd.github.io
|
||||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||||
|
|
||||||
call ale#linter#Define('review', {
|
call ale#handlers#redpen#DefineLinter('review')
|
||||||
\ 'name': 'redpen',
|
|
||||||
\ 'executable': 'redpen',
|
|
||||||
\ 'command': 'redpen -f review -r json %t',
|
|
||||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
|
||||||
\})
|
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
" Author: rhysd https://rhysd.github.io
|
" Author: rhysd https://rhysd.github.io
|
||||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||||
|
|
||||||
call ale#linter#Define('rst', {
|
call ale#handlers#redpen#DefineLinter('rst')
|
||||||
\ 'name': 'redpen',
|
|
||||||
\ 'executable': 'redpen',
|
|
||||||
\ 'command': 'redpen -f rest -r json %t',
|
|
||||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
|
||||||
\})
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
call ale#Set('ruby_sorbet_executable', 'srb')
|
call ale#Set('ruby_sorbet_executable', 'srb')
|
||||||
call ale#Set('ruby_sorbet_options', '')
|
call ale#Set('ruby_sorbet_options', '')
|
||||||
call ale#Set('ruby_sorbet_enable_watchman', 0)
|
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
|
function! ale_linters#ruby#sorbet#GetCommand(buffer) abort
|
||||||
let l:executable = ale#Var(a:buffer, 'ruby_sorbet_executable')
|
let l:executable = ale#Var(a:buffer, 'ruby_sorbet_executable')
|
||||||
@@ -21,6 +22,6 @@ call ale#linter#Define('ruby', {
|
|||||||
\ 'language': 'ruby',
|
\ 'language': 'ruby',
|
||||||
\ 'executable': {b -> ale#Var(b, 'ruby_sorbet_executable')},
|
\ 'executable': {b -> ale#Var(b, 'ruby_sorbet_executable')},
|
||||||
\ 'command': function('ale_linters#ruby#sorbet#GetCommand'),
|
\ 'command': function('ale_linters#ruby#sorbet#GetCommand'),
|
||||||
\ 'project_root': function('ale#ruby#FindProjectRoot')
|
\ 'project_root': function('ale#ruby#FindProjectRoot'),
|
||||||
|
\ 'initialization_options': {b -> ale#Var(b, 'ruby_sorbet_initialization_options')}
|
||||||
\})
|
\})
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ function! ale_linters#scala#metals#GetProjectRoot(buffer) abort
|
|||||||
|
|
||||||
let l:potential_roots = [
|
let l:potential_roots = [
|
||||||
\ 'build.sc',
|
\ 'build.sc',
|
||||||
|
\ 'build.mill',
|
||||||
\ 'build.sbt',
|
\ 'build.sbt',
|
||||||
\ '.bloop',
|
\ '.bloop',
|
||||||
\ '.metals',
|
\ '.metals',
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
" Author: rhysd https://rhysd.github.io
|
" Author: rhysd https://rhysd.github.io
|
||||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||||
|
|
||||||
call ale#linter#Define('tex', {
|
call ale#handlers#redpen#DefineLinter('tex')
|
||||||
\ 'name': 'redpen',
|
|
||||||
\ 'executable': 'redpen',
|
|
||||||
\ 'command': 'redpen -f latex -r json %t',
|
|
||||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
|
||||||
\})
|
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
" Author: rhysd https://rhysd.github.io
|
" Author: rhysd https://rhysd.github.io
|
||||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||||
|
|
||||||
call ale#linter#Define('text', {
|
call ale#handlers#redpen#DefineLinter('text')
|
||||||
\ 'name': 'redpen',
|
|
||||||
\ 'executable': 'redpen',
|
|
||||||
\ 'command': 'redpen -f plain -r json %t',
|
|
||||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
|
||||||
\})
|
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
" 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'),
|
||||||
|
\})
|
||||||
@@ -9,7 +9,9 @@ endif
|
|||||||
" --lint-only
|
" --lint-only
|
||||||
function! ale_linters#verilog#slang#GetCommand(buffer) abort
|
function! ale_linters#verilog#slang#GetCommand(buffer) abort
|
||||||
return 'slang -Weverything '
|
return 'slang -Weverything '
|
||||||
|
\ . '--diag-abs-paths '
|
||||||
\ . '-I%s:h '
|
\ . '-I%s:h '
|
||||||
|
\ . '-y%s:h '
|
||||||
\ . ale#Var(a:buffer, 'verilog_slang_options') .' '
|
\ . ale#Var(a:buffer, 'verilog_slang_options') .' '
|
||||||
\ . '%t'
|
\ . '%t'
|
||||||
endfunction
|
endfunction
|
||||||
@@ -28,6 +30,7 @@ function! ale_linters#verilog#slang#Handle(buffer, lines) abort
|
|||||||
|
|
||||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||||
let l:item = {
|
let l:item = {
|
||||||
|
\ 'filename': l:match[1],
|
||||||
\ 'lnum': str2nr(l:match[2]),
|
\ 'lnum': str2nr(l:match[2]),
|
||||||
\ 'type': (l:match[4] is# 'error') ? 'E' : 'W',
|
\ 'type': (l:match[4] is# 'error') ? 'E' : 'W',
|
||||||
\ 'text': s:RemoveUnicodeQuotes(l:match[5]),
|
\ 'text': s:RemoveUnicodeQuotes(l:match[5]),
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
" Author: Nicolas Derumigny <https://github.com/nicolasderumigny>
|
||||||
|
" Description: Verible LSP for verilog
|
||||||
|
|
||||||
|
call ale#Set('verilog_verible_ls_options', '--rules_config_search')
|
||||||
|
call ale#Set('verilog_verible_ls_rules', '')
|
||||||
|
call ale#Set('verilog_verible_ls_executable', 'verible-verilog-ls')
|
||||||
|
call ale#Set('verilog_verible_ls_config', {})
|
||||||
|
|
||||||
|
function! ale_linters#verilog#verible_ls#GetProjectRoot(buffer) abort
|
||||||
|
let l:git_dir = ale#path#FindNearestFile(a:buffer, 'verible.filelist')
|
||||||
|
|
||||||
|
if !empty(l:git_dir)
|
||||||
|
return fnamemodify(l:git_dir, ':p:h')
|
||||||
|
else
|
||||||
|
return fnamemodify('', ':h')
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! ale_linters#verilog#verible_ls#GetCommand(buffer) abort
|
||||||
|
let l:command = ale#Escape(ale#Var(a:buffer, 'verilog_verible_ls_executable'))
|
||||||
|
let l:options = ale#Var(a:buffer, 'verilog_verible_ls_options')
|
||||||
|
let l:rules = ale#Var(a:buffer, 'verilog_verible_ls_rules')
|
||||||
|
|
||||||
|
if l:options isnot# ''
|
||||||
|
let l:command .= ' ' . l:options
|
||||||
|
endif
|
||||||
|
|
||||||
|
if l:rules isnot# ''
|
||||||
|
let l:command .= ' --rules=' . l:rules
|
||||||
|
endif
|
||||||
|
|
||||||
|
return l:command
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
call ale#linter#Define('verilog', {
|
||||||
|
\ 'name': 'verible_ls',
|
||||||
|
\ 'lsp': 'stdio',
|
||||||
|
\ 'lsp_config': {b -> ale#Var(b, 'verilog_verible_ls_config')},
|
||||||
|
\ 'executable': {b -> ale#Var(b, 'verilog_verible_ls_executable')},
|
||||||
|
\ 'command': function('ale_linters#verilog#verible_ls#GetCommand') ,
|
||||||
|
\ 'project_root': function('ale_linters#verilog#verible_ls#GetProjectRoot'),
|
||||||
|
\})
|
||||||
@@ -10,6 +10,7 @@ function! ale_linters#verilog#verilator#GetCommand(buffer) abort
|
|||||||
" the path to the current file is systematically added to the search path
|
" the path to the current file is systematically added to the search path
|
||||||
return 'verilator --lint-only -Wall -Wno-DECLFILENAME '
|
return 'verilator --lint-only -Wall -Wno-DECLFILENAME '
|
||||||
\ . '-I%s:h '
|
\ . '-I%s:h '
|
||||||
|
\ . '-y %s:h '
|
||||||
\ . ale#Var(a:buffer, 'verilog_verilator_options') .' '
|
\ . ale#Var(a:buffer, 'verilog_verilator_options') .' '
|
||||||
\ . '%t'
|
\ . '%t'
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ endfunction
|
|||||||
function! ale#assert#LSPProject(expected_root) abort
|
function! ale#assert#LSPProject(expected_root) abort
|
||||||
let l:buffer = bufnr('')
|
let l:buffer = bufnr('')
|
||||||
let l:linter = s:GetLinter()
|
let l:linter = s:GetLinter()
|
||||||
let l:root = ale#linter#GetRoot(l:buffer, l:linter)
|
let l:root = ale#lsp_linter#FindProjectRoot(l:buffer, l:linter)
|
||||||
|
|
||||||
AssertEqual a:expected_root, l:root
|
AssertEqual a:expected_root, l:root
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ 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', [
|
let g:ale_c_build_dir_names = get(g:, 'ale_c_build_dir_names', [
|
||||||
\ 'build',
|
\ 'build',
|
||||||
|
\ 'build/Debug',
|
||||||
|
\ 'build/Release',
|
||||||
\ 'bin',
|
\ 'bin',
|
||||||
\])
|
\])
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ function! ale#cursor#TruncatedEcho(original_message) abort
|
|||||||
" Change tabs to spaces.
|
" Change tabs to spaces.
|
||||||
let l:message = substitute(l:message, "\t", ' ', 'g')
|
let l:message = substitute(l:message, "\t", ' ', 'g')
|
||||||
" Remove any newlines in the message.
|
" 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
|
" Convert indentation groups into single spaces for better legibility when
|
||||||
" put on a single line
|
" put on a single line
|
||||||
let l:message = substitute(l:message, ' \+', ' ', 'g')
|
let l:message = substitute(l:message, ' \+', ' ', 'g')
|
||||||
@@ -93,6 +93,7 @@ function! ale#cursor#EchoCursorWarning(...) abort
|
|||||||
if !empty(l:loc)
|
if !empty(l:loc)
|
||||||
let l:format = ale#Var(l:buffer, 'echo_msg_format')
|
let l:format = ale#Var(l:buffer, 'echo_msg_format')
|
||||||
let l:msg = ale#GetLocItemMessage(l:loc, l:format)
|
let l:msg = ale#GetLocItemMessage(l:loc, l:format)
|
||||||
|
|
||||||
call ale#cursor#TruncatedEcho(l:msg)
|
call ale#cursor#TruncatedEcho(l:msg)
|
||||||
let l:info.echoed = 1
|
let l:info.echoed = 1
|
||||||
elseif get(l:info, 'echoed')
|
elseif get(l:info, 'echoed')
|
||||||
|
|||||||
@@ -732,6 +732,21 @@ let s:default_registry = {
|
|||||||
\ 'suggested_filetypes': ['roc'],
|
\ 'suggested_filetypes': ['roc'],
|
||||||
\ 'description': 'Annotates all top-level definitions in Roc files.',
|
\ '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',
|
||||||
|
\ },
|
||||||
|
\ 'verible_format': {
|
||||||
|
\ 'function': 'ale#fixers#verible_format#Fix',
|
||||||
|
\ 'suggested_filetypes': ['verilog'],
|
||||||
|
\ 'description': 'Formats verilog files using verible.',
|
||||||
|
\ },
|
||||||
\}
|
\}
|
||||||
|
|
||||||
" Reset the function registry to the default entries.
|
" Reset the function registry to the default entries.
|
||||||
|
|||||||
@@ -19,20 +19,34 @@ function! ale#fixers#rubocop#PostProcess(buffer, output) abort
|
|||||||
return a:output[l:line :]
|
return a:output[l:line :]
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale#fixers#rubocop#GetCommand(buffer) abort
|
function! ale#fixers#rubocop#GetCommand(buffer, version) abort
|
||||||
let l:executable = ale#Var(a:buffer, 'ruby_rubocop_executable')
|
let l:executable = ale#Var(a:buffer, 'ruby_rubocop_executable')
|
||||||
let l:options = ale#Var(a:buffer, 'ruby_rubocop_options')
|
let l:options = ale#Var(a:buffer, 'ruby_rubocop_options')
|
||||||
let l:auto_correct_all = ale#Var(a:buffer, 'ruby_rubocop_auto_correct_all')
|
let l:auto_correct_all = ale#Var(a:buffer, 'ruby_rubocop_auto_correct_all')
|
||||||
|
let l:editor_mode = ale#semver#GTE(a:version, [1, 61, 0])
|
||||||
|
|
||||||
return ale#ruby#EscapeExecutable(l:executable, 'rubocop')
|
return ale#ruby#EscapeExecutable(l:executable, 'rubocop')
|
||||||
\ . (!empty(l:options) ? ' ' . l:options : '')
|
\ . (!empty(l:options) ? ' ' . l:options : '')
|
||||||
\ . (l:auto_correct_all ? ' --auto-correct-all' : ' --auto-correct')
|
\ . (l:auto_correct_all ? ' --auto-correct-all' : ' --auto-correct')
|
||||||
|
\ . (l:editor_mode ? ' --editor-mode' : '')
|
||||||
\ . ' --force-exclusion --stdin %s'
|
\ . ' --force-exclusion --stdin %s'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale#fixers#rubocop#Fix(buffer) abort
|
function! ale#fixers#rubocop#GetCommandForVersion(buffer, version) abort
|
||||||
return {
|
return {
|
||||||
\ 'command': ale#fixers#rubocop#GetCommand(a:buffer),
|
\ 'command': ale#fixers#rubocop#GetCommand(a:buffer, a:version),
|
||||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess'
|
\ 'process_with': 'ale#fixers#rubocop#PostProcess'
|
||||||
\}
|
\}
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! ale#fixers#rubocop#Fix(buffer) abort
|
||||||
|
let l:executable = ale#Var(a:buffer, 'ruby_rubocop_executable')
|
||||||
|
let l:command = l:executable . ale#Pad('--version')
|
||||||
|
|
||||||
|
return ale#semver#RunWithVersionCheck(
|
||||||
|
\ a:buffer,
|
||||||
|
\ l:executable,
|
||||||
|
\ l:command,
|
||||||
|
\ function('ale#fixers#rubocop#GetCommandForVersion'),
|
||||||
|
\)
|
||||||
|
endfunction
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
" 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
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
" 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
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
" Author: Nicolas Derumigny <https://github.com/nicolasderumigny>
|
||||||
|
" Description: verible formatter for verilog.
|
||||||
|
|
||||||
|
call ale#Set('verilog_verible_format_executable', 'verible-verilog-format')
|
||||||
|
call ale#Set('verilog_verible_format_options', '')
|
||||||
|
|
||||||
|
function! ale#fixers#verible_format#Fix(buffer) abort
|
||||||
|
let l:executable = ale#Escape(ale#Var(a:buffer, 'verilog_verible_format_executable'))
|
||||||
|
let l:command = l:executable
|
||||||
|
let l:options = ale#Var(a:buffer, 'verilog_verible_format_options')
|
||||||
|
|
||||||
|
if l:options isnot# ''
|
||||||
|
let l:command .= ' ' . l:options
|
||||||
|
endif
|
||||||
|
|
||||||
|
return {'command': l:command . ' -'}
|
||||||
|
endfunction
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
" Author: rhysd https://rhysd.github.io
|
" Author: rhysd https://rhysd.github.io
|
||||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||||
|
|
||||||
|
call ale#Set('redpen_options', '')
|
||||||
|
|
||||||
function! ale#handlers#redpen#HandleRedpenOutput(buffer, lines) abort
|
function! ale#handlers#redpen#HandleRedpenOutput(buffer, lines) abort
|
||||||
" Only one file was passed to redpen. So response array has only one
|
" Only one file was passed to redpen. So response array has only one
|
||||||
" element.
|
" element.
|
||||||
@@ -63,3 +65,14 @@ function! ale#handlers#redpen#HandleRedpenOutput(buffer, lines) abort
|
|||||||
|
|
||||||
return l:output
|
return l:output
|
||||||
endfunction
|
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
|
||||||
|
|||||||
@@ -63,6 +63,12 @@ function! ale#handlers#shellcheck#GetCommand(buffer, version) abort
|
|||||||
\ . ' -f ' . l:format . ' -'
|
\ . ' -f ' . l:format . ' -'
|
||||||
endfunction
|
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
|
function! s:HandleShellcheckJSON(buffer, lines) abort
|
||||||
try
|
try
|
||||||
let l:errors = json_decode(a:lines[0])
|
let l:errors = json_decode(a:lines[0])
|
||||||
@@ -87,11 +93,17 @@ function! s:HandleShellcheckJSON(buffer, lines) abort
|
|||||||
let l:type = 'W'
|
let l:type = 'W'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let l:code = 'SC' . l:error['code']
|
||||||
|
|
||||||
|
if s:ShouldIgnoreErrorCode(a:buffer, l:code)
|
||||||
|
continue
|
||||||
|
endif
|
||||||
|
|
||||||
let l:item = {
|
let l:item = {
|
||||||
\ 'lnum': l:error['line'],
|
\ 'lnum': l:error['line'],
|
||||||
\ 'type': l:type,
|
\ 'type': l:type,
|
||||||
\ 'text': l:error['message'],
|
\ 'text': l:error['message'],
|
||||||
\ 'code': 'SC' . l:error['code'],
|
\ 'code': l:code,
|
||||||
\ 'detail': l:error['message'] . "\n\nFor more information:\n https://www.shellcheck.net/wiki/SC" . l:error['code'],
|
\ 'detail': l:error['message'] . "\n\nFor more information:\n https://www.shellcheck.net/wiki/SC" . l:error['code'],
|
||||||
\}
|
\}
|
||||||
|
|
||||||
@@ -107,7 +119,6 @@ function! s:HandleShellcheckJSON(buffer, lines) abort
|
|||||||
let l:item.end_lnum = l:error['endLine']
|
let l:item.end_lnum = l:error['endLine']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
" If the filename is something like <stdin>, <nofile> or -, then
|
" If the filename is something like <stdin>, <nofile> or -, then
|
||||||
" this is an error for the file we checked.
|
" this is an error for the file we checked.
|
||||||
if has_key(l:error, 'file')
|
if has_key(l:error, 'file')
|
||||||
@@ -135,11 +146,17 @@ function! s:HandleShellcheckGCC(buffer, lines) abort
|
|||||||
let l:type = 'W'
|
let l:type = 'W'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let l:code = l:match[6]
|
||||||
|
|
||||||
|
if s:ShouldIgnoreErrorCode(a:buffer, l:code)
|
||||||
|
continue
|
||||||
|
endif
|
||||||
|
|
||||||
let l:item = {
|
let l:item = {
|
||||||
\ 'lnum': str2nr(l:match[2]),
|
\ 'lnum': str2nr(l:match[2]),
|
||||||
\ 'type': l:type,
|
\ 'type': l:type,
|
||||||
\ 'text': l:match[5],
|
\ 'text': l:match[5],
|
||||||
\ 'code': l:match[6],
|
\ 'code': l:code,
|
||||||
\ 'detail': l:match[5] . "\n\nFor more information:\n https://www.shellcheck.net/wiki/" . l:match[6],
|
\ 'detail': l:match[5] . "\n\nFor more information:\n https://www.shellcheck.net/wiki/" . l:match[6],
|
||||||
\}
|
\}
|
||||||
|
|
||||||
|
|||||||
@@ -447,32 +447,3 @@ function! ale#linter#GetAddress(buffer, linter) abort
|
|||||||
|
|
||||||
return type(l:Address) is v:t_func ? l:Address(a:buffer) : l:Address
|
return type(l:Address) is v:t_func ? l:Address(a:buffer) : l:Address
|
||||||
endfunction
|
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
|
|
||||||
|
|||||||
@@ -531,7 +531,7 @@ function! ale#lsp#StartProgram(conn_id, executable, command) abort
|
|||||||
if g:ale_use_neovim_lsp_api && !l:conn.is_tsserver
|
if g:ale_use_neovim_lsp_api && !l:conn.is_tsserver
|
||||||
" For Windows from 'cmd /s/c "foo bar"' we need 'foo bar'
|
" For Windows from 'cmd /s/c "foo bar"' we need 'foo bar'
|
||||||
let l:lsp_cmd = has('win32') && type(a:command) is v:t_string
|
let l:lsp_cmd = has('win32') && type(a:command) is v:t_string
|
||||||
\ ? ['cmd', '/s/c/', a:command[10:-2]]
|
\ ? ['cmd', '/s/c', a:command[10:-2]]
|
||||||
\ : a:command
|
\ : a:command
|
||||||
|
|
||||||
" Always call lsp.start, which will either create or re-use a
|
" Always call lsp.start, which will either create or re-use a
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ function! ale#lsp#response#ReadDiagnostics(diagnostics) abort
|
|||||||
for l:diagnostic in a:diagnostics
|
for l:diagnostic in a:diagnostics
|
||||||
let l:severity = get(l:diagnostic, 'severity', 0)
|
let l:severity = get(l:diagnostic, 'severity', 0)
|
||||||
let l:loclist_item = {
|
let l:loclist_item = {
|
||||||
\ 'text': substitute(l:diagnostic.message, '\(\r\n\|\n\|\r\)', ' ', 'g'),
|
\ 'text': l:diagnostic.message,
|
||||||
\ 'type': 'E',
|
\ 'type': 'E',
|
||||||
\ 'lnum': l:diagnostic.range.start.line + 1,
|
\ 'lnum': l:diagnostic.range.start.line + 1,
|
||||||
\ 'col': l:diagnostic.range.start.character + 1,
|
\ 'col': l:diagnostic.range.start.character + 1,
|
||||||
|
|||||||
@@ -296,6 +296,44 @@ function! ale#lsp_linter#GetConfig(buffer, linter) abort
|
|||||||
return {}
|
return {}
|
||||||
endfunction
|
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.
|
" This function is accessible so tests can call it.
|
||||||
function! ale#lsp_linter#OnInit(linter, details, Callback) abort
|
function! ale#lsp_linter#OnInit(linter, details, Callback) abort
|
||||||
@@ -466,7 +504,7 @@ endfunction
|
|||||||
function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort
|
function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort
|
||||||
let l:command = ''
|
let l:command = ''
|
||||||
let l:address = ''
|
let l:address = ''
|
||||||
let l:root = ale#linter#GetRoot(a:buffer, a:linter)
|
let l:root = ale#lsp_linter#FindProjectRoot(a:buffer, a:linter)
|
||||||
|
|
||||||
if empty(l:root) && a:linter.lsp isnot# 'tsserver'
|
if empty(l:root) && a:linter.lsp isnot# 'tsserver'
|
||||||
" If there's no project root, then we can't check files with LSP,
|
" If there's no project root, then we can't check files with LSP,
|
||||||
|
|||||||
@@ -62,6 +62,36 @@ function! ale#path#FindNearestDirectory(buffer, directory_name) abort
|
|||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" Given a buffer and a filename, find the nearest file or directory by
|
||||||
|
" searching upwards through the paths relative to the given buffer.
|
||||||
|
function! ale#path#FindNearestFileOrDirectory(buffer, filename) abort
|
||||||
|
let l:buffer_filename = fnamemodify(bufname(a:buffer), ':p')
|
||||||
|
let l:buffer_filename = fnameescape(l:buffer_filename)
|
||||||
|
|
||||||
|
let l:relative_path_file = findfile(a:filename, l:buffer_filename . ';')
|
||||||
|
let l:relative_path_dir = finddir(a:filename, l:buffer_filename . ';')
|
||||||
|
|
||||||
|
" If we find both a file and directory, choose the shorter response by
|
||||||
|
" making the longer one empty instead.
|
||||||
|
if !empty(l:relative_path_file) && !empty(l:relative_path_dir)
|
||||||
|
if strlen(l:relative_path_file) > strlen(l:relative_path_dir)
|
||||||
|
let l:relative_path_dir = ''
|
||||||
|
else
|
||||||
|
let l:relative_path_file = ''
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !empty(l:relative_path_file)
|
||||||
|
return fnamemodify(l:relative_path_file, ':p')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !empty(l:relative_path_dir)
|
||||||
|
return fnamemodify(l:relative_path_dir, ':p')
|
||||||
|
endif
|
||||||
|
|
||||||
|
return ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
" Given a buffer, a string to search for, and a global fallback for when
|
" Given a buffer, a string to search for, and a global fallback for when
|
||||||
" the search fails, look for a file in parent paths, and if that fails,
|
" the search fails, look for a file in parent paths, and if that fails,
|
||||||
" use the global fallback path instead.
|
" use the global fallback path instead.
|
||||||
|
|||||||
@@ -61,12 +61,6 @@ endfunction
|
|||||||
" through paths, including the current directory, until no __init__.py files
|
" through paths, including the current directory, until no __init__.py files
|
||||||
" is found.
|
" is found.
|
||||||
function! ale#python#FindProjectRoot(buffer) abort
|
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)
|
let l:ini_root = ale#python#FindProjectRootIni(a:buffer)
|
||||||
|
|
||||||
if !empty(l:ini_root)
|
if !empty(l:ini_root)
|
||||||
@@ -206,7 +200,7 @@ function! ale#python#PoetryPresent(buffer) abort
|
|||||||
return findfile('poetry.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
|
return findfile('poetry.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Detects whether a poetry environment is present.
|
" Detects whether a uv environment is present.
|
||||||
function! ale#python#UvPresent(buffer) abort
|
function! ale#python#UvPresent(buffer) abort
|
||||||
return findfile('uv.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
|
return findfile('uv.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
let g:ale_default_navigation = get(g:, 'ale_default_navigation', 'buffer')
|
let g:ale_default_navigation = get(g:, 'ale_default_navigation', 'buffer')
|
||||||
|
let g:ale_references_show_contents = get(g:, 'ale_references_show_contents', 1)
|
||||||
|
|
||||||
let s:references_map = {}
|
let s:references_map = {}
|
||||||
|
|
||||||
@@ -67,17 +68,33 @@ function! ale#references#HandleTSServerResponse(conn_id, response) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale#references#FormatLSPResponseItem(response_item, options) abort
|
function! ale#references#FormatLSPResponseItem(response_item, options) abort
|
||||||
|
let l:line_text = ''
|
||||||
|
|
||||||
|
let l:line= a:response_item.range.start.line
|
||||||
|
let l:col = a:response_item.range.start.character
|
||||||
|
let l:filename = ale#util#ToResource(a:response_item.uri)
|
||||||
|
|
||||||
|
if get(a:options, 'show_contents') == 1
|
||||||
|
try
|
||||||
|
let l:line_text = substitute(readfile(l:filename)[l:line], '^\s*\(.\{-}\)\s*$', '\1', '')
|
||||||
|
catch
|
||||||
|
" This happens in tests
|
||||||
|
endtry
|
||||||
|
endif
|
||||||
|
|
||||||
if get(a:options, 'open_in') is# 'quickfix'
|
if get(a:options, 'open_in') is# 'quickfix'
|
||||||
return {
|
return {
|
||||||
\ 'filename': ale#util#ToResource(a:response_item.uri),
|
\ 'filename': l:filename,
|
||||||
\ 'lnum': a:response_item.range.start.line + 1,
|
\ 'lnum': a:response_item.range.start.line + 1,
|
||||||
\ 'col': a:response_item.range.start.character + 1,
|
\ 'col': a:response_item.range.start.character + 1,
|
||||||
|
\ 'text': l:line_text,
|
||||||
\}
|
\}
|
||||||
else
|
else
|
||||||
return {
|
return {
|
||||||
\ 'filename': ale#util#ToResource(a:response_item.uri),
|
\ 'filename': l:filename,
|
||||||
\ 'line': a:response_item.range.start.line + 1,
|
\ 'line': l:line + 1,
|
||||||
\ 'column': a:response_item.range.start.character + 1,
|
\ 'column': l:col + 1,
|
||||||
|
\ 'match': l:line_text,
|
||||||
\}
|
\}
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
@@ -147,6 +164,7 @@ function! s:OnReady(line, column, options, linter, lsp_details) abort
|
|||||||
let s:references_map[l:request_id] = {
|
let s:references_map[l:request_id] = {
|
||||||
\ 'use_relative_paths': has_key(a:options, 'use_relative_paths') ? a:options.use_relative_paths : 0,
|
\ 'use_relative_paths': has_key(a:options, 'use_relative_paths') ? a:options.use_relative_paths : 0,
|
||||||
\ 'open_in': get(a:options, 'open_in', 'current-buffer'),
|
\ 'open_in': get(a:options, 'open_in', 'current-buffer'),
|
||||||
|
\ 'show_contents': a:options.show_contents,
|
||||||
\}
|
\}
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@@ -165,6 +183,8 @@ function! ale#references#Find(...) abort
|
|||||||
let l:options.open_in = 'vsplit'
|
let l:options.open_in = 'vsplit'
|
||||||
elseif l:option is? '-quickfix'
|
elseif l:option is? '-quickfix'
|
||||||
let l:options.open_in = 'quickfix'
|
let l:options.open_in = 'quickfix'
|
||||||
|
elseif l:option is? '-contents'
|
||||||
|
let l:options.show_contents = 1
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
@@ -177,6 +197,10 @@ function! ale#references#Find(...) abort
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !has_key(l:options, 'show_contents')
|
||||||
|
let l:options.show_contents = ale#Var(bufnr(''), 'references_show_contents')
|
||||||
|
endif
|
||||||
|
|
||||||
let l:buffer = bufnr('')
|
let l:buffer = bufnr('')
|
||||||
let [l:line, l:column] = getpos('.')[1:2]
|
let [l:line, l:column] = getpos('.')[1:2]
|
||||||
let l:column = min([l:column, len(getline(l:line))])
|
let l:column = min([l:column, len(getline(l:line))])
|
||||||
|
|||||||
@@ -44,5 +44,39 @@ g:ale_ansible_ansible_lint_executable
|
|||||||
This variable can be changed to modify the executable used for ansible-lint.
|
This variable can be changed to modify the executable used for ansible-lint.
|
||||||
|
|
||||||
|
|
||||||
|
*ale-options.ansible_ansible_lint_auto_pipenv*
|
||||||
|
*g:ale_ansible_ansible_lint_auto_pipenv*
|
||||||
|
*b:ale_ansible_ansible_lint_auto_pipenv*
|
||||||
|
ansible_ansible_lint_auto_pipenv
|
||||||
|
g:ale_ansible_ansible_lint_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.
|
||||||
|
|
||||||
|
*ale-options.ansible_ansible_lint_auto_poetry*
|
||||||
|
*g:ale_ansible_ansible_lint_auto_poetry*
|
||||||
|
*b:ale_ansible_ansible_lint_auto_poetry*
|
||||||
|
ansible_ansible_lint_auto_poetry
|
||||||
|
g:ale_ansible_ansible_lint_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.
|
||||||
|
|
||||||
|
*ale-options.ansible_ansible_lint_auto_uv*
|
||||||
|
*g:ale_ansible_ansible_lint_auto_uv*
|
||||||
|
*b:ale_ansible_ansible_lint_auto_uv*
|
||||||
|
ansible_ansible_lint_auto_uv
|
||||||
|
g:ale_ansible_ansible_lint_auto_uv
|
||||||
|
Type: |Number|
|
||||||
|
Default: `0`
|
||||||
|
|
||||||
|
Set the executable to `uv` if true. This is overridden by a manually-set
|
||||||
|
executable.
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||||
|
|||||||
@@ -20,5 +20,11 @@ textlint *ale-asciidoc-textlint*
|
|||||||
See |ale-text-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:
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ g:ale_c_always_make
|
|||||||
c_build_dir_names
|
c_build_dir_names
|
||||||
g:ale_c_build_dir_names
|
g:ale_c_build_dir_names
|
||||||
Type: |List|
|
Type: |List|
|
||||||
Default: `['build', 'bin']`
|
Default: `['build', 'build/Debug', 'build/Release', 'bin']`
|
||||||
|
|
||||||
A list of directory names to be used when searching upwards from C files
|
A list of directory names to be used when searching upwards from C files
|
||||||
to discover compilation databases with. For directory named `'foo'`, ALE
|
to discover compilation databases with. For directory named `'foo'`, ALE
|
||||||
|
|||||||
@@ -41,5 +41,51 @@ Just put the following in `ftdetect/cloudformation.vim`: >
|
|||||||
This will get both cloudformation and yaml linters to work on any file with
|
This will get both cloudformation and yaml linters to work on any file with
|
||||||
`.template.yaml` extension.
|
`.template.yaml` extension.
|
||||||
|
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
checkov *ale-cloudformation-checkov*
|
||||||
|
|
||||||
|
*ale-options.cloudformation_checkov_executable*
|
||||||
|
*g:ale_cloudformation_checkov_executable*
|
||||||
|
*b:ale_cloudformation_checkov_executable*
|
||||||
|
cloudformation_checkov_executable
|
||||||
|
g:ale_cloudformation_checkov_executable
|
||||||
|
Type: |String|
|
||||||
|
Default: `'checkov'`
|
||||||
|
|
||||||
|
This variable can be changed to use a different executable for checkov.
|
||||||
|
|
||||||
|
*ale-options.cloudformation_checkov_options*
|
||||||
|
*g:ale_cloudformation_checkov_options*
|
||||||
|
*b:ale_cloudformation_checkov_options*
|
||||||
|
cloudformation_checkov_options
|
||||||
|
g:ale_cloudformation_checkov_options
|
||||||
|
Type: |String|
|
||||||
|
Default: `''`
|
||||||
|
|
||||||
|
This variable can be changed to set additional options for checkov.
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Configuration
|
||||||
|
|
||||||
|
To get chekov to work with cloudformation files (rather than general yaml
|
||||||
|
files) we must set the buffer |filetype| to `yaml.cloudformation`. This
|
||||||
|
causes ALE to lint the file with linters configured for cloudformation and
|
||||||
|
YAML files.
|
||||||
|
|
||||||
|
One option is to put the following in `ftdetect/cloudformation.vim`: >
|
||||||
|
|
||||||
|
au BufRead,BufNewFile *.template.yaml set filetype=yaml.cloudformation
|
||||||
|
|
||||||
|
This will get both cloudformation and yaml linters to work on any file with
|
||||||
|
`.template.yaml` extension.
|
||||||
|
|
||||||
|
Another option is to check for the presence of 'AWSTemplateFormatVersion' in
|
||||||
|
the yaml file: >
|
||||||
|
|
||||||
|
au BufRead,BufNewFile *.yaml,*.yml if search('AWSTemplateFormatVersion', 'nw') | set filetype=yaml.cloudformation | endif
|
||||||
|
<
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||||
|
|||||||
@@ -424,11 +424,11 @@ running tests. >
|
|||||||
|
|
||||||
Add-Type -A System.IO.Compression.FileSystem
|
Add-Type -A System.IO.Compression.FileSystem
|
||||||
|
|
||||||
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586w32.zip -OutFile C:\vim.zip
|
Invoke-WebRequest https://github.com/dense-analysis/ale/releases/download/v4.0.0/vim80-586w32.zip -OutFile C:\vim.zip
|
||||||
[IO.Compression.ZipFile]::ExtractToDirectory('C:\vim.zip', 'C:\vim')
|
[IO.Compression.ZipFile]::ExtractToDirectory('C:\vim.zip', 'C:\vim')
|
||||||
rm C:\vim.zip
|
rm C:\vim.zip
|
||||||
|
|
||||||
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586rt.zip -OutFile C:\rt.zip
|
Invoke-WebRequest https://github.com/dense-analysis/ale/releases/download/v4.0.0/vim80-586rt.zip -OutFile C:\rt.zip
|
||||||
[IO.Compression.ZipFile]::ExtractToDirectory('C:\rt.zip', 'C:\vim')
|
[IO.Compression.ZipFile]::ExtractToDirectory('C:\rt.zip', 'C:\vim')
|
||||||
rm C:\rt.zip
|
rm C:\rt.zip
|
||||||
|
|
||||||
|
|||||||
+23
-1
@@ -2,6 +2,29 @@
|
|||||||
ALE Fortran Integration *ale-fortran-options*
|
ALE Fortran Integration *ale-fortran-options*
|
||||||
|
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
fortitude *ale-fortran-fortitude*
|
||||||
|
|
||||||
|
*ale-options.fortran_fortitude_executable*
|
||||||
|
*g:fortran_fortitude_executable*
|
||||||
|
*b:fortran_fortitude_executable*
|
||||||
|
fortran_fortitude_executable
|
||||||
|
g:fortran_fortitude_executable
|
||||||
|
Type: |String|
|
||||||
|
Default: 'fortitude'
|
||||||
|
|
||||||
|
This variable can be changed to modify the executable used for fortitude.
|
||||||
|
|
||||||
|
*ale-options.fortran_fortitude_options*
|
||||||
|
*g:fortran_fortitude_options*
|
||||||
|
*b:fortran_fortitude_options*
|
||||||
|
fortran_fortitude_options
|
||||||
|
g:fortran_fortitude_options
|
||||||
|
Type: |String|
|
||||||
|
Default: ''
|
||||||
|
|
||||||
|
This variable can be changed to modify options given to fortitude check.
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
gcc *ale-fortran-gcc*
|
gcc *ale-fortran-gcc*
|
||||||
|
|
||||||
@@ -63,6 +86,5 @@ g:ale_fortran_language_server_use_global
|
|||||||
|
|
||||||
See |ale-integrations-local-executables|
|
See |ale-integrations-local-executables|
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||||
|
|||||||
@@ -8,5 +8,9 @@ djlint *ale-jinja-djlint*
|
|||||||
|
|
||||||
See |ale-html-djlint|
|
See |ale-html-djlint|
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
j2lint *ale-jinja-j2lint*
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||||
|
|||||||
+10
-5
@@ -49,17 +49,22 @@ g:ale_lua_language_server_executable
|
|||||||
If you have compiled the language server yourself in `/some/path`, the path
|
If you have compiled the language server yourself in `/some/path`, the path
|
||||||
will be `'/some/path/bin/lua-language-server'`.
|
will be `'/some/path/bin/lua-language-server'`.
|
||||||
|
|
||||||
*ale-options.lua_lua_language_server_config*
|
*ale-options.lua_language_server_config*
|
||||||
*g:ale_lua_lua_language_server_config*
|
*g:ale_lua_language_server_config*
|
||||||
*b:ale_lua_lua_language_server_config*
|
*b:ale_lua_language_server_config*
|
||||||
lua_lua_language_server_config
|
lua_language_server_config
|
||||||
g:ale_lua_lua_language_server_config
|
g:ale_lua_language_server_config
|
||||||
|
|
||||||
Type: |Dictionary|
|
Type: |Dictionary|
|
||||||
Default: `{}`
|
Default: `{}`
|
||||||
|
|
||||||
Dictionary containing configuration settings that will be passed to the
|
Dictionary containing configuration settings that will be passed to the
|
||||||
language server.
|
language server.
|
||||||
|
|
||||||
|
For available configuration parameters, see `Settings` on the luals wiki:
|
||||||
|
|
||||||
|
https://luals.github.io/wiki/settings/
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
luac *ale-lua-luac*
|
luac *ale-lua-luac*
|
||||||
|
|||||||
@@ -225,5 +225,11 @@ write-good *ale-markdown-write-good*
|
|||||||
See |ale-write-good-options|
|
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:
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||||
|
|||||||
@@ -35,6 +35,42 @@ g:ale_perl_perl_options
|
|||||||
invocation.
|
invocation.
|
||||||
|
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
perl language server *ale-perl-languageserver*
|
||||||
|
|
||||||
|
perl_perl_executable
|
||||||
|
g:ale_perl_perl_executable
|
||||||
|
Type: |String|
|
||||||
|
Default: `'perl'`
|
||||||
|
|
||||||
|
The language server will use the same variable as |ale-perl-perl| to launch
|
||||||
|
the perl executable with the Perl::LanguageServer module.
|
||||||
|
|
||||||
|
*ale-options.perl_languageserver_config*
|
||||||
|
*g:ale_perl_languageserver_config*
|
||||||
|
*b:ale_perl_languageserver_config*
|
||||||
|
perl_languageserver_config
|
||||||
|
g:ale_perl_languageserver_config
|
||||||
|
Type: |Dictionary|
|
||||||
|
Default: `'{}'`
|
||||||
|
|
||||||
|
This variable can be changed to customize the lsp_config (sent as a
|
||||||
|
workspace/didChangeConfiguration command).
|
||||||
|
For example: >
|
||||||
|
|
||||||
|
let g:ale_perl_languageserver_config = {
|
||||||
|
\ 'perl': {
|
||||||
|
\ 'fileFilter': [''],
|
||||||
|
\ 'logLevel': 2,
|
||||||
|
\ 'logFile': '/tmp/plls-log.txt',
|
||||||
|
\ 'perlInc': ['/usr/share/perl5/', '/usr/local/share/perl5/' ],
|
||||||
|
\ },
|
||||||
|
\}
|
||||||
|
<
|
||||||
|
For all available options and explanations, visit
|
||||||
|
https://metacpan.org/pod/Perl::LanguageServer#Extension-Settings
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
perlcritic *ale-perl-perlcritic*
|
perlcritic *ale-perl-perlcritic*
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,36 @@ g:ale_php_phan_use_client
|
|||||||
instead of the phan standalone.
|
instead of the phan standalone.
|
||||||
|
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
phpactor *ale-php-phpactor*
|
||||||
|
|
||||||
|
*ale-options.php_phpactor_executable*
|
||||||
|
*g:ale_php_phpactor_executable*
|
||||||
|
*b:ale_php_phpactor_executable*
|
||||||
|
php_phpactor_executable
|
||||||
|
g:ale_php_phpactor_executable
|
||||||
|
Type: |String|
|
||||||
|
Default: `'phpactor'`
|
||||||
|
|
||||||
|
This variable sets executable used for phpactor.
|
||||||
|
|
||||||
|
php_phpactor_init_options
|
||||||
|
g:ale_php_phpactor_init_options
|
||||||
|
Type: |Dictionary|
|
||||||
|
Default: `'{}'`
|
||||||
|
|
||||||
|
This variable can be changed to customize the LSP initialization_options.
|
||||||
|
For example: >
|
||||||
|
|
||||||
|
let g:ale_php_phpactor_init_options = {
|
||||||
|
\ 'language_server_phpstan.enabled': v:false,
|
||||||
|
\ 'language_server_psalm.enabled': v:false,
|
||||||
|
\ 'worse_reflection.stub_dir': '%application_root%/.php-stubs'
|
||||||
|
\}
|
||||||
|
<
|
||||||
|
For all available options and explanations, visit
|
||||||
|
https://phpactor.readthedocs.io/en/master/reference/configuration.html
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
phpcbf *ale-php-phpcbf*
|
phpcbf *ale-php-phpcbf*
|
||||||
|
|
||||||
|
|||||||
+1
-4
@@ -55,9 +55,6 @@ 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
|
files in directories on or above where a file being checked is. ALE applies
|
||||||
the following methods, in order:
|
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.
|
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
|
2. If no configuration file can be found, use the first directory which does
|
||||||
not contain a readable file named `__init__.py`.
|
not contain a readable file named `__init__.py`.
|
||||||
@@ -1468,7 +1465,7 @@ g:ale_python_pylsp_executable
|
|||||||
See |ale-integrations-local-executables|
|
See |ale-integrations-local-executables|
|
||||||
|
|
||||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `pylsp'`.
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pylsp'`.
|
||||||
Set this to `'poetry'` to invoke `'poetry` `run` `pyls'`.
|
Set this to `'poetry'` to invoke `'poetry` `run` `pylsp'`.
|
||||||
|
|
||||||
*ale-options.python_pylsp_use_global*
|
*ale-options.python_pylsp_use_global*
|
||||||
*g:ale_python_pylsp_use_global*
|
*g:ale_python_pylsp_use_global*
|
||||||
|
|||||||
@@ -267,6 +267,23 @@ g:ale_ruby_sorbet_enable_watchman
|
|||||||
to files from outside of vim. Defaults to disable watchman because it
|
to files from outside of vim. Defaults to disable watchman because it
|
||||||
requires watchman to be installed separately from sorbet.
|
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*
|
standardrb *ale-ruby-standardrb*
|
||||||
|
|||||||
+2
-2
@@ -33,8 +33,8 @@ Integration Information
|
|||||||
5. rustfmt -- If you have `rustfmt` installed, you can use it as a fixer to
|
5. rustfmt -- If you have `rustfmt` installed, you can use it as a fixer to
|
||||||
consistently reformat your Rust code.
|
consistently reformat your Rust code.
|
||||||
|
|
||||||
Only cargo and rust-analyze are enabled by default. To switch to using rustc
|
Only cargo and rust-analyzer are enabled by default. To switch to using
|
||||||
instead of cargo, configure |b:ale_linters| in your ftplugin file
|
rustc instead of cargo, configure |b:ale_linters| in your ftplugin file
|
||||||
appropriately: >
|
appropriately: >
|
||||||
|
|
||||||
" See the help text for the option for more information.
|
" See the help text for the option for more information.
|
||||||
|
|||||||
+2
-2
@@ -33,8 +33,8 @@ g:ale_scala_metals_project_root
|
|||||||
Default: `''`
|
Default: `''`
|
||||||
|
|
||||||
By default the project root is found by searching upwards for `build.sbt`,
|
By default the project root is found by searching upwards for `build.sbt`,
|
||||||
`build.sc`, `.bloop` or `.metals`. If the project root is elsewhere, you
|
`build.sc`, `build.mill`, `.bloop` or `.metals`. If the project root is elsewhere,
|
||||||
can override the project root directory.
|
you can override the project root directory.
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ Notes:
|
|||||||
* `joker`
|
* `joker`
|
||||||
* CloudFormation
|
* CloudFormation
|
||||||
* `cfn-python-lint`
|
* `cfn-python-lint`
|
||||||
|
* `checkov`
|
||||||
* CMake
|
* CMake
|
||||||
* `cmake-format`
|
* `cmake-format`
|
||||||
* `cmake-lint`
|
* `cmake-lint`
|
||||||
@@ -205,6 +206,7 @@ Notes:
|
|||||||
* `fish` (-n flag)
|
* `fish` (-n flag)
|
||||||
* `fish_indent`
|
* `fish_indent`
|
||||||
* Fortran
|
* Fortran
|
||||||
|
* `fortitude`
|
||||||
* `gcc`
|
* `gcc`
|
||||||
* `language_server`
|
* `language_server`
|
||||||
* Fountain
|
* Fountain
|
||||||
@@ -334,6 +336,7 @@ Notes:
|
|||||||
* `xo`
|
* `xo`
|
||||||
* Jinja
|
* Jinja
|
||||||
* djlint
|
* djlint
|
||||||
|
* j2lint
|
||||||
* JSON
|
* JSON
|
||||||
* `VSCode JSON language server`
|
* `VSCode JSON language server`
|
||||||
* `biome`
|
* `biome`
|
||||||
@@ -471,6 +474,7 @@ Notes:
|
|||||||
* Pawn
|
* Pawn
|
||||||
* `uncrustify`
|
* `uncrustify`
|
||||||
* Perl
|
* Perl
|
||||||
|
* `languageserver`
|
||||||
* `perl -c`
|
* `perl -c`
|
||||||
* `perl-critic`
|
* `perl-critic`
|
||||||
* `perltidy`
|
* `perltidy`
|
||||||
@@ -698,6 +702,7 @@ Notes:
|
|||||||
* `thriftcheck`
|
* `thriftcheck`
|
||||||
* TOML
|
* TOML
|
||||||
* `dprint`
|
* `dprint`
|
||||||
|
* `tombi`
|
||||||
* TypeScript
|
* TypeScript
|
||||||
* `biome`
|
* `biome`
|
||||||
* `cspell`
|
* `cspell`
|
||||||
@@ -722,6 +727,7 @@ Notes:
|
|||||||
* `hdl-checker`
|
* `hdl-checker`
|
||||||
* `iverilog`
|
* `iverilog`
|
||||||
* slang
|
* slang
|
||||||
|
* `verible`
|
||||||
* `verilator`
|
* `verilator`
|
||||||
* `vlog`
|
* `vlog`
|
||||||
* `xvlog`
|
* `xvlog`
|
||||||
|
|||||||
@@ -111,5 +111,11 @@ g:ale_tex_texlab_config
|
|||||||
let g:ale_tex_texlab_config = {"build":{"onSave":v:true}}
|
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:
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||||
|
|||||||
@@ -51,5 +51,11 @@ write-good *ale-text-write-good*
|
|||||||
See |ale-write-good-options|
|
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:
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||||
|
|||||||
@@ -8,5 +8,58 @@ dprint *ale-toml-dprint*
|
|||||||
See |ale-dprint-options| and https://dprint.dev/plugins/toml
|
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:
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||||
|
|||||||
+80
-5
@@ -3,7 +3,7 @@ ALE Verilog/SystemVerilog Integration *ale-verilog-options*
|
|||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
ALE can use seven different linters for Verilog HDL:
|
ALE can use eight different linters for Verilog HDL:
|
||||||
|
|
||||||
HDL Checker
|
HDL Checker
|
||||||
Using `hdl_checker --lsp`
|
Using `hdl_checker --lsp`
|
||||||
@@ -14,6 +14,9 @@ ALE can use seven different linters for Verilog HDL:
|
|||||||
slang:
|
slang:
|
||||||
Using `slang -Weverything`
|
Using `slang -Weverything`
|
||||||
|
|
||||||
|
verible_ls
|
||||||
|
Using `verible-verilog-ls`
|
||||||
|
|
||||||
verilator
|
verilator
|
||||||
Using `verilator --lint-only -Wall`
|
Using `verilator --lint-only -Wall`
|
||||||
|
|
||||||
@@ -35,6 +38,12 @@ defining 'g:ale_linters' variable: >
|
|||||||
\ let g:ale_linters = {'systemverilog' : ['verilator'],}
|
\ let g:ale_linters = {'systemverilog' : ['verilator'],}
|
||||||
<
|
<
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
ALE can use one fixer for Verilog HDL:
|
||||||
|
|
||||||
|
|
||||||
|
verible_fomat
|
||||||
|
Using `verible-verilog-format`
|
||||||
===============================================================================
|
===============================================================================
|
||||||
General notes
|
General notes
|
||||||
|
|
||||||
@@ -70,18 +79,84 @@ iverilog *ale-verilog-iverilog*
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
slang *ale-verilog-slang*
|
slang *ale-verilog-slang*
|
||||||
|
|
||||||
*ale-options.verilog_slang_option*
|
*ale-options.verilog_slang_options*
|
||||||
*g:ale_verilog_slang_option*
|
*g:ale_verilog_slang_options*
|
||||||
*b:ale_verilog_slang_options*
|
*b:ale_verilog_slang_options*
|
||||||
verilog_slang_option
|
verilog_slang_options
|
||||||
g:ale_verilog_slang_option
|
g:ale_verilog_slang_options
|
||||||
Type: |String|
|
Type: |String|
|
||||||
Default: `''`
|
Default: `''`
|
||||||
|
|
||||||
This variable can be changed to modify 'slang' command arguments.
|
This variable can be changed to modify 'slang' command arguments.
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
verible_ls *ale-verilog-verible-ls*
|
||||||
|
|
||||||
|
*ale-config.verilog_verible_ls_executable*
|
||||||
|
*g:ale_verilog_verible_ls_executable*
|
||||||
|
*b:ale_verilog_verible_ls_executable*
|
||||||
|
verilog_verible_ls_executable
|
||||||
|
g:ale_verilog_verible_ls_executable
|
||||||
|
Type: |String|
|
||||||
|
Default: `'verible-verilog-ls'`
|
||||||
|
|
||||||
|
This variable can be modifies to change the executable path for `verible_ls`
|
||||||
|
|
||||||
|
*ale-config.verilog_verible_ls_config*
|
||||||
|
*g:ale_verilog_verible_ls_config*
|
||||||
|
*b:ale_verilog_verible_ls_config*
|
||||||
|
verilog_verible_ls_config
|
||||||
|
g:ale_verilog_verible_ls_config
|
||||||
|
Type: |Dictionary|
|
||||||
|
Default: `{}`
|
||||||
|
|
||||||
|
Dictionary with configuration settings for `verible_ls`
|
||||||
|
|
||||||
|
*ale-config.verilog_verible_ls_options*
|
||||||
|
*g:ale_verilog_verible_ls_options*
|
||||||
|
*b:ale_verilog_verible_ls_options*
|
||||||
|
verilog_verible_ls_options
|
||||||
|
g:ale_verilog_verible_ls_options
|
||||||
|
Type: |String|
|
||||||
|
Default: `'--rules_config_search'`
|
||||||
|
|
||||||
|
Additional flags for `verible_ls`
|
||||||
|
|
||||||
|
*ale-config.verilog_verible_ls_rules*
|
||||||
|
*g:ale_verilog_verible_ls_rules*
|
||||||
|
*b:ale_verilog_verible_ls_rules*
|
||||||
|
verilog_verible_ls_rules
|
||||||
|
g:ale_verilog_verible_ls_rules
|
||||||
|
Type: |String|
|
||||||
|
Default: `''`
|
||||||
|
|
||||||
|
Additional rules applied by `verible_ls`
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
verible_format *ale-verilog-verible-format*
|
||||||
|
|
||||||
|
*ale-config.verilog_verible_format_executable*
|
||||||
|
*g:ale_verilog_verible_format_executable*
|
||||||
|
*b:ale_verilog_verible_format_executable*
|
||||||
|
verilog_verible_format_executable
|
||||||
|
g:ale_verilog_verible_format_executable
|
||||||
|
Type: |String|
|
||||||
|
Default: `'verible-verilog-format'`
|
||||||
|
|
||||||
|
This variable can be modifies to change the executable path for
|
||||||
|
`verible_format`
|
||||||
|
|
||||||
|
*ale-config.verilog_verible_format_options*
|
||||||
|
*g:ale_verilog_verible_format_options*
|
||||||
|
*b:ale_verilog_verible_format_options*
|
||||||
|
verilog_verible_format_options
|
||||||
|
g:ale_verilog_verible_format_options
|
||||||
|
Type: |String|
|
||||||
|
Default: `''`
|
||||||
|
|
||||||
|
Additional flags for `verible_format`
|
||||||
|
===============================================================================
|
||||||
|
|
||||||
verilator *ale-verilog-verilator*
|
verilator *ale-verilog-verilator*
|
||||||
|
|
||||||
*ale-options.verilog_verilator_options*
|
*ale-options.verilog_verilator_options*
|
||||||
|
|||||||
+54
-11
@@ -30,7 +30,8 @@ CONTENTS *ale-contents*
|
|||||||
7.2 Options for cspell................|ale-cspell-options|
|
7.2 Options for cspell................|ale-cspell-options|
|
||||||
7.3 Options for languagetool..........|ale-languagetool-options|
|
7.3 Options for languagetool..........|ale-languagetool-options|
|
||||||
7.4 Options for write-good............|ale-write-good-options|
|
7.4 Options for write-good............|ale-write-good-options|
|
||||||
7.5 Other Linter/Fixer Options........|ale-other-integration-options|
|
7.5 Options for redpen................|ale-redpen-options|
|
||||||
|
7.6 Other Linter/Fixer Options........|ale-other-integration-options|
|
||||||
8. Commands/Keybinds....................|ale-commands|
|
8. Commands/Keybinds....................|ale-commands|
|
||||||
9. API..................................|ale-api|
|
9. API..................................|ale-api|
|
||||||
10. Special Thanks......................|ale-special-thanks|
|
10. Special Thanks......................|ale-special-thanks|
|
||||||
@@ -2269,6 +2270,16 @@ g:ale_popup_menu_enabled
|
|||||||
This setting must be set to `true` or `1` before ALE is loaded for this
|
This setting must be set to `true` or `1` before ALE is loaded for this
|
||||||
behavior to be enabled. See |ale-lint-settings-on-startup|.
|
behavior to be enabled. See |ale-lint-settings-on-startup|.
|
||||||
|
|
||||||
|
*ale-options.references_show_contents*
|
||||||
|
*g:ale_references_show_contents*
|
||||||
|
references_show_contents
|
||||||
|
g:ale_references_show_contents
|
||||||
|
Type: |Boolean| or |Number|
|
||||||
|
Default: true
|
||||||
|
|
||||||
|
If set to `true` or `1`, matches found by `:ALEFindReferences` will be
|
||||||
|
shown with a preview of the matching line.
|
||||||
|
|
||||||
*ale-options.rename_tsserver_find_in_comments*
|
*ale-options.rename_tsserver_find_in_comments*
|
||||||
*g:ale_rename_tsserver_find_in_comments*
|
*g:ale_rename_tsserver_find_in_comments*
|
||||||
rename_tsserver_find_in_comments
|
rename_tsserver_find_in_comments
|
||||||
@@ -2297,18 +2308,17 @@ g:ale_root
|
|||||||
Type: |Dictionary| or |String|
|
Type: |Dictionary| or |String|
|
||||||
Default: `{}`
|
Default: `{}`
|
||||||
|
|
||||||
This option is used to determine the project root for a linter. When set to a
|
This option is used to determine the project root for a linter. If the value
|
||||||
|String| it will be used for all linters. When set to a |Dictionary|, the
|
is a |Dictionary|, it maps a linter to either a |String| containing the
|
||||||
keys are linter names and the values are either |Strings| containing project
|
project root or a |Funcref| to call to look up the root. The |Funcref| is
|
||||||
roots or |Funcref|s which are passed the buffer number.
|
provided the buffer number as its argument.
|
||||||
|
|
||||||
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.
|
project root itself.
|
||||||
|
|
||||||
If a value can be found from either variable, ALE uses it directly and skips
|
If neither variable yields a result, a linter-specific function is invoked to
|
||||||
searching for a project root. If no value is found, a linter-specific
|
detect a project root. If this, too, yields no result, and the linter is an
|
||||||
function is invoked to detect a project root. If this, too, yields no result
|
LSP linter, it will not run.
|
||||||
and the linter is an LSP linter, it will not run.
|
|
||||||
|
|
||||||
*ale-options.save_hidden*
|
*ale-options.save_hidden*
|
||||||
*g:ale_save_hidden*
|
*g:ale_save_hidden*
|
||||||
@@ -3322,7 +3332,24 @@ g:ale_writegood_use_global
|
|||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
7.6. Other Linter/Fixer Options *ale-other-integration-options*
|
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*
|
||||||
|
|
||||||
ALE supports a very wide variety of tools. Other linter or fixer options are
|
ALE supports a very wide variety of tools. Other linter or fixer options are
|
||||||
documented in additional help files.
|
documented in additional help files.
|
||||||
@@ -3343,6 +3370,7 @@ documented in additional help files.
|
|||||||
cspell................................|ale-asciidoc-cspell|
|
cspell................................|ale-asciidoc-cspell|
|
||||||
write-good............................|ale-asciidoc-write-good|
|
write-good............................|ale-asciidoc-write-good|
|
||||||
textlint..............................|ale-asciidoc-textlint|
|
textlint..............................|ale-asciidoc-textlint|
|
||||||
|
redpen................................|ale-asciidoc-redpen|
|
||||||
asm.....................................|ale-asm-options|
|
asm.....................................|ale-asm-options|
|
||||||
gcc...................................|ale-asm-gcc|
|
gcc...................................|ale-asm-gcc|
|
||||||
llvm_mc...............................|ale-asm-llvm_mc|
|
llvm_mc...............................|ale-asm-llvm_mc|
|
||||||
@@ -3391,6 +3419,7 @@ documented in additional help files.
|
|||||||
joker.................................|ale-clojure-joker|
|
joker.................................|ale-clojure-joker|
|
||||||
cloudformation..........................|ale-cloudformation-options|
|
cloudformation..........................|ale-cloudformation-options|
|
||||||
cfn-python-lint.......................|ale-cloudformation-cfn-python-lint|
|
cfn-python-lint.......................|ale-cloudformation-cfn-python-lint|
|
||||||
|
checkov...............................|ale-cloudformation-checkov|
|
||||||
cmake...................................|ale-cmake-options|
|
cmake...................................|ale-cmake-options|
|
||||||
cmakelint.............................|ale-cmake-cmakelint|
|
cmakelint.............................|ale-cmake-cmakelint|
|
||||||
cmake-lint............................|ale-cmake-cmake-lint|
|
cmake-lint............................|ale-cmake-cmake-lint|
|
||||||
@@ -3481,6 +3510,7 @@ documented in additional help files.
|
|||||||
fish....................................|ale-fish-options|
|
fish....................................|ale-fish-options|
|
||||||
fish_indent...........................|ale-fish-fish_indent|
|
fish_indent...........................|ale-fish-fish_indent|
|
||||||
fortran.................................|ale-fortran-options|
|
fortran.................................|ale-fortran-options|
|
||||||
|
fortitude.............................|ale-fortran-fortitude|
|
||||||
gcc...................................|ale-fortran-gcc|
|
gcc...................................|ale-fortran-gcc|
|
||||||
language_server.......................|ale-fortran-language-server|
|
language_server.......................|ale-fortran-language-server|
|
||||||
fountain................................|ale-fountain-options|
|
fountain................................|ale-fountain-options|
|
||||||
@@ -3604,6 +3634,7 @@ documented in additional help files.
|
|||||||
xo....................................|ale-javascript-xo|
|
xo....................................|ale-javascript-xo|
|
||||||
jinja...................................|ale-jinja-options|
|
jinja...................................|ale-jinja-options|
|
||||||
djlint................................|ale-jinja-djlint|
|
djlint................................|ale-jinja-djlint|
|
||||||
|
j2lint................................|ale-jinja-j2lint|
|
||||||
json....................................|ale-json-options|
|
json....................................|ale-json-options|
|
||||||
biome.................................|ale-json-biome|
|
biome.................................|ale-json-biome|
|
||||||
clang-format..........................|ale-json-clangformat|
|
clang-format..........................|ale-json-clangformat|
|
||||||
@@ -3666,6 +3697,7 @@ documented in additional help files.
|
|||||||
remark-lint...........................|ale-markdown-remark-lint|
|
remark-lint...........................|ale-markdown-remark-lint|
|
||||||
textlint..............................|ale-markdown-textlint|
|
textlint..............................|ale-markdown-textlint|
|
||||||
write-good............................|ale-markdown-write-good|
|
write-good............................|ale-markdown-write-good|
|
||||||
|
redpen................................|ale-markdown-redpen|
|
||||||
mercury.................................|ale-mercury-options|
|
mercury.................................|ale-mercury-options|
|
||||||
mmc...................................|ale-mercury-mmc|
|
mmc...................................|ale-mercury-mmc|
|
||||||
nasm....................................|ale-nasm-options|
|
nasm....................................|ale-nasm-options|
|
||||||
@@ -3720,6 +3752,7 @@ documented in additional help files.
|
|||||||
uncrustify............................|ale-pawn-uncrustify|
|
uncrustify............................|ale-pawn-uncrustify|
|
||||||
perl....................................|ale-perl-options|
|
perl....................................|ale-perl-options|
|
||||||
perl..................................|ale-perl-perl|
|
perl..................................|ale-perl-perl|
|
||||||
|
perl language server..................|ale-perl-languageserver|
|
||||||
perlcritic............................|ale-perl-perlcritic|
|
perlcritic............................|ale-perl-perlcritic|
|
||||||
perltidy..............................|ale-perl-perltidy|
|
perltidy..............................|ale-perl-perltidy|
|
||||||
perl6...................................|ale-perl6-options|
|
perl6...................................|ale-perl6-options|
|
||||||
@@ -3728,6 +3761,7 @@ documented in additional help files.
|
|||||||
cspell................................|ale-php-cspell|
|
cspell................................|ale-php-cspell|
|
||||||
langserver............................|ale-php-langserver|
|
langserver............................|ale-php-langserver|
|
||||||
phan..................................|ale-php-phan|
|
phan..................................|ale-php-phan|
|
||||||
|
phpactor..............................|ale-php-phpactor|
|
||||||
phpcbf................................|ale-php-phpcbf|
|
phpcbf................................|ale-php-phpcbf|
|
||||||
phpcs.................................|ale-php-phpcs|
|
phpcs.................................|ale-php-phpcs|
|
||||||
phpmd.................................|ale-php-phpmd|
|
phpmd.................................|ale-php-phpmd|
|
||||||
@@ -3917,6 +3951,7 @@ documented in additional help files.
|
|||||||
lacheck...............................|ale-tex-lacheck|
|
lacheck...............................|ale-tex-lacheck|
|
||||||
latexindent...........................|ale-tex-latexindent|
|
latexindent...........................|ale-tex-latexindent|
|
||||||
texlab................................|ale-tex-texlab|
|
texlab................................|ale-tex-texlab|
|
||||||
|
redpen................................|ale-tex-redpen|
|
||||||
texinfo.................................|ale-texinfo-options|
|
texinfo.................................|ale-texinfo-options|
|
||||||
cspell................................|ale-texinfo-cspell|
|
cspell................................|ale-texinfo-cspell|
|
||||||
write-good............................|ale-texinfo-write-good|
|
write-good............................|ale-texinfo-write-good|
|
||||||
@@ -3924,11 +3959,13 @@ documented in additional help files.
|
|||||||
cspell................................|ale-text-cspell|
|
cspell................................|ale-text-cspell|
|
||||||
textlint..............................|ale-text-textlint|
|
textlint..............................|ale-text-textlint|
|
||||||
write-good............................|ale-text-write-good|
|
write-good............................|ale-text-write-good|
|
||||||
|
redpen................................|ale-text-redpen|
|
||||||
thrift..................................|ale-thrift-options|
|
thrift..................................|ale-thrift-options|
|
||||||
thrift................................|ale-thrift-thrift|
|
thrift................................|ale-thrift-thrift|
|
||||||
thriftcheck...........................|ale-thrift-thriftcheck|
|
thriftcheck...........................|ale-thrift-thriftcheck|
|
||||||
toml....................................|ale-toml-options|
|
toml....................................|ale-toml-options|
|
||||||
dprint................................|ale-toml-dprint|
|
dprint................................|ale-toml-dprint|
|
||||||
|
tombi.................................|ale-toml-tombi|
|
||||||
typescript..............................|ale-typescript-options|
|
typescript..............................|ale-typescript-options|
|
||||||
biome.................................|ale-typescript-biome|
|
biome.................................|ale-typescript-biome|
|
||||||
cspell................................|ale-typescript-cspell|
|
cspell................................|ale-typescript-cspell|
|
||||||
@@ -3951,6 +3988,8 @@ documented in additional help files.
|
|||||||
hdl-checker...........................|ale-verilog-hdl-checker|
|
hdl-checker...........................|ale-verilog-hdl-checker|
|
||||||
iverilog..............................|ale-verilog-iverilog|
|
iverilog..............................|ale-verilog-iverilog|
|
||||||
slang.................................|ale-verilog-slang|
|
slang.................................|ale-verilog-slang|
|
||||||
|
verible_ls............................|ale-verilog-verible-ls|
|
||||||
|
verible_format........................|ale-verilog-verible-format|
|
||||||
verilator.............................|ale-verilog-verilator|
|
verilator.............................|ale-verilog-verilator|
|
||||||
vlog..................................|ale-verilog-vlog|
|
vlog..................................|ale-verilog-vlog|
|
||||||
xvlog.................................|ale-verilog-xvlog|
|
xvlog.................................|ale-verilog-xvlog|
|
||||||
@@ -4043,10 +4082,14 @@ documented in additional help files.
|
|||||||
`:ALEFindReferences -split` - Open the location in a horizontal split.
|
`:ALEFindReferences -split` - Open the location in a horizontal split.
|
||||||
`:ALEFindReferences -vsplit` - Open the location in a vertical split.
|
`:ALEFindReferences -vsplit` - Open the location in a vertical split.
|
||||||
`:ALEFindReferences -quickfix` - Put the locations into quickfix list.
|
`:ALEFindReferences -quickfix` - Put the locations into quickfix list.
|
||||||
|
`:ALEFindReferences -contents` - Show line contents for matches.
|
||||||
|
|
||||||
The default method used for navigating to a new location can be changed
|
The default method used for navigating to a new location can be changed
|
||||||
by modifying |g:ale_default_navigation|.
|
by modifying |g:ale_default_navigation|.
|
||||||
|
|
||||||
|
The default behaviour on whether to show line content for matches can
|
||||||
|
be changed by modifying |g:ale_references_show_contents|.
|
||||||
|
|
||||||
You can add `-relative` to the command to view results with relatives paths,
|
You can add `-relative` to the command to view results with relatives paths,
|
||||||
instead of absolute paths. This option has no effect if `-quickfix` is used.
|
instead of absolute paths. This option has no effect if `-quickfix` is used.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# shellcheck disable=SC2317
|
||||||
DOCKER=${DOCKER:-docker}
|
DOCKER=${DOCKER:-docker}
|
||||||
export DOCKER
|
export DOCKER
|
||||||
# Author: w0rp <devw0rp@gmail.com>
|
# Author: w0rp <devw0rp@gmail.com>
|
||||||
|
|||||||
+93
-86
@@ -14,15 +14,16 @@ formatting.
|
|||||||
|
|
||||||
**Legend**
|
**Legend**
|
||||||
|
|
||||||
| Key | Definition |
|
| Key | Definition |
|
||||||
| ------------- | ----------------------------------------------------------------- |
|
| -------------- | ----------------------------------------------------------------- |
|
||||||
| :floppy_disk: | May only run on files on disk (see: `help ale-lint-file-linters` |
|
|:speech_balloon:| Language Server Protocol (LSP) |
|
||||||
| :warning: | Disabled by default |
|
| :floppy_disk: | May only run on files on disk (see: `help ale-lint-file-linters` |
|
||||||
|
| :warning: | Disabled by default |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
* Ada
|
* Ada
|
||||||
* [ada_language_server](https://github.com/AdaCore/ada_language_server)
|
* [ada_language_server](https://github.com/AdaCore/ada_language_server) :speech_balloon:
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [gcc](https://gcc.gnu.org)
|
* [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:
|
* [gnatpp](https://docs.adacore.com/gnat_ugn-docs/html/gnat_ugn/gnat_ugn/gnat_utility_programs.html#the-gnat-pretty-printer-gnatpp) :floppy_disk:
|
||||||
@@ -32,13 +33,13 @@ formatting.
|
|||||||
* API Blueprint
|
* API Blueprint
|
||||||
* [drafter](https://github.com/apiaryio/drafter)
|
* [drafter](https://github.com/apiaryio/drafter)
|
||||||
* APKBUILD
|
* APKBUILD
|
||||||
* [apkbuild-fixer](https://gitlab.alpinelinux.org/Leo/atools)
|
* [apkbuild-fixer](https://gitlab.alpinelinux.org/Leo/atools) :speech_balloon:
|
||||||
* [apkbuild-lint](https://gitlab.alpinelinux.org/Leo/atools)
|
* [apkbuild-lint](https://gitlab.alpinelinux.org/Leo/atools) :speech_balloon:
|
||||||
* [secfixes-check](https://gitlab.alpinelinux.org/Leo/atools)
|
* [secfixes-check](https://gitlab.alpinelinux.org/Leo/atools) :speech_balloon:
|
||||||
* AsciiDoc
|
* AsciiDoc
|
||||||
* [alex](https://github.com/get-alex/alex)
|
* [alex](https://github.com/get-alex/alex)
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [languagetool](https://languagetool.org/) :floppy_disk:
|
* [languagetool](https://languagetool.org/) :floppy_disk: :speech_balloon:
|
||||||
* [proselint](http://proselint.com/)
|
* [proselint](http://proselint.com/)
|
||||||
* [redpen](http://redpen.cc/)
|
* [redpen](http://redpen.cc/)
|
||||||
* [textlint](https://textlint.github.io/)
|
* [textlint](https://textlint.github.io/)
|
||||||
@@ -64,11 +65,11 @@ formatting.
|
|||||||
* Bats
|
* Bats
|
||||||
* [shellcheck](https://www.shellcheck.net/)
|
* [shellcheck](https://www.shellcheck.net/)
|
||||||
* Bazel
|
* Bazel
|
||||||
* [buildifier](https://github.com/bazelbuild/buildtools)
|
* [buildifier](https://github.com/bazelbuild/buildtools) :speech_balloon:
|
||||||
* BibTeX
|
* BibTeX
|
||||||
* [bibclean](http://ftp.math.utah.edu/pub/bibclean/)
|
* [bibclean](http://ftp.math.utah.edu/pub/bibclean/)
|
||||||
* Bicep
|
* Bicep
|
||||||
* [bicep](https://github.com/Azure/bicep) :floppy_disk:
|
* [bicep](https://github.com/Azure/bicep) :floppy_disk: :speech_balloon:
|
||||||
* Bindzone
|
* Bindzone
|
||||||
* [checkzone](https://bind9.readthedocs.io/en/stable/manpages.html#named-checkzone-zone-file-validation-tool)
|
* [checkzone](https://bind9.readthedocs.io/en/stable/manpages.html#named-checkzone-zone-file-validation-tool)
|
||||||
* BitBake
|
* BitBake
|
||||||
@@ -79,15 +80,15 @@ formatting.
|
|||||||
* [shfmt](https://github.com/mvdan/sh)
|
* [shfmt](https://github.com/mvdan/sh)
|
||||||
* C
|
* C
|
||||||
* [astyle](http://astyle.sourceforge.net/)
|
* [astyle](http://astyle.sourceforge.net/)
|
||||||
* [ccls](https://github.com/MaskRay/ccls)
|
* [ccls](https://github.com/MaskRay/ccls) :speech_balloon:
|
||||||
* [clang](http://clang.llvm.org/)
|
* [clang](http://clang.llvm.org/)
|
||||||
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
||||||
* [clangcheck](http://clang.llvm.org/docs/ClangCheck.html) :floppy_disk:
|
* [clangcheck](http://clang.llvm.org/docs/ClangCheck.html) :floppy_disk:
|
||||||
* [clangd](https://clang.llvm.org/extra/clangd.html)
|
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
|
||||||
* [clangtidy](http://clang.llvm.org/extra/clang-tidy/) :floppy_disk:
|
* [clangtidy](http://clang.llvm.org/extra/clang-tidy/) :floppy_disk:
|
||||||
* [cppcheck](http://cppcheck.sourceforge.net)
|
* [cppcheck](http://cppcheck.sourceforge.net)
|
||||||
* [cpplint](https://github.com/cpplint/cpplint)
|
* [cpplint](https://github.com/cpplint/cpplint)
|
||||||
* [cquery](https://github.com/cquery-project/cquery)
|
* [cquery](https://github.com/cquery-project/cquery) :speech_balloon:
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [flawfinder](https://www.dwheeler.com/flawfinder/)
|
* [flawfinder](https://www.dwheeler.com/flawfinder/)
|
||||||
* [gcc](https://gcc.gnu.org/)
|
* [gcc](https://gcc.gnu.org/)
|
||||||
@@ -102,22 +103,22 @@ formatting.
|
|||||||
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||||
* C++ (filetype cpp)
|
* C++ (filetype cpp)
|
||||||
* [astyle](http://astyle.sourceforge.net/)
|
* [astyle](http://astyle.sourceforge.net/)
|
||||||
* [ccls](https://github.com/MaskRay/ccls)
|
* [ccls](https://github.com/MaskRay/ccls) :speech_balloon:
|
||||||
* [clang](http://clang.llvm.org/)
|
* [clang](http://clang.llvm.org/)
|
||||||
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
||||||
* [clangcheck](http://clang.llvm.org/docs/ClangCheck.html) :floppy_disk:
|
* [clangcheck](http://clang.llvm.org/docs/ClangCheck.html) :floppy_disk:
|
||||||
* [clangd](https://clang.llvm.org/extra/clangd.html)
|
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
|
||||||
* [clangtidy](http://clang.llvm.org/extra/clang-tidy/) :floppy_disk:
|
* [clangtidy](http://clang.llvm.org/extra/clang-tidy/) :floppy_disk:
|
||||||
* [clazy](https://github.com/KDE/clazy) :floppy_disk:
|
* [clazy](https://github.com/KDE/clazy) :floppy_disk:
|
||||||
* [cppcheck](http://cppcheck.sourceforge.net)
|
* [cppcheck](http://cppcheck.sourceforge.net)
|
||||||
* [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint) :floppy_disk:
|
* [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint) :floppy_disk:
|
||||||
* [cquery](https://github.com/cquery-project/cquery)
|
* [cquery](https://github.com/cquery-project/cquery) :speech_balloon:
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [flawfinder](https://www.dwheeler.com/flawfinder/)
|
* [flawfinder](https://www.dwheeler.com/flawfinder/)
|
||||||
* [gcc](https://gcc.gnu.org/)
|
* [gcc](https://gcc.gnu.org/)
|
||||||
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||||
* C3
|
* C3
|
||||||
* [c3lsp](https://github.com/pherrymason/c3-lsp)
|
* [c3lsp](https://github.com/pherrymason/c3-lsp) :speech_balloon:
|
||||||
* Cairo
|
* Cairo
|
||||||
* [scarb](https://docs.swmansion.com/scarb/) :floppy_disk:
|
* [scarb](https://docs.swmansion.com/scarb/) :floppy_disk:
|
||||||
* [starknet](https://starknet.io/docs)
|
* [starknet](https://starknet.io/docs)
|
||||||
@@ -130,6 +131,7 @@ formatting.
|
|||||||
* [joker](https://github.com/candid82/joker)
|
* [joker](https://github.com/candid82/joker)
|
||||||
* CloudFormation
|
* CloudFormation
|
||||||
* [cfn-python-lint](https://github.com/awslabs/cfn-python-lint)
|
* [cfn-python-lint](https://github.com/awslabs/cfn-python-lint)
|
||||||
|
* [checkov](https://github.com/bridgecrewio/checkov)
|
||||||
* CMake
|
* CMake
|
||||||
* [cmake-format](https://github.com/cheshirekow/cmake_format)
|
* [cmake-format](https://github.com/cheshirekow/cmake_format)
|
||||||
* [cmake-lint](https://github.com/cheshirekow/cmake_format)
|
* [cmake-lint](https://github.com/cheshirekow/cmake_format)
|
||||||
@@ -152,7 +154,7 @@ formatting.
|
|||||||
* [cucumber](https://cucumber.io/)
|
* [cucumber](https://cucumber.io/)
|
||||||
* CUDA
|
* CUDA
|
||||||
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
||||||
* [clangd](https://clang.llvm.org/extra/clangd.html)
|
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
|
||||||
* [nvcc](http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html) :floppy_disk:
|
* [nvcc](http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html) :floppy_disk:
|
||||||
* Cypher
|
* Cypher
|
||||||
* [cypher-lint](https://github.com/cleishm/libcypher-parser)
|
* [cypher-lint](https://github.com/cleishm/libcypher-parser)
|
||||||
@@ -187,8 +189,8 @@ formatting.
|
|||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning:
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning:
|
||||||
* [dialyxir](https://github.com/jeremyjh/dialyxir)
|
* [dialyxir](https://github.com/jeremyjh/dialyxir)
|
||||||
* [dogma](https://github.com/lpil/dogma) :floppy_disk:
|
* [dogma](https://github.com/lpil/dogma) :floppy_disk:
|
||||||
* [elixir-ls](https://github.com/elixir-lsp/elixir-ls) :warning:
|
* [elixir-ls](https://github.com/elixir-lsp/elixir-ls) :warning: :speech_balloon:
|
||||||
* [lexical](https://github.com/lexical-lsp/lexical) :warning:
|
* [lexical](https://github.com/lexical-lsp/lexical) :warning: :speech_balloon:
|
||||||
* [mix](https://hexdocs.pm/mix/Mix.html) :warning: :floppy_disk:
|
* [mix](https://hexdocs.pm/mix/Mix.html) :warning: :floppy_disk:
|
||||||
* Elm
|
* Elm
|
||||||
* [elm-format](https://github.com/avh4/elm-format)
|
* [elm-format](https://github.com/avh4/elm-format)
|
||||||
@@ -206,16 +208,17 @@ formatting.
|
|||||||
* [SyntaxErl](https://github.com/ten0s/syntaxerl)
|
* [SyntaxErl](https://github.com/ten0s/syntaxerl)
|
||||||
* [dialyzer](http://erlang.org/doc/man/dialyzer.html) :floppy_disk:
|
* [dialyzer](http://erlang.org/doc/man/dialyzer.html) :floppy_disk:
|
||||||
* [elvis](https://github.com/inaka/elvis) :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)
|
* [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)
|
* [erlang_ls](https://github.com/erlang-ls/erlang_ls) :speech_balloon:
|
||||||
* [erlc](http://erlang.org/doc/man/erlc.html)
|
* [erlc](http://erlang.org/doc/man/erlc.html)
|
||||||
* [erlfmt](https://github.com/WhatsApp/erlfmt)
|
* [erlfmt](https://github.com/WhatsApp/erlfmt)
|
||||||
* Fish
|
* Fish
|
||||||
* fish [-n flag](https://linux.die.net/man/1/fish)
|
* fish [-n flag](https://linux.die.net/man/1/fish)
|
||||||
* [fish_indent](https://fishshell.com/docs/current/cmds/fish_indent.html)
|
* [fish_indent](https://fishshell.com/docs/current/cmds/fish_indent.html)
|
||||||
* Fortran
|
* Fortran
|
||||||
|
* [fortitude](https://github.com/PlasmaFAIR/fortitude)
|
||||||
* [gcc](https://gcc.gnu.org/)
|
* [gcc](https://gcc.gnu.org/)
|
||||||
* [language_server](https://github.com/hansec/fortran-language-server)
|
* [language_server](https://github.com/hansec/fortran-language-server) :speech_balloon:
|
||||||
* Fountain
|
* Fountain
|
||||||
* [proselint](http://proselint.com/)
|
* [proselint](http://proselint.com/)
|
||||||
* FusionScript
|
* FusionScript
|
||||||
@@ -223,11 +226,11 @@ formatting.
|
|||||||
* Git Commit Messages
|
* Git Commit Messages
|
||||||
* [gitlint](https://github.com/jorisroovers/gitlint)
|
* [gitlint](https://github.com/jorisroovers/gitlint)
|
||||||
* Gleam
|
* Gleam
|
||||||
* [gleam_format](https://github.com/gleam-lang/gleam)
|
* [gleam_format](https://github.com/gleam-lang/gleam) :speech_balloon:
|
||||||
* [gleamlsp](https://github.com/gleam-lang/gleam)
|
* [gleamlsp](https://github.com/gleam-lang/gleam) :speech_balloon:
|
||||||
* GLSL
|
* GLSL
|
||||||
* [glslang](https://github.com/KhronosGroup/glslang)
|
* [glslang](https://github.com/KhronosGroup/glslang)
|
||||||
* [glslls](https://github.com/svenstaro/glsl-language-server)
|
* [glslls](https://github.com/svenstaro/glsl-language-server) :speech_balloon:
|
||||||
* Go
|
* Go
|
||||||
* [bingo](https://github.com/saibing/bingo) :warning:
|
* [bingo](https://github.com/saibing/bingo) :warning:
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning:
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning:
|
||||||
@@ -236,15 +239,15 @@ formatting.
|
|||||||
* [go vet](https://golang.org/cmd/vet/) :floppy_disk:
|
* [go vet](https://golang.org/cmd/vet/) :floppy_disk:
|
||||||
* [gofmt](https://golang.org/cmd/gofmt/)
|
* [gofmt](https://golang.org/cmd/gofmt/)
|
||||||
* [gofumpt](https://github.com/mvdan/gofumpt)
|
* [gofumpt](https://github.com/mvdan/gofumpt)
|
||||||
* [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) :warning:
|
* [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) :warning: :speech_balloon:
|
||||||
* [golangci-lint](https://github.com/golangci/golangci-lint) :warning: :floppy_disk:
|
* [golangci-lint](https://github.com/golangci/golangci-lint) :warning: :floppy_disk:
|
||||||
* [golangserver](https://github.com/sourcegraph/go-langserver) :warning:
|
* [golangserver](https://github.com/sourcegraph/go-langserver) :warning:
|
||||||
* [golines](https://github.com/segmentio/golines)
|
* [golines](https://github.com/segmentio/golines)
|
||||||
* [gopls](https://github.com/golang/go/wiki/gopls)
|
* [gopls](https://github.com/golang/tools/blob/master/gopls/README.md) :speech_balloon:
|
||||||
* [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple) :warning: :floppy_disk:
|
* [gosimple](https://staticcheck.io/changes/2019.2/#deprecated) :warning: :floppy_disk: :speech_balloon:
|
||||||
* [gotype](https://godoc.org/golang.org/x/tools/cmd/gotype) :warning: :floppy_disk:
|
* [gotype](https://godoc.org/golang.org/x/tools/cmd/gotype) :warning: :floppy_disk: :speech_balloon:
|
||||||
* [revive](https://github.com/mgechev/revive) :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:
|
* [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) :warning: :floppy_disk: :speech_balloon:
|
||||||
* Go HTML Templates
|
* Go HTML Templates
|
||||||
* [djlint](https://djlint.com/)
|
* [djlint](https://djlint.com/)
|
||||||
* GraphQL
|
* GraphQL
|
||||||
@@ -256,21 +259,21 @@ formatting.
|
|||||||
* Hack
|
* Hack
|
||||||
* [hack](http://hacklang.org/)
|
* [hack](http://hacklang.org/)
|
||||||
* [hackfmt](https://github.com/facebook/hhvm/tree/master/hphp/hack/hackfmt)
|
* [hackfmt](https://github.com/facebook/hhvm/tree/master/hphp/hack/hackfmt)
|
||||||
* [hhast](https://github.com/hhvm/hhast) :warning: (see `:help ale-integration-hack`)
|
* [hhast](https://github.com/hhvm/hhast) :warning: (see `:help ale-integration-hack`) :speech_balloon:
|
||||||
* Haml
|
* Haml
|
||||||
* [haml-lint](https://github.com/brigade/haml-lint)
|
* [haml-lint](https://github.com/brigade/haml-lint)
|
||||||
* Handlebars
|
* Handlebars
|
||||||
* [djlint](https://djlint.com/)
|
* [djlint](https://djlint.com/)
|
||||||
* [ember-template-lint](https://github.com/rwjblue/ember-template-lint)
|
* [ember-template-lint](https://github.com/rwjblue/ember-template-lint)
|
||||||
* Haskell
|
* Haskell
|
||||||
* [brittany](https://github.com/lspitzner/brittany)
|
* [brittany](https://github.com/lspitzner/brittany) :speech_balloon:
|
||||||
* [cabal-ghc](https://www.haskell.org/cabal/)
|
* [cabal-ghc](https://www.haskell.org/cabal/)
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [floskell](https://github.com/ennocramer/floskell)
|
* [floskell](https://github.com/ennocramer/floskell)
|
||||||
* [fourmolu](https://github.com/fourmolu/fourmolu)
|
* [fourmolu](https://github.com/fourmolu/fourmolu)
|
||||||
* [ghc](https://www.haskell.org/ghc/)
|
* [ghc](https://www.haskell.org/ghc/)
|
||||||
* [ghc-mod](https://github.com/DanielG/ghc-mod)
|
* [ghc-mod](https://github.com/DanielG/ghc-mod)
|
||||||
* [hdevtools](https://hackage.haskell.org/package/hdevtools)
|
* [hdevtools](https://hackage.haskell.org/package/hdevtools) :speech_balloon:
|
||||||
* [hfmt](https://github.com/danstiner/hfmt)
|
* [hfmt](https://github.com/danstiner/hfmt)
|
||||||
* [hie](https://github.com/haskell/haskell-ide-engine)
|
* [hie](https://github.com/haskell/haskell-ide-engine)
|
||||||
* [hindent](https://hackage.haskell.org/package/hindent)
|
* [hindent](https://hackage.haskell.org/package/hindent)
|
||||||
@@ -319,10 +322,10 @@ formatting.
|
|||||||
* [checkstyle](http://checkstyle.sourceforge.net) :floppy_disk:
|
* [checkstyle](http://checkstyle.sourceforge.net) :floppy_disk:
|
||||||
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [eclipselsp](https://github.com/eclipse/eclipse.jdt.ls)
|
* [eclipselsp](https://github.com/eclipse/eclipse.jdt.ls) :speech_balloon:
|
||||||
* [google-java-format](https://github.com/google/google-java-format)
|
* [google-java-format](https://github.com/google/google-java-format)
|
||||||
* [javac](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
|
* [javac](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
|
||||||
* [javalsp](https://github.com/georgewfraser/vscode-javac)
|
* [javalsp](https://github.com/georgewfraser/vscode-javac) :speech_balloon:
|
||||||
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||||
* JavaScript
|
* JavaScript
|
||||||
* [biome](https://biomejs.dev/)
|
* [biome](https://biomejs.dev/)
|
||||||
@@ -332,7 +335,7 @@ formatting.
|
|||||||
* [dprint](https://dprint.dev/)
|
* [dprint](https://dprint.dev/)
|
||||||
* [eslint](http://eslint.org/)
|
* [eslint](http://eslint.org/)
|
||||||
* [fecs](http://fecs.baidu.com/)
|
* [fecs](http://fecs.baidu.com/)
|
||||||
* [flow](https://flowtype.org/)
|
* [flow](https://flowtype.org/) :speech_balloon:
|
||||||
* [jscs](https://jscs-dev.github.io/)
|
* [jscs](https://jscs-dev.github.io/)
|
||||||
* [jshint](http://jshint.com/)
|
* [jshint](http://jshint.com/)
|
||||||
* [prettier](https://github.com/prettier/prettier)
|
* [prettier](https://github.com/prettier/prettier)
|
||||||
@@ -343,6 +346,7 @@ formatting.
|
|||||||
* [xo](https://github.com/sindresorhus/xo)
|
* [xo](https://github.com/sindresorhus/xo)
|
||||||
* Jinja
|
* Jinja
|
||||||
* [djlint](https://djlint.com/)
|
* [djlint](https://djlint.com/)
|
||||||
|
* [j2lint](https://github.com/aristanetworks/j2lint/)
|
||||||
* JSON
|
* JSON
|
||||||
* [VSCode JSON language server](https://github.com/hrsh7th/vscode-langservers-extracted)
|
* [VSCode JSON language server](https://github.com/hrsh7th/vscode-langservers-extracted)
|
||||||
* [biome](https://biomejs.dev/)
|
* [biome](https://biomejs.dev/)
|
||||||
@@ -362,8 +366,8 @@ formatting.
|
|||||||
* [biome](https://biomejs.dev/)
|
* [biome](https://biomejs.dev/)
|
||||||
* [eslint](http://eslint.org/) :warning:
|
* [eslint](http://eslint.org/) :warning:
|
||||||
* Jsonnet
|
* Jsonnet
|
||||||
* [jsonnet-lint](https://jsonnet.org/learning/tools.html)
|
* [jsonnet-lint](https://jsonnet.org/learning/tools.html) :speech_balloon:
|
||||||
* [jsonnetfmt](https://jsonnet.org/learning/tools.html)
|
* [jsonnetfmt](https://jsonnet.org/learning/tools.html) :speech_balloon:
|
||||||
* Julia
|
* Julia
|
||||||
* [languageserver](https://github.com/JuliaEditorSupport/LanguageServer.jl)
|
* [languageserver](https://github.com/JuliaEditorSupport/LanguageServer.jl)
|
||||||
* Kotlin
|
* Kotlin
|
||||||
@@ -377,7 +381,7 @@ formatting.
|
|||||||
* [lacheck](https://www.ctan.org/pkg/lacheck)
|
* [lacheck](https://www.ctan.org/pkg/lacheck)
|
||||||
* [proselint](http://proselint.com/)
|
* [proselint](http://proselint.com/)
|
||||||
* [redpen](http://redpen.cc/)
|
* [redpen](http://redpen.cc/)
|
||||||
* [texlab](https://texlab.netlify.com)
|
* [texlab](https://texlab.netlify.com) :speech_balloon:
|
||||||
* [textlint](https://textlint.github.io/)
|
* [textlint](https://textlint.github.io/)
|
||||||
* [vale](https://github.com/ValeLint/vale)
|
* [vale](https://github.com/ValeLint/vale)
|
||||||
* [write-good](https://github.com/btford/write-good)
|
* [write-good](https://github.com/btford/write-good)
|
||||||
@@ -392,7 +396,7 @@ formatting.
|
|||||||
* Lua
|
* Lua
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [lua-format](https://github.com/Koihik/LuaFormatter)
|
* [lua-format](https://github.com/Koihik/LuaFormatter)
|
||||||
* [lua-language-server](https://github.com/LuaLS/lua-language-server)
|
* [lua-language-server](https://github.com/LuaLS/lua-language-server) :speech_balloon:
|
||||||
* [luac](https://www.lua.org/manual/5.1/luac.html)
|
* [luac](https://www.lua.org/manual/5.1/luac.html)
|
||||||
* [luacheck](https://github.com/mpeterv/luacheck)
|
* [luacheck](https://github.com/mpeterv/luacheck)
|
||||||
* [luafmt](https://github.com/trixnz/lua-fmt)
|
* [luafmt](https://github.com/trixnz/lua-fmt)
|
||||||
@@ -400,7 +404,7 @@ formatting.
|
|||||||
* [stylua](https://github.com/johnnymorganz/stylua)
|
* [stylua](https://github.com/johnnymorganz/stylua)
|
||||||
* Mail
|
* Mail
|
||||||
* [alex](https://github.com/get-alex/alex)
|
* [alex](https://github.com/get-alex/alex)
|
||||||
* [languagetool](https://languagetool.org/) :floppy_disk:
|
* [languagetool](https://languagetool.org/) :floppy_disk: :speech_balloon:
|
||||||
* [proselint](http://proselint.com/)
|
* [proselint](http://proselint.com/)
|
||||||
* [vale](https://github.com/ValeLint/vale)
|
* [vale](https://github.com/ValeLint/vale)
|
||||||
* Make
|
* Make
|
||||||
@@ -408,9 +412,9 @@ formatting.
|
|||||||
* Markdown
|
* Markdown
|
||||||
* [alex](https://github.com/get-alex/alex)
|
* [alex](https://github.com/get-alex/alex)
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [languagetool](https://languagetool.org/) :floppy_disk:
|
* [languagetool](https://languagetool.org/) :floppy_disk: :speech_balloon:
|
||||||
* [markdownlint](https://github.com/DavidAnson/markdownlint) :floppy_disk:
|
* [markdownlint](https://github.com/DavidAnson/markdownlint) :floppy_disk:
|
||||||
* [marksman](https://github.com/artempyanykh/marksman)
|
* [marksman](https://github.com/artempyanykh/marksman) :speech_balloon:
|
||||||
* [mdl](https://github.com/mivok/markdownlint)
|
* [mdl](https://github.com/mivok/markdownlint)
|
||||||
* [pandoc](https://pandoc.org)
|
* [pandoc](https://pandoc.org)
|
||||||
* [prettier](https://github.com/prettier/prettier)
|
* [prettier](https://github.com/prettier/prettier)
|
||||||
@@ -422,7 +426,7 @@ formatting.
|
|||||||
* [vale](https://github.com/ValeLint/vale)
|
* [vale](https://github.com/ValeLint/vale)
|
||||||
* [write-good](https://github.com/btford/write-good)
|
* [write-good](https://github.com/btford/write-good)
|
||||||
* MATLAB
|
* MATLAB
|
||||||
* [mlint](https://www.mathworks.com/help/matlab/ref/mlint.html)
|
* [mlint](https://www.mathworks.com/help/matlab/ref/mlint.html) :speech_balloon:
|
||||||
* Mercury
|
* Mercury
|
||||||
* [mmc](http://mercurylang.org) :floppy_disk:
|
* [mmc](http://mercurylang.org) :floppy_disk:
|
||||||
* NASM
|
* NASM
|
||||||
@@ -431,7 +435,7 @@ formatting.
|
|||||||
* [nickel_format](https://github.com/tweag/nickel#formatting)
|
* [nickel_format](https://github.com/tweag/nickel#formatting)
|
||||||
* Nim
|
* Nim
|
||||||
* [nim check](https://nim-lang.org/docs/nimc.html) :floppy_disk:
|
* [nim check](https://nim-lang.org/docs/nimc.html) :floppy_disk:
|
||||||
* [nimlsp](https://github.com/PMunch/nimlsp)
|
* [nimlsp](https://github.com/PMunch/nimlsp) :speech_balloon:
|
||||||
* nimpretty
|
* nimpretty
|
||||||
* nix
|
* nix
|
||||||
* [alejandra](https://github.com/kamadorueda/alejandra)
|
* [alejandra](https://github.com/kamadorueda/alejandra)
|
||||||
@@ -439,7 +443,7 @@ formatting.
|
|||||||
* [nix-instantiate](http://nixos.org/nix/manual/#sec-nix-instantiate)
|
* [nix-instantiate](http://nixos.org/nix/manual/#sec-nix-instantiate)
|
||||||
* [nixfmt](https://github.com/serokell/nixfmt)
|
* [nixfmt](https://github.com/serokell/nixfmt)
|
||||||
* [nixpkgs-fmt](https://github.com/nix-community/nixpkgs-fmt)
|
* [nixpkgs-fmt](https://github.com/nix-community/nixpkgs-fmt)
|
||||||
* [rnix-lsp](https://github.com/nix-community/rnix-lsp)
|
* [rnix-lsp](https://github.com/nix-community/rnix-lsp) :speech_balloon:
|
||||||
* [statix](https://github.com/nerdypepper/statix)
|
* [statix](https://github.com/nerdypepper/statix)
|
||||||
* nroff
|
* nroff
|
||||||
* [alex](https://github.com/get-alex/alex)
|
* [alex](https://github.com/get-alex/alex)
|
||||||
@@ -448,24 +452,24 @@ formatting.
|
|||||||
* Nunjucks
|
* Nunjucks
|
||||||
* [djlint](https://djlint.com/)
|
* [djlint](https://djlint.com/)
|
||||||
* Objective-C
|
* Objective-C
|
||||||
* [ccls](https://github.com/MaskRay/ccls)
|
* [ccls](https://github.com/MaskRay/ccls) :speech_balloon:
|
||||||
* [clang](http://clang.llvm.org/)
|
* [clang](http://clang.llvm.org/)
|
||||||
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
||||||
* [clangd](https://clang.llvm.org/extra/clangd.html)
|
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
|
||||||
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||||
* Objective-C++
|
* Objective-C++
|
||||||
* [clang](http://clang.llvm.org/)
|
* [clang](http://clang.llvm.org/)
|
||||||
* [clangd](https://clang.llvm.org/extra/clangd.html)
|
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
|
||||||
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||||
* OCaml
|
* OCaml
|
||||||
* [dune](https://dune.build/)
|
* [dune](https://dune.build/)
|
||||||
* [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-ocaml-merlin` for configuration instructions
|
* [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-ocaml-merlin` for configuration instructions
|
||||||
* [ocamlformat](https://github.com/ocaml-ppx/ocamlformat)
|
* [ocamlformat](https://github.com/ocaml-ppx/ocamlformat)
|
||||||
* [ocamllsp](https://github.com/ocaml/ocaml-lsp)
|
* [ocamllsp](https://github.com/ocaml/ocaml-lsp) :speech_balloon:
|
||||||
* [ocp-indent](https://github.com/OCamlPro/ocp-indent)
|
* [ocp-indent](https://github.com/OCamlPro/ocp-indent)
|
||||||
* [ols](https://github.com/freebroccolo/ocaml-language-server)
|
* [ols](https://github.com/freebroccolo/ocaml-language-server) :speech_balloon:
|
||||||
* Odin
|
* Odin
|
||||||
* [ols](https://github.com/DanielGavin/ols)
|
* [ols](https://github.com/DanielGavin/ols) :speech_balloon:
|
||||||
* OpenApi
|
* OpenApi
|
||||||
* [ibm_validator](https://github.com/IBM/openapi-validator)
|
* [ibm_validator](https://github.com/IBM/openapi-validator)
|
||||||
* [prettier](https://github.com/prettier/prettier)
|
* [prettier](https://github.com/prettier/prettier)
|
||||||
@@ -476,10 +480,11 @@ formatting.
|
|||||||
* Packer (HCL)
|
* Packer (HCL)
|
||||||
* [packer-fmt-fixer](https://github.com/hashicorp/packer)
|
* [packer-fmt-fixer](https://github.com/hashicorp/packer)
|
||||||
* Pascal
|
* Pascal
|
||||||
* [ptop](https://www.freepascal.org/tools/ptop.var)
|
* [ptop](https://www.freepascal.org/tools/ptop.var) :speech_balloon:
|
||||||
* Pawn
|
* Pawn
|
||||||
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||||
* Perl
|
* Perl
|
||||||
|
* [languageserver](https://metacpan.org/pod/Perl::LanguageServer)
|
||||||
* [perl -c](https://perl.org/) :warning:
|
* [perl -c](https://perl.org/) :warning:
|
||||||
* [perl-critic](https://metacpan.org/pod/Perl::Critic)
|
* [perl-critic](https://metacpan.org/pod/Perl::Critic)
|
||||||
* [perltidy](https://metacpan.org/pod/distribution/Perl-Tidy/bin/perltidy)
|
* [perltidy](https://metacpan.org/pod/distribution/Perl-Tidy/bin/perltidy)
|
||||||
@@ -487,12 +492,12 @@ formatting.
|
|||||||
* [perl6 -c](https://perl6.org) :warning:
|
* [perl6 -c](https://perl6.org) :warning:
|
||||||
* PHP
|
* PHP
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [intelephense](https://github.com/bmewburn/intelephense-docs)
|
* [intelephense](https://github.com/bmewburn/intelephense-docs) :speech_balloon:
|
||||||
* [langserver](https://github.com/felixfbecker/php-language-server)
|
* [langserver](https://github.com/felixfbecker/php-language-server) :speech_balloon:
|
||||||
* [phan](https://github.com/phan/phan) see `:help ale-php-phan` to instructions
|
* [phan](https://github.com/phan/phan) see `:help ale-php-phan` to instructions :speech_balloon:
|
||||||
* [php -l](https://secure.php.net/)
|
* [php -l](https://secure.php.net/)
|
||||||
* [php-cs-fixer](https://cs.symfony.com)
|
* [php-cs-fixer](https://cs.symfony.com)
|
||||||
* [phpactor](https://github.com/phpactor/phpactor)
|
* [phpactor](https://github.com/phpactor/phpactor) :speech_balloon:
|
||||||
* [phpcbf](https://github.com/squizlabs/PHP_CodeSniffer)
|
* [phpcbf](https://github.com/squizlabs/PHP_CodeSniffer)
|
||||||
* [phpcs](https://github.com/squizlabs/PHP_CodeSniffer)
|
* [phpcs](https://github.com/squizlabs/PHP_CodeSniffer)
|
||||||
* [phpmd](https://phpmd.org)
|
* [phpmd](https://phpmd.org)
|
||||||
@@ -530,7 +535,7 @@ formatting.
|
|||||||
* [puppet](https://puppet.com)
|
* [puppet](https://puppet.com)
|
||||||
* [puppet-lint](https://puppet-lint.com)
|
* [puppet-lint](https://puppet-lint.com)
|
||||||
* PureScript
|
* PureScript
|
||||||
* [purescript-language-server](https://github.com/nwolverson/purescript-language-server)
|
* [purescript-language-server](https://github.com/nwolverson/purescript-language-server) :speech_balloon:
|
||||||
* [purs-tidy](https://github.com/natefaubion/purescript-tidy)
|
* [purs-tidy](https://github.com/natefaubion/purescript-tidy)
|
||||||
* [purty](https://gitlab.com/joneshf/purty)
|
* [purty](https://gitlab.com/joneshf/purty)
|
||||||
* Python
|
* Python
|
||||||
@@ -552,10 +557,10 @@ formatting.
|
|||||||
* [pyflyby](https://github.com/deshaw/pyflyby) :warning:
|
* [pyflyby](https://github.com/deshaw/pyflyby) :warning:
|
||||||
* [pylama](https://github.com/klen/pylama) :floppy_disk:
|
* [pylama](https://github.com/klen/pylama) :floppy_disk:
|
||||||
* [pylint](https://www.pylint.org/) :floppy_disk:
|
* [pylint](https://www.pylint.org/) :floppy_disk:
|
||||||
* [pylsp](https://github.com/python-lsp/python-lsp-server) :warning:
|
* [pylsp](https://github.com/python-lsp/python-lsp-server) :warning: :speech_balloon:
|
||||||
* [pyre](https://github.com/facebook/pyre-check) :warning:
|
* [pyre](https://github.com/facebook/pyre-check) :warning:
|
||||||
* [pyrefly](https://github.com/facebook/pyrefly) :warning:
|
* [pyrefly](https://github.com/facebook/pyrefly) :warning: :speech_balloon:
|
||||||
* [pyright](https://github.com/microsoft/pyright)
|
* [pyright](https://github.com/microsoft/pyright) :speech_balloon:
|
||||||
* [refurb](https://github.com/dosisod/refurb) :floppy_disk:
|
* [refurb](https://github.com/dosisod/refurb) :floppy_disk:
|
||||||
* [reorder-python-imports](https://github.com/asottile/reorder_python_imports)
|
* [reorder-python-imports](https://github.com/asottile/reorder_python_imports)
|
||||||
* [ruff](https://github.com/charliermarsh/ruff)
|
* [ruff](https://github.com/charliermarsh/ruff)
|
||||||
@@ -565,21 +570,21 @@ formatting.
|
|||||||
* [yapf](https://github.com/google/yapf)
|
* [yapf](https://github.com/google/yapf)
|
||||||
* QML
|
* QML
|
||||||
* [qmlfmt](https://github.com/jesperhh/qmlfmt)
|
* [qmlfmt](https://github.com/jesperhh/qmlfmt)
|
||||||
* [qmllint](https://github.com/qt/qtdeclarative/tree/5.11/tools/qmllint)
|
* [qmllint](https://github.com/qt/qtdeclarative/tree/5.11/tools/qmllint) :speech_balloon:
|
||||||
* R
|
* R
|
||||||
* [languageserver](https://github.com/REditorSupport/languageserver)
|
* [languageserver](https://github.com/REditorSupport/languageserver)
|
||||||
* [lintr](https://github.com/jimhester/lintr)
|
* [lintr](https://github.com/jimhester/lintr)
|
||||||
* [styler](https://github.com/r-lib/styler)
|
* [styler](https://github.com/r-lib/styler)
|
||||||
* Racket
|
* Racket
|
||||||
* [racket-langserver](https://github.com/jeapostrophe/racket-langserver/tree/master)
|
* [racket-langserver](https://github.com/jeapostrophe/racket-langserver/tree/master) :speech_balloon:
|
||||||
* [raco](https://docs.racket-lang.org/raco/)
|
* [raco](https://docs.racket-lang.org/raco/)
|
||||||
* [raco_fmt](https://docs.racket-lang.org/fmt/)
|
* [raco_fmt](https://docs.racket-lang.org/fmt/)
|
||||||
* Re:VIEW
|
* Re:VIEW
|
||||||
* [redpen](http://redpen.cc/)
|
* [redpen](http://redpen.cc/)
|
||||||
* ReasonML
|
* ReasonML
|
||||||
* [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-reasonml-ols` for configuration instructions
|
* [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-reasonml-ols` for configuration instructions
|
||||||
* [ols](https://github.com/freebroccolo/ocaml-language-server)
|
* [ols](https://github.com/freebroccolo/ocaml-language-server) :speech_balloon:
|
||||||
* [reason-language-server](https://github.com/jaredly/reason-language-server)
|
* [reason-language-server](https://github.com/jaredly/reason-language-server) :speech_balloon:
|
||||||
* [refmt](https://github.com/reasonml/reason-cli)
|
* [refmt](https://github.com/reasonml/reason-cli)
|
||||||
* Rego
|
* Rego
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
@@ -603,7 +608,7 @@ formatting.
|
|||||||
* [roc_format](https://github.com/roc-lang/roc)
|
* [roc_format](https://github.com/roc-lang/roc)
|
||||||
* [roc_language_server](https://github.com/roc-lang/roc)
|
* [roc_language_server](https://github.com/roc-lang/roc)
|
||||||
* RPM spec
|
* RPM spec
|
||||||
* [rpmlint](https://github.com/rpm-software-management/rpmlint) :warning: (see `:help ale-integration-spec`)
|
* [rpmlint](https://github.com/rpm-software-management/rpmlint) :warning: (see `:help ale-integration-spec`) :speech_balloon:
|
||||||
* Ruby
|
* Ruby
|
||||||
* [brakeman](http://brakemanscanner.org/) :floppy_disk:
|
* [brakeman](http://brakemanscanner.org/) :floppy_disk:
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
@@ -616,13 +621,13 @@ formatting.
|
|||||||
* [ruby](https://www.ruby-lang.org)
|
* [ruby](https://www.ruby-lang.org)
|
||||||
* [rubyfmt](https://github.com/fables-tales/rubyfmt)
|
* [rubyfmt](https://github.com/fables-tales/rubyfmt)
|
||||||
* [rufo](https://github.com/ruby-formatter/rufo)
|
* [rufo](https://github.com/ruby-formatter/rufo)
|
||||||
* [solargraph](https://solargraph.org)
|
* [solargraph](https://solargraph.org) :speech_balloon:
|
||||||
* [sorbet](https://github.com/sorbet/sorbet)
|
* [sorbet](https://github.com/sorbet/sorbet) :speech_balloon:
|
||||||
* [standardrb](https://github.com/testdouble/standard)
|
* [standardrb](https://github.com/testdouble/standard)
|
||||||
* [steep](https://github.com/soutaro/steep)
|
* [steep](https://github.com/soutaro/steep)
|
||||||
* [syntax_tree](https://github.com/ruby-syntax-tree/syntax_tree)
|
* [syntax_tree](https://github.com/ruby-syntax-tree/syntax_tree)
|
||||||
* Rust
|
* Rust
|
||||||
* [cargo](https://github.com/rust-lang/cargo) :floppy_disk: (see `:help ale-integration-rust` for configuration instructions)
|
* [cargo](https://github.com/rust-lang/cargo) :floppy_disk: (see `:help ale-integration-rust` for configuration instructions) :speech_balloon:
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [rls](https://github.com/rust-lang-nursery/rls) :warning:
|
* [rls](https://github.com/rust-lang-nursery/rls) :warning:
|
||||||
* [rust-analyzer](https://github.com/rust-analyzer/rust-analyzer) :warning:
|
* [rust-analyzer](https://github.com/rust-analyzer/rust-analyzer) :warning:
|
||||||
@@ -635,8 +640,8 @@ formatting.
|
|||||||
* [stylelint](https://github.com/stylelint/stylelint)
|
* [stylelint](https://github.com/stylelint/stylelint)
|
||||||
* Scala
|
* Scala
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [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)
|
* [fsc](https://www.scala-lang.org/old/sites/default/files/linuxsoft_archives/docu/files/tools/fsc.html) :speech_balloon:
|
||||||
* [metals](https://scalameta.org/metals/)
|
* [metals](https://scalameta.org/metals/) :speech_balloon:
|
||||||
* [sbtserver](https://www.scala-sbt.org/1.x/docs/sbt-server.html)
|
* [sbtserver](https://www.scala-sbt.org/1.x/docs/sbt-server.html)
|
||||||
* [scalac](http://scala-lang.org)
|
* [scalac](http://scala-lang.org)
|
||||||
* [scalafmt](https://scalameta.org/scalafmt/)
|
* [scalafmt](https://scalameta.org/scalafmt/)
|
||||||
@@ -669,11 +674,11 @@ formatting.
|
|||||||
* [stylelint](https://github.com/stylelint/stylelint)
|
* [stylelint](https://github.com/stylelint/stylelint)
|
||||||
* Svelte
|
* Svelte
|
||||||
* [prettier](https://github.com/prettier/prettier)
|
* [prettier](https://github.com/prettier/prettier)
|
||||||
* [svelteserver](https://github.com/sveltejs/language-tools/tree/master/packages/language-server)
|
* [svelteserver](https://github.com/sveltejs/language-tools/tree/master/packages/language-server) :speech_balloon:
|
||||||
* Swift
|
* Swift
|
||||||
* [Apple swift-format](https://github.com/apple/swift-format)
|
* [Apple swift-format](https://github.com/apple/swift-format)
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [sourcekit-lsp](https://github.com/apple/sourcekit-lsp)
|
* [sourcekit-lsp](https://github.com/apple/sourcekit-lsp) :speech_balloon:
|
||||||
* [swiftformat](https://github.com/nicklockwood/SwiftFormat)
|
* [swiftformat](https://github.com/nicklockwood/SwiftFormat)
|
||||||
* [swiftlint](https://github.com/realm/SwiftLint)
|
* [swiftlint](https://github.com/realm/SwiftLint)
|
||||||
* systemd
|
* systemd
|
||||||
@@ -684,8 +689,8 @@ formatting.
|
|||||||
* [checkov](https://github.com/bridgecrewio/checkov)
|
* [checkov](https://github.com/bridgecrewio/checkov)
|
||||||
* [terraform](https://github.com/hashicorp/terraform)
|
* [terraform](https://github.com/hashicorp/terraform)
|
||||||
* [terraform-fmt-fixer](https://github.com/hashicorp/terraform)
|
* [terraform-fmt-fixer](https://github.com/hashicorp/terraform)
|
||||||
* [terraform-ls](https://github.com/hashicorp/terraform-ls)
|
* [terraform-ls](https://github.com/hashicorp/terraform-ls) :speech_balloon:
|
||||||
* [terraform-lsp](https://github.com/juliosueiras/terraform-lsp)
|
* [terraform-lsp](https://github.com/juliosueiras/terraform-lsp) :speech_balloon:
|
||||||
* [tflint](https://github.com/wata727/tflint)
|
* [tflint](https://github.com/wata727/tflint)
|
||||||
* [tfsec](https://github.com/aquasecurity/tfsec)
|
* [tfsec](https://github.com/aquasecurity/tfsec)
|
||||||
* Texinfo
|
* Texinfo
|
||||||
@@ -696,7 +701,7 @@ formatting.
|
|||||||
* Text
|
* Text
|
||||||
* [alex](https://github.com/get-alex/alex) :warning:
|
* [alex](https://github.com/get-alex/alex) :warning:
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [languagetool](https://languagetool.org/) :floppy_disk:
|
* [languagetool](https://languagetool.org/) :floppy_disk: :speech_balloon:
|
||||||
* [proselint](http://proselint.com/) :warning:
|
* [proselint](http://proselint.com/) :warning:
|
||||||
* [redpen](http://redpen.cc/) :warning:
|
* [redpen](http://redpen.cc/) :warning:
|
||||||
* [textlint](https://textlint.github.io/) :warning:
|
* [textlint](https://textlint.github.io/) :warning:
|
||||||
@@ -707,6 +712,7 @@ formatting.
|
|||||||
* [thriftcheck](https://github.com/pinterest/thriftcheck)
|
* [thriftcheck](https://github.com/pinterest/thriftcheck)
|
||||||
* TOML
|
* TOML
|
||||||
* [dprint](https://dprint.dev)
|
* [dprint](https://dprint.dev)
|
||||||
|
* [tombi](https://tombi-toml.github.io/tombi/)
|
||||||
* TypeScript
|
* TypeScript
|
||||||
* [biome](https://biomejs.dev/)
|
* [biome](https://biomejs.dev/)
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
@@ -731,16 +737,17 @@ formatting.
|
|||||||
* [hdl-checker](https://pypi.org/project/hdl-checker)
|
* [hdl-checker](https://pypi.org/project/hdl-checker)
|
||||||
* [iverilog](https://github.com/steveicarus/iverilog)
|
* [iverilog](https://github.com/steveicarus/iverilog)
|
||||||
* [slang](https://github.com/MikePopoloski/slang)
|
* [slang](https://github.com/MikePopoloski/slang)
|
||||||
|
* [verible](https://github.com/chipsalliance/verible/tree/master)
|
||||||
* [verilator](http://www.veripool.org/projects/verilator/wiki/Intro)
|
* [verilator](http://www.veripool.org/projects/verilator/wiki/Intro)
|
||||||
* [vlog](https://www.mentor.com/products/fv/questa/)
|
* [vlog](https://www.mentor.com/products/fv/questa/)
|
||||||
* [xvlog](https://www.xilinx.com/products/design-tools/vivado.html)
|
* [xvlog](https://www.xilinx.com/products/design-tools/vivado.html) :speech_balloon:
|
||||||
* [yosys](http://www.clifford.at/yosys/) :floppy_disk:
|
* [yosys](http://www.clifford.at/yosys/) :floppy_disk:
|
||||||
* VHDL
|
* VHDL
|
||||||
* [ghdl](https://github.com/ghdl/ghdl)
|
* [ghdl](https://github.com/ghdl/ghdl)
|
||||||
* [vcom](https://www.mentor.com/products/fv/questa/)
|
* [vcom](https://www.mentor.com/products/fv/questa/)
|
||||||
* [xvhdl](https://www.xilinx.com/products/design-tools/vivado.html)
|
* [xvhdl](https://www.xilinx.com/products/design-tools/vivado.html) :speech_balloon:
|
||||||
* Vim
|
* Vim
|
||||||
* [vimls](https://github.com/iamcco/vim-language-server)
|
* [vimls](https://github.com/iamcco/vim-language-server) :speech_balloon:
|
||||||
* [vint](https://github.com/Kuniwak/vint)
|
* [vint](https://github.com/Kuniwak/vint)
|
||||||
* Vim help
|
* Vim help
|
||||||
* [alex](https://github.com/get-alex/alex) :warning:
|
* [alex](https://github.com/get-alex/alex) :warning:
|
||||||
@@ -749,7 +756,7 @@ formatting.
|
|||||||
* Vue
|
* Vue
|
||||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||||
* [prettier](https://github.com/prettier/prettier)
|
* [prettier](https://github.com/prettier/prettier)
|
||||||
* [vls](https://github.com/vuejs/vetur/tree/master/server)
|
* [vls](https://github.com/vuejs/vetur/tree/master/server) :speech_balloon:
|
||||||
* [volar](https://github.com/johnsoncodehk/volar)
|
* [volar](https://github.com/johnsoncodehk/volar)
|
||||||
* WGSL
|
* WGSL
|
||||||
* [naga](https://github.com/gfx-rs/naga)
|
* [naga](https://github.com/gfx-rs/naga)
|
||||||
@@ -766,14 +773,14 @@ formatting.
|
|||||||
* [gitlablint](https://github.com/elijah-roberts/gitlab-lint)
|
* [gitlablint](https://github.com/elijah-roberts/gitlab-lint)
|
||||||
* [prettier](https://github.com/prettier/prettier)
|
* [prettier](https://github.com/prettier/prettier)
|
||||||
* [spectral](https://github.com/stoplightio/spectral)
|
* [spectral](https://github.com/stoplightio/spectral)
|
||||||
* [swaglint](https://github.com/byCedric/swaglint) :warning:
|
* [swaglint](https://github.com/byCedric/swaglint) :warning: :speech_balloon:
|
||||||
* [yaml-language-server](https://github.com/redhat-developer/yaml-language-server)
|
* [yaml-language-server](https://github.com/redhat-developer/yaml-language-server) :speech_balloon:
|
||||||
* [yamlfix](https://lyz-code.github.io/yamlfix)
|
* [yamlfix](https://lyz-code.github.io/yamlfix)
|
||||||
* [yamlfmt](https://github.com/google/yamlfmt)
|
* [yamlfmt](https://github.com/google/yamlfmt)
|
||||||
* [yamllint](https://yamllint.readthedocs.io/)
|
* [yamllint](https://yamllint.readthedocs.io/)
|
||||||
* [yq](https://github.com/mikefarah/yq)
|
* [yq](https://github.com/mikefarah/yq)
|
||||||
* YANG
|
* YANG
|
||||||
* [yang-lsp](https://github.com/theia-ide/yang-lsp)
|
* [yang-lsp](https://github.com/theia-ide/yang-lsp) :speech_balloon:
|
||||||
* Yara
|
* Yara
|
||||||
* [yls](https://github.com/avast/yls)
|
* [yls](https://github.com/avast/yls)
|
||||||
* Zeek
|
* Zeek
|
||||||
@@ -781,4 +788,4 @@ formatting.
|
|||||||
* Zig
|
* Zig
|
||||||
* [zigfmt](https://github.com/ziglang/zig)
|
* [zigfmt](https://github.com/ziglang/zig)
|
||||||
* [zlint](https://github.com/DonIsaac/zlint)
|
* [zlint](https://github.com/DonIsaac/zlint)
|
||||||
* [zls](https://github.com/zigtools/zls)
|
* [zls](https://github.com/zigtools/zls) :speech_balloon:
|
||||||
|
|||||||
@@ -1,53 +1,47 @@
|
|||||||
Before:
|
Before:
|
||||||
Save g:ale_ruby_rubocop_executable
|
call ale#assert#SetUpFixerTest('ruby', 'rubocop')
|
||||||
Save g:ale_ruby_rubocop_options
|
|
||||||
|
|
||||||
" Use an invalid global executable, so we don't match it.
|
|
||||||
let g:ale_ruby_rubocop_executable = 'xxxinvalid'
|
|
||||||
let g:ale_ruby_rubocop_options = ''
|
|
||||||
|
|
||||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
|
||||||
|
|
||||||
After:
|
After:
|
||||||
Restore
|
call ale#assert#TearDownFixerTest()
|
||||||
|
|
||||||
call ale#test#RestoreDirectory()
|
|
||||||
|
|
||||||
Execute(The rubocop callback should return the correct default values):
|
Execute(The rubocop callback should return the correct default values):
|
||||||
call ale#test#SetFilename('../test-files/ruby/dummy.rb')
|
call ale#test#SetFilename('../test-files/ruby/dummy.rb')
|
||||||
|
|
||||||
AssertEqual
|
GivenCommandOutput ['1.61.0']
|
||||||
|
|
||||||
|
AssertFixer
|
||||||
\ {
|
\ {
|
||||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
||||||
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
||||||
\ . ' --auto-correct --force-exclusion --stdin %s',
|
\ . ' --auto-correct --editor-mode --force-exclusion --stdin %s',
|
||||||
\ },
|
\ }
|
||||||
\ ale#fixers#rubocop#Fix(bufnr(''))
|
|
||||||
|
|
||||||
Execute(The rubocop callback should include custom rubocop options):
|
Execute(The rubocop callback should include custom rubocop options):
|
||||||
let g:ale_ruby_rubocop_options = '--except Lint/Debugger'
|
let g:ale_ruby_rubocop_options = '--except Lint/Debugger'
|
||||||
call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
|
call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
|
||||||
|
|
||||||
AssertEqual
|
GivenCommandOutput ['1.61.0']
|
||||||
|
|
||||||
|
AssertFixer
|
||||||
\ {
|
\ {
|
||||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
||||||
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
||||||
\ . ' --except Lint/Debugger'
|
\ . ' --except Lint/Debugger'
|
||||||
\ . ' --auto-correct --force-exclusion --stdin %s',
|
\ . ' --auto-correct --editor-mode --force-exclusion --stdin %s',
|
||||||
\ },
|
\ }
|
||||||
\ ale#fixers#rubocop#Fix(bufnr(''))
|
|
||||||
|
|
||||||
Execute(The rubocop callback should use auto-correct-all option when set):
|
Execute(The rubocop callback should use auto-correct-all option when set):
|
||||||
let g:ale_ruby_rubocop_auto_correct_all = 1
|
let g:ale_ruby_rubocop_auto_correct_all = 1
|
||||||
call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
|
call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
|
||||||
|
|
||||||
AssertEqual
|
GivenCommandOutput ['1.61.0']
|
||||||
|
|
||||||
|
AssertFixer
|
||||||
\ {
|
\ {
|
||||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
||||||
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
||||||
\ . ' --auto-correct-all --force-exclusion --stdin %s'
|
\ . ' --auto-correct-all --editor-mode --force-exclusion --stdin %s'
|
||||||
\ },
|
\ }
|
||||||
\ ale#fixers#rubocop#Fix(bufnr(''))
|
|
||||||
|
|
||||||
Execute(The rubocop post-processor should remove diagnostics content):
|
Execute(The rubocop post-processor should remove diagnostics content):
|
||||||
AssertEqual
|
AssertEqual
|
||||||
@@ -87,3 +81,16 @@ Execute(The rubocop post-processor should remove diagnostics content):
|
|||||||
\ ' ''forrest'',',
|
\ ' ''forrest'',',
|
||||||
\ ' ''run'']',
|
\ ' ''run'']',
|
||||||
\ ])
|
\ ])
|
||||||
|
|
||||||
|
Execute(The rubocop callback should not use editor-mode option with older versions):
|
||||||
|
call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
|
||||||
|
|
||||||
|
GivenCommandOutput ['1.59.0']
|
||||||
|
|
||||||
|
AssertFixer
|
||||||
|
\ {
|
||||||
|
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
||||||
|
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
||||||
|
\ . ' --auto-correct --force-exclusion --stdin %s'
|
||||||
|
\ }
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
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(''))
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
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(''))
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
Before:
|
||||||
|
call ale#assert#SetUpFixerTest('verilog', 'verible_format')
|
||||||
|
|
||||||
|
After:
|
||||||
|
call ale#assert#TearDownFixerTest()
|
||||||
|
|
||||||
|
Execute(The verible format callback should return the correct default values):
|
||||||
|
AssertFixer {'command': ale#Escape('verible-verilog-format') .' -'}
|
||||||
|
|
||||||
|
Execute(The verible format callback should allow a custom executable):
|
||||||
|
let g:ale_verilog_verible_format_executable = 'foo/bar'
|
||||||
|
AssertFixer {'command': ale#Escape('foo/bar') . ' -'}
|
||||||
|
|
||||||
|
Execute(The verible format callback should allow custom options):
|
||||||
|
let g:ale_verilog_verible_format_options = '--foo --bar'
|
||||||
|
AssertFixer {'command': ale#Escape('verible-verilog-format') .' --foo --bar -'}
|
||||||
@@ -7,6 +7,27 @@ After:
|
|||||||
call ale#linter#Reset()
|
call ale#linter#Reset()
|
||||||
|
|
||||||
Execute(The oelint_adv handler should handle warnings):
|
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 [branch:true]',
|
||||||
|
\ '[31mexample2_1.1.bb:17:error:oelint.var.mandatoryvar.DESCRIPTION:Variable ''DESCRIPTION'' should be set[0m [branch:true]',
|
||||||
|
\ ])
|
||||||
|
|
||||||
|
Execute(The oelint_adv handler should handle warnings without branch message):
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [
|
\ [
|
||||||
\ {
|
\ {
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
Before:
|
||||||
|
runtime ale_linters/cloudformation/checkov.vim
|
||||||
|
call ale#test#SetFilename('sample.template.yaml')
|
||||||
|
|
||||||
|
After:
|
||||||
|
call ale#linter#Reset()
|
||||||
|
|
||||||
|
Execute(Handle output for no findings correctly):
|
||||||
|
AssertEqual
|
||||||
|
\ [],
|
||||||
|
\ ale_linters#cloudformation#checkov#Handle(bufnr(''), [
|
||||||
|
\'{',
|
||||||
|
\' "passed": 0,',
|
||||||
|
\' "failed": 0,',
|
||||||
|
\' "skipped": 0,',
|
||||||
|
\' "parsing_errors": 0,',
|
||||||
|
\' "resource_count": 0,',
|
||||||
|
\' "checkov_version": "3.2.415"',
|
||||||
|
\'}'
|
||||||
|
\])
|
||||||
|
|
||||||
|
Execute(Handle output for all tests passed):
|
||||||
|
AssertEqual
|
||||||
|
\ [],
|
||||||
|
\ ale_linters#cloudformation#checkov#Handle(bufnr(''), [
|
||||||
|
\'{',
|
||||||
|
\' "check_type": "cloudformation",',
|
||||||
|
\' "results": {',
|
||||||
|
\' "failed_checks": []',
|
||||||
|
\' },',
|
||||||
|
\' "summary": {',
|
||||||
|
\' "passed": 18,',
|
||||||
|
\' "failed": 0,',
|
||||||
|
\' "skipped": 0,',
|
||||||
|
\' "parsing_errors": 0,',
|
||||||
|
\' "resource_count": 3,',
|
||||||
|
\' "checkov_version": "3.2.415"',
|
||||||
|
\' }',
|
||||||
|
\'}'
|
||||||
|
\])
|
||||||
|
|
||||||
|
Execute(The JSON output of checkov should be handled correctly):
|
||||||
|
AssertEqual
|
||||||
|
\ [
|
||||||
|
\ {
|
||||||
|
\ 'filename': '/sample.template.yaml',
|
||||||
|
\ 'lnum': 57,
|
||||||
|
\ 'end_lnum': 79,
|
||||||
|
\ 'text': 'Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ) [CKV_AWS_116]',
|
||||||
|
\ 'detail': "CKV_AWS_116: Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)\n" .
|
||||||
|
\ 'For more information, see: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-for-a-dead-letter-queue-dlq',
|
||||||
|
\ 'type': 'W',
|
||||||
|
\ }
|
||||||
|
\ ],
|
||||||
|
\ ale_linters#cloudformation#checkov#Handle(bufnr(''), [
|
||||||
|
\'{',
|
||||||
|
\' "check_type": "cloudformation",',
|
||||||
|
\' "results": {',
|
||||||
|
\' "failed_checks": [',
|
||||||
|
\' {',
|
||||||
|
\' "check_id": "CKV_AWS_116",',
|
||||||
|
\' "bc_check_id": "BC_AWS_GENERAL_64",',
|
||||||
|
\' "check_name": "Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)",',
|
||||||
|
\' "check_result": {',
|
||||||
|
\' "result": "FAILED",',
|
||||||
|
\' "evaluated_keys": [',
|
||||||
|
\' "Properties/DeadLetterQueue/TargetArn"',
|
||||||
|
\' ]',
|
||||||
|
\' },',
|
||||||
|
\' "file_path": "/sample.template.yaml",',
|
||||||
|
\' "repo_file_path": "/sample.template.yaml",',
|
||||||
|
\' "file_line_range": [',
|
||||||
|
\' 57,',
|
||||||
|
\' 79',
|
||||||
|
\' ],',
|
||||||
|
\' "resource": "AWS::Serverless::Function.FunctionName",',
|
||||||
|
\' "evaluations": {},',
|
||||||
|
\' "check_class": "checkov.cloudformation.checks.resource.aws.LambdaDLQConfigured",',
|
||||||
|
\' "entity_tags": null,',
|
||||||
|
\' "resource_address": null,',
|
||||||
|
\' "guideline": "https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-aws-lambda-function-is-configured-for-a-dead-letter-queue-dlq"',
|
||||||
|
\' }',
|
||||||
|
\' ]',
|
||||||
|
\' }',
|
||||||
|
\'}'
|
||||||
|
\ ])
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
Before:
|
||||||
|
runtime ale_linters/fortran/fortitude.vim
|
||||||
|
|
||||||
|
After:
|
||||||
|
call ale#linter#Reset()
|
||||||
|
|
||||||
|
Execute(Simple fortitude handler run):
|
||||||
|
AssertEqual
|
||||||
|
\ [
|
||||||
|
\ {
|
||||||
|
\ 'lnum': 3,
|
||||||
|
\ 'end_lnum': 3,
|
||||||
|
\ 'col': 5,
|
||||||
|
\ 'end_col': 18,
|
||||||
|
\ 'text': '''implicit none'' missing ''external''',
|
||||||
|
\ 'type': 'W',
|
||||||
|
\ 'code': 'C003',
|
||||||
|
\ },
|
||||||
|
\ {
|
||||||
|
\ 'col': 13,
|
||||||
|
\ 'end_col': 14,
|
||||||
|
\ 'end_lnum': 7,
|
||||||
|
\ 'lnum': 7,
|
||||||
|
\ 'text': 'Syntax error',
|
||||||
|
\ 'type': 'E',
|
||||||
|
\ 'code': 'E001',
|
||||||
|
\ },
|
||||||
|
\ ],
|
||||||
|
\ ale_linters#fortran#fortitude#Handle(bufnr(''), [
|
||||||
|
\ '[',
|
||||||
|
\ json_encode({
|
||||||
|
\ 'code': 'C003',
|
||||||
|
\ 'end_location': {'column': 18, 'row': 3},
|
||||||
|
\ 'filename': '/home/user/documents/somefortranfile.f90',
|
||||||
|
\ 'fix': {
|
||||||
|
\ 'applicability': 'unsafe',
|
||||||
|
\ 'edits': [
|
||||||
|
\ {
|
||||||
|
\ 'content': ' (type, external)',
|
||||||
|
\ 'end_location': {'column': 18, 'row': 3},
|
||||||
|
\ 'location': {'column': 18, 'row': 3},
|
||||||
|
\ },
|
||||||
|
\ ],
|
||||||
|
\ 'message': 'Add `(external)` to ''implicit none''',
|
||||||
|
\ },
|
||||||
|
\ 'location': {'column': 5, 'row': 3},
|
||||||
|
\ 'message': '''implicit none'' missing ''external'''
|
||||||
|
\ }),
|
||||||
|
\ ',',
|
||||||
|
\ json_encode({
|
||||||
|
\ 'code': 'E001',
|
||||||
|
\ 'end_location': {'column': 14, 'row': 7},
|
||||||
|
\ 'filename': '/home/user/documents/somefortranfile.f90',
|
||||||
|
\ 'fix': v:null,
|
||||||
|
\ 'location': {'column': 13, 'row': 7},
|
||||||
|
\ 'message': 'Syntax error',
|
||||||
|
\ }),
|
||||||
|
\ ']',
|
||||||
|
\ ])
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
Before:
|
Before:
|
||||||
runtime ale_linters/shell/shellcheck.vim
|
Save g:ale_warn_about_trailing_whitespace
|
||||||
|
|
||||||
After:
|
After:
|
||||||
call ale#linter#Reset()
|
Restore
|
||||||
|
|
||||||
Execute(The shellcheck handler should handle basic errors or warnings <0.7.0):
|
Execute(The shellcheck handler should handle basic errors or warnings <0.7.0):
|
||||||
AssertEqual
|
AssertEqual
|
||||||
@@ -150,3 +150,58 @@ 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
|
||||||
|
\ }
|
||||||
|
\ ]
|
||||||
|
\ }',
|
||||||
|
\ ])
|
||||||
|
|||||||
@@ -8,12 +8,14 @@ Execute(The slang handler should parse lines correctly):
|
|||||||
AssertEqual
|
AssertEqual
|
||||||
\ [
|
\ [
|
||||||
\ {
|
\ {
|
||||||
|
\ 'filename' : 'foo.sv',
|
||||||
\ 'lnum': 11,
|
\ 'lnum': 11,
|
||||||
\ 'col': 1,
|
\ 'col': 1,
|
||||||
\ 'type': 'W',
|
\ 'type': 'W',
|
||||||
\ 'text': 'extra '';'' has no effect [-Wempty-member]',
|
\ 'text': 'extra '';'' has no effect [-Wempty-member]',
|
||||||
\ },
|
\ },
|
||||||
\ {
|
\ {
|
||||||
|
\ 'filename' : 'bar.sv',
|
||||||
\ 'lnum': 24,
|
\ 'lnum': 24,
|
||||||
\ 'col': 12,
|
\ 'col': 12,
|
||||||
\ 'type': 'E',
|
\ 'type': 'E',
|
||||||
@@ -22,5 +24,5 @@ Execute(The slang handler should parse lines correctly):
|
|||||||
\ ],
|
\ ],
|
||||||
\ ale_linters#verilog#slang#Handle(bufnr(''), [
|
\ ale_linters#verilog#slang#Handle(bufnr(''), [
|
||||||
\ 'foo.sv:11:1: warning: extra '';'' has no effect [-Wempty-member]',
|
\ 'foo.sv:11:1: warning: extra '';'' has no effect [-Wempty-member]',
|
||||||
\ 'foo.sv:24:12: error: cannot mix continuous and procedural assignments to variable ''data_o''',
|
\ 'bar.sv:24:12: error: cannot mix continuous and procedural assignments to variable ''data_o''',
|
||||||
\ ])
|
\ ])
|
||||||
|
|||||||
@@ -24,3 +24,28 @@ Execute(The ansible_lint executable should be configurable):
|
|||||||
GivenCommandOutput ['v4.1.2']
|
GivenCommandOutput ['v4.1.2']
|
||||||
AssertLinter '~/.local/bin/ansible-lint',
|
AssertLinter '~/.local/bin/ansible-lint',
|
||||||
\ ale#Escape('~/.local/bin/ansible-lint') . ' --nocolor -p %t'
|
\ ale#Escape('~/.local/bin/ansible-lint') . ' --nocolor -p %t'
|
||||||
|
|
||||||
|
Execute(pipenv is detected when ansible_ansible_lint_auto_pipenv is set):
|
||||||
|
let g:ale_ansible_ansible_lint_auto_pipenv = 1
|
||||||
|
call ale#test#SetFilename('../test-files/ansible/pipenv/script.yml')
|
||||||
|
|
||||||
|
GivenCommandOutput ['v25.6.1']
|
||||||
|
AssertLinterCwd expand('%:p:h')
|
||||||
|
AssertLinter 'pipenv', ale#Escape('pipenv') . ' run ansible-lint --nocolor -f json -x yaml %s'
|
||||||
|
|
||||||
|
Execute(poetry is detected when ansible_ansible_lint_auto_poetry is set):
|
||||||
|
let g:ale_ansible_ansible_lint_auto_poetry = 1
|
||||||
|
call ale#test#SetFilename('../test-files/ansible/poetry/script.yml')
|
||||||
|
|
||||||
|
GivenCommandOutput ['v25.6.1']
|
||||||
|
AssertLinterCwd expand('%:p:h')
|
||||||
|
AssertLinter 'poetry', ale#Escape('poetry') . ' run ansible-lint --nocolor -f json -x yaml %s'
|
||||||
|
|
||||||
|
Execute(uv is detected when ansible_ansible_lint_auto_uv is set):
|
||||||
|
let g:ale_ansible_ansible_lint_auto_uv = 1
|
||||||
|
call ale#test#SetFilename('../test-files/ansible/uv/script.yml')
|
||||||
|
|
||||||
|
GivenCommandOutput ['v25.6.1']
|
||||||
|
AssertLinterCwd expand('%:p:h')
|
||||||
|
AssertLinter 'uv', ale#Escape('uv') . ' run ansible-lint --nocolor -f json -x yaml %s'
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
Before:
|
||||||
|
call ale#assert#SetUpLinterTest('cloudformation', 'checkov')
|
||||||
|
|
||||||
|
After:
|
||||||
|
call ale#assert#TearDownLinterTest()
|
||||||
|
|
||||||
|
Execute(The default command should be direct):
|
||||||
|
AssertLinter 'checkov',
|
||||||
|
\ ale#Escape('checkov') . ' -f %t -o json --quiet --framework cloudformation '
|
||||||
|
|
||||||
|
Execute(It should be possible to override the default command):
|
||||||
|
let b:ale_cloudformation_checkov_executable = '/bin/other/checkov'
|
||||||
|
AssertLinter '/bin/other/checkov',
|
||||||
|
\ ale#Escape('/bin/other/checkov') . ' -f %t -o json --quiet --framework cloudformation '
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
Before:
|
||||||
|
call ale#assert#SetUpLinterTest('fortran', 'fortitude')
|
||||||
|
|
||||||
|
After:
|
||||||
|
call ale#assert#TearDownLinterTest()
|
||||||
|
|
||||||
|
Execute(The default fortitude command should be correct):
|
||||||
|
AssertLinter 'fortitude', ale#Escape('fortitude')
|
||||||
|
\ . ' check --output-format json %s'
|
||||||
|
|
||||||
|
Execute(fortitude should be configurable):
|
||||||
|
let b:ale_fortran_fortitude_executable = 'custom-exe'
|
||||||
|
let b:ale_fortran_fortitude_options = '--foobar'
|
||||||
|
|
||||||
|
AssertLinter 'custom-exe', ale#Escape('custom-exe')
|
||||||
|
\ . ' check --output-format json --foobar %s'
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
Before:
|
||||||
|
call ale#assert#SetUpLinterTest('jinja', 'j2lint')
|
||||||
|
|
||||||
|
After:
|
||||||
|
call ale#assert#TearDownLinterTest()
|
||||||
|
|
||||||
|
Execute(The j2lint executable should be configurable):
|
||||||
|
let g:ale_jinja_j2lint_executable = '~/.local/bin/j2lint'
|
||||||
|
|
||||||
|
AssertLinter '~/.local/bin/j2lint',
|
||||||
|
\ ale#Escape('~/.local/bin/j2lint'). ' %t'
|
||||||
|
|
||||||
|
Execute(Setting executable to 'pipenv' appends 'run j2lint'):
|
||||||
|
let g:ale_jinja_j2lint_executable = 'path/to/pipenv'
|
||||||
|
|
||||||
|
AssertLinter 'path/to/pipenv',
|
||||||
|
\ ale#Escape('path/to/pipenv') . ' run j2lint %t'
|
||||||
|
|
||||||
|
Execute(Pipenv is detected when jinja_j2lint_auto_pipenv is set):
|
||||||
|
let g:ale_jinja_j2lint_auto_pipenv = 1
|
||||||
|
call ale#test#SetFilename('../test-files/python/pipenv/whatever.py')
|
||||||
|
|
||||||
|
AssertLinter 'pipenv',
|
||||||
|
\ ale#Escape('pipenv') . ' run j2lint %t'
|
||||||
|
|
||||||
|
Execute(Setting executable to 'poetry' appends 'run j2lint'):
|
||||||
|
let g:ale_jinja_j2lint_executable = 'path/to/poetry'
|
||||||
|
|
||||||
|
AssertLinter 'path/to/poetry',
|
||||||
|
\ ale#Escape('path/to/poetry') . ' run j2lint %t'
|
||||||
|
|
||||||
|
Execute(Poetry is detected when jinja_j2lint_auto_poetry is set):
|
||||||
|
let g:ale_jinja_j2lint_auto_poetry = 1
|
||||||
|
call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
|
||||||
|
|
||||||
|
AssertLinter 'poetry',
|
||||||
|
\ ale#Escape('poetry') . ' run j2lint %t'
|
||||||
|
|
||||||
|
Execute(uv is detected when jinja_j2lint_auto_uv is set):
|
||||||
|
let g:ale_jinja_j2lint_auto_uv = 1
|
||||||
|
call ale#test#SetFilename('../test-files/python/uv/whatever.py')
|
||||||
|
|
||||||
|
AssertLinter 'uv',
|
||||||
|
\ ale#Escape('uv') . ' run j2lint %t'
|
||||||
@@ -12,3 +12,5 @@ Execute(Overriding the executable and command should work):
|
|||||||
let b:ale_perl_perl_options = '-w'
|
let b:ale_perl_perl_options = '-w'
|
||||||
|
|
||||||
AssertLinter 'foobar', ale#Escape('foobar') . ' -w %t'
|
AssertLinter 'foobar', ale#Escape('foobar') . ' -w %t'
|
||||||
|
unlet b:ale_perl_perl_executable
|
||||||
|
unlet b:ale_perl_perl_options
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
" Author: rymdbar <https://rymdbar.x20.se/>
|
||||||
|
|
||||||
|
Before:
|
||||||
|
call ale#assert#SetUpLinterTest('perl', 'languageserver')
|
||||||
|
|
||||||
|
After:
|
||||||
|
call ale#assert#TearDownLinterTest()
|
||||||
|
|
||||||
|
Execute(The default Perl command callback should be correct):
|
||||||
|
AssertLinter 'perl',
|
||||||
|
\ ale#Escape('perl') . ' -MPerl::LanguageServer -ePerl::LanguageServer::run'
|
||||||
|
|
||||||
|
Execute(Overriding the executable should work):
|
||||||
|
let b:ale_perl_perl_executable = 'plls'
|
||||||
|
|
||||||
|
AssertLinter 'plls', ale#Escape('plls') .
|
||||||
|
\ ' -MPerl::LanguageServer -ePerl::LanguageServer::run'
|
||||||
|
unlet b:ale_perl_perl_executable
|
||||||
|
|
||||||
|
Execute(The project root should be detected correctly in from build files):
|
||||||
|
for mod in ['extutils-makemaker', 'module-build', 'dist-zilla']
|
||||||
|
call ale#test#SetFilename('../test-files/perl/' . mod . '/subdir/empty.pl')
|
||||||
|
|
||||||
|
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/perl/' . mod)
|
||||||
|
endfor
|
||||||
|
|
||||||
|
Execute(The project root should be globally configurable):
|
||||||
|
for mod in ['extutils-makemaker', 'module-build', 'dist-zilla']
|
||||||
|
call ale#test#SetFilename('../test-files/perl/'. mod . '/subdir/empty.pl')
|
||||||
|
" Configuring g:ale_root using a Dictionary works.
|
||||||
|
let g:ale_root.languageserver =
|
||||||
|
\ ale#path#Simplify(g:dir . '/../test-files/perl')
|
||||||
|
|
||||||
|
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/perl')
|
||||||
|
unlet g:ale_root.languageserver
|
||||||
|
" As tracked by <https://github.com/dense-analysis/ale/issues/5002>, there
|
||||||
|
" is a bug with g:ale_root.
|
||||||
|
" While attempting to configure g:ale_root using a String might be a quite
|
||||||
|
" limiting setup, it would be handy for debugging. However the test case is
|
||||||
|
" missing here. It would unfortunately just fail.
|
||||||
|
endfor
|
||||||
|
|
||||||
|
Execute(The project root should be per buffer configurable):
|
||||||
|
for mod in ['extutils-makemaker', 'module-build', 'dist-zilla']
|
||||||
|
call ale#test#SetFilename('../test-files/perl/'. mod . '/subdir/empty.pl')
|
||||||
|
" Configuring b:ale_root using a String works.
|
||||||
|
let b:ale_root = ale#path#Simplify(g:dir . '/../test-files/perl')
|
||||||
|
|
||||||
|
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/perl')
|
||||||
|
unlet b:ale_root
|
||||||
|
|
||||||
|
" Configuring b:ale_root using a Dictionary works.
|
||||||
|
let b:ale_root = {
|
||||||
|
\ 'languageserver': ale#path#Simplify(g:dir . '/../test-files/perl')
|
||||||
|
\ }
|
||||||
|
|
||||||
|
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/perl')
|
||||||
|
unlet b:ale_root.languageserver
|
||||||
|
endfor
|
||||||
|
|
||||||
|
Execute(The LSP values should be set correctly):
|
||||||
|
|
||||||
|
AssertLSPLanguage 'perl'
|
||||||
|
|
||||||
|
AssertLSPOptions {}
|
||||||
|
|
||||||
|
AssertLSPConfig {'perl': {'enable': 1}}
|
||||||
|
|
||||||
|
Execute(Should accept configuration settings):
|
||||||
|
let b:ale_perl_languageserver_config = {
|
||||||
|
\ 'perl': {
|
||||||
|
\ 'perlInc': ['/usr/share/perl5/', '/usr/local/share/perl5/' ],
|
||||||
|
\ 'fileFilter': [''],
|
||||||
|
\ },
|
||||||
|
\ }
|
||||||
|
|
||||||
|
AssertLSPConfig {
|
||||||
|
\ 'perl': {
|
||||||
|
\ 'perlInc': ['/usr/share/perl5/', '/usr/local/share/perl5/' ],
|
||||||
|
\ 'fileFilter': [''],
|
||||||
|
\ },
|
||||||
|
\ }
|
||||||
@@ -8,6 +8,12 @@ Execute(The default executable path should be correct):
|
|||||||
AssertLinter 'phpactor',
|
AssertLinter 'phpactor',
|
||||||
\ ale#Escape('phpactor') . ' language-server'
|
\ ale#Escape('phpactor') . ' language-server'
|
||||||
|
|
||||||
|
Execute(Overriding the executable should work):
|
||||||
|
let b:ale_php_phpactor_executable = 'my_phpactor'
|
||||||
|
|
||||||
|
AssertLinter 'my_phpactor', ale#Escape('my_phpactor') . ' language-server'
|
||||||
|
unlet b:ale_php_phpactor_executable
|
||||||
|
|
||||||
Execute(The project path should be correct for .git directories):
|
Execute(The project path should be correct for .git directories):
|
||||||
call ale#test#SetFilename('../test-files/php/with-git/test.php')
|
call ale#test#SetFilename('../test-files/php/with-git/test.php')
|
||||||
silent! call mkdir('../test-files/php/with-git/.git')
|
silent! call mkdir('../test-files/php/with-git/.git')
|
||||||
@@ -18,3 +24,20 @@ Execute(The project path should be correct for composer.json file):
|
|||||||
call ale#test#SetFilename('../test-files/php/with-composer/test.php')
|
call ale#test#SetFilename('../test-files/php/with-composer/test.php')
|
||||||
|
|
||||||
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-composer')
|
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-composer')
|
||||||
|
|
||||||
|
Execute(The LSP values should be set correctly):
|
||||||
|
|
||||||
|
AssertLSPLanguage 'php'
|
||||||
|
|
||||||
|
AssertLSPOptions {}
|
||||||
|
|
||||||
|
AssertLSPConfig {}
|
||||||
|
|
||||||
|
Execute(Should accept initialization options):
|
||||||
|
let b:ale_php_phpactor_init_options = {
|
||||||
|
\ 'language_server_phpstan.enabled': v:false,
|
||||||
|
\ }
|
||||||
|
|
||||||
|
AssertLSPOptions {
|
||||||
|
\ 'language_server_phpstan.enabled': v:false,
|
||||||
|
\ }
|
||||||
|
|||||||
@@ -59,6 +59,13 @@ Execute(project with level set to 3):
|
|||||||
AssertLinter 'phpstan',
|
AssertLinter 'phpstan',
|
||||||
\ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -l ' . ale#Escape('3') . ' %s'
|
\ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -l ' . ale#Escape('3') . ' %s'
|
||||||
|
|
||||||
|
Execute(project with level set to 0):
|
||||||
|
call ale#test#SetFilename('phpstan-test-files/foo/test.php')
|
||||||
|
let g:ale_php_phpstan_level = 0
|
||||||
|
|
||||||
|
AssertLinter 'phpstan',
|
||||||
|
\ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -l ' . ale#Escape('0') . ' %s'
|
||||||
|
|
||||||
Execute(Custom phpstan configuration file):
|
Execute(Custom phpstan configuration file):
|
||||||
let g:ale_php_phpstan_configuration = 'phpstan_config'
|
let g:ale_php_phpstan_configuration = 'phpstan_config'
|
||||||
|
|
||||||
@@ -95,6 +102,17 @@ Execute(Configuration dist file exists in current directory):
|
|||||||
\ ]
|
\ ]
|
||||||
AssertLinterCwd g:dir
|
AssertLinterCwd g:dir
|
||||||
|
|
||||||
|
Execute(Configuration alternative dist file exists in current directory):
|
||||||
|
call writefile(['parameters:', ' level: 7'], './phpstan.dist.neon')
|
||||||
|
let g:ale_php_phpstan_level = ''
|
||||||
|
let g:ale_php_phpstan_configuration = ''
|
||||||
|
|
||||||
|
AssertLinter 'phpstan', [
|
||||||
|
\ ale#Escape('phpstan') . ' --version',
|
||||||
|
\ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json %s'
|
||||||
|
\ ]
|
||||||
|
AssertLinterCwd g:dir
|
||||||
|
|
||||||
Execute(Configuration file exists in current directory, but force phpstan level):
|
Execute(Configuration file exists in current directory, but force phpstan level):
|
||||||
call writefile(['parameters:', ' level: 7'], './phpstan.neon')
|
call writefile(['parameters:', ' level: 7'], './phpstan.neon')
|
||||||
let g:ale_php_phpstan_configuration = ''
|
let g:ale_php_phpstan_configuration = ''
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
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'
|
||||||
@@ -5,10 +5,10 @@ After:
|
|||||||
call ale#assert#TearDownLinterTest()
|
call ale#assert#TearDownLinterTest()
|
||||||
|
|
||||||
Execute(The default slang command should be correct):
|
Execute(The default slang command should be correct):
|
||||||
AssertLinter 'slang', 'slang -Weverything -I%s:h %t'
|
AssertLinter 'slang', 'slang -Weverything --diag-abs-paths -I%s:h -y%s:h %t'
|
||||||
|
|
||||||
Execute(slang options should be configurable):
|
Execute(slang options should be configurable):
|
||||||
" Additional args for the linter
|
" Additional args for the linter
|
||||||
let g:ale_verilog_slang_options = '--define-macro DWIDTH=12'
|
let g:ale_verilog_slang_options = '--define-macro DWIDTH=12'
|
||||||
|
|
||||||
AssertLinter 'slang', 'slang -Weverything -I%s:h --define-macro DWIDTH=12 %t'
|
AssertLinter 'slang', 'slang -Weverything --diag-abs-paths -I%s:h -y%s:h --define-macro DWIDTH=12 %t'
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ Before:
|
|||||||
let g:ale_ruby_sorbet_executable = 'srb'
|
let g:ale_ruby_sorbet_executable = 'srb'
|
||||||
let g:ale_ruby_sorbet_options = ''
|
let g:ale_ruby_sorbet_options = ''
|
||||||
let g:ale_ruby_sorbet_enable_watchman = 0
|
let g:ale_ruby_sorbet_enable_watchman = 0
|
||||||
|
let g:ale_ruby_sorbet_initialization_options = { 'highlightUntyped': v:false }
|
||||||
|
|
||||||
After:
|
After:
|
||||||
call ale#assert#TearDownLinterTest()
|
call ale#assert#TearDownLinterTest()
|
||||||
@@ -32,3 +33,11 @@ Execute(Setting bundle appends 'exec srb tc'):
|
|||||||
AssertLinter 'path to/bundle', ale#Escape('path to/bundle')
|
AssertLinter 'path to/bundle', ale#Escape('path to/bundle')
|
||||||
\ . ' exec srb'
|
\ . ' exec srb'
|
||||||
\ . ' tc --lsp --disable-watchman'
|
\ . ' 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}
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
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')
|
||||||
@@ -5,10 +5,10 @@ After:
|
|||||||
call ale#assert#TearDownLinterTest()
|
call ale#assert#TearDownLinterTest()
|
||||||
|
|
||||||
Execute(The default verilator command should be correct):
|
Execute(The default verilator command should be correct):
|
||||||
AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h %t'
|
AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h -y %s:h %t'
|
||||||
|
|
||||||
Execute(verilator options should be configurable):
|
Execute(verilator options should be configurable):
|
||||||
" Additional args for the linter
|
" Additional args for the linter
|
||||||
let g:ale_verilog_verilator_options = '-sv --default-language "1800-2012"'
|
let g:ale_verilog_verilator_options = '-sv --default-language "1800-2012"'
|
||||||
|
|
||||||
AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h -sv --default-language "1800-2012" %t'
|
AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h -y %s:h -sv --default-language "1800-2012" %t'
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
Before:
|
||||||
|
call ale#assert#SetUpLinterTest('verilog', 'verible_ls')
|
||||||
|
|
||||||
|
After:
|
||||||
|
call ale#assert#TearDownLinterTest()
|
||||||
|
|
||||||
|
Execute(The default executable path and arguments should be correct):
|
||||||
|
AssertLinter 'verible-verilog-ls', ale#Escape('verible-verilog-ls') . ' --rules_config_search'
|
||||||
|
|
||||||
|
Execute(The project root should be detected correctly in empty directory):
|
||||||
|
AssertLSPProject '.'
|
||||||
|
|
||||||
|
Execute(The project root should be detected correctly with verible.filelist):
|
||||||
|
call ale#test#SetFilename('../test-files/verilog/verible/module.sv')
|
||||||
|
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/verilog/verible')
|
||||||
|
|
||||||
|
Execute(The LSP values should be set correctly):
|
||||||
|
call ale#test#SetFilename('../test-files/verilog/verible/module.sv')
|
||||||
|
|
||||||
|
AssertLSPLanguage 'verilog'
|
||||||
|
AssertLSPOptions {}
|
||||||
|
AssertLSPConfig {}
|
||||||
|
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/verilog/verible')
|
||||||
|
|
||||||
|
|
||||||
|
Execute(The verible LSP callback should allow custom options):
|
||||||
|
let g:ale_verilog_verible_ls_options = '--foo --bar'
|
||||||
|
AssertLinter 'verible-verilog-ls', ale#Escape('verible-verilog-ls') . ' --foo --bar'
|
||||||
|
|
||||||
|
|
||||||
|
Execute(The verible LSP callback should allow custom rules):
|
||||||
|
let g:ale_verilog_verible_ls_rules = '+foo,-bar'
|
||||||
|
AssertLinter 'verible-verilog-ls', ale#Escape('verible-verilog-ls') . ' --rules_config_search --rules=+foo,-bar'
|
||||||
@@ -109,11 +109,11 @@ Execute(ale#lsp#response#ReadDiagnostics() should include sources in detail):
|
|||||||
\ }
|
\ }
|
||||||
\ ])
|
\ ])
|
||||||
|
|
||||||
Execute(ale#lsp#response#ReadDiagnostics() should keep detail with line breaks but replace with spaces in text):
|
Execute(ale#lsp#response#ReadDiagnostics() should keep line breaks in text):
|
||||||
AssertEqual [
|
AssertEqual [
|
||||||
\ {
|
\ {
|
||||||
\ 'type': 'E',
|
\ 'type': 'E',
|
||||||
\ 'text': 'cannot borrow `cap` as mutable more than once at a time mutable borrow starts here in previous iteration of loop',
|
\ 'text': "cannot borrow `cap` as mutable\r\nmore than once at a time\n\nmutable borrow starts here\rin 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",
|
\ '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,
|
\ 'lnum': 10,
|
||||||
\ 'col': 15,
|
\ 'col': 15,
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
# https://metacpan.org/pod/Dist::Zilla
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# https://perldoc.perl.org/ExtUtils::MakeMaker
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# https://metacpan.org/pod/Module::Build
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user