mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
codespell: fix spelling errors picked out by codespell (#4343)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
" Author: kmarc <korondi.mark@gmail.com>
|
" Author: kmarc <korondi.mark@gmail.com>
|
||||||
" Description: This file adds support for using GNU awk with sripts.
|
" Description: This file adds support for using GNU awk with scripts.
|
||||||
|
|
||||||
call ale#Set('awk_gawk_executable', 'gawk')
|
call ale#Set('awk_gawk_executable', 'gawk')
|
||||||
call ale#Set('awk_gawk_options', '')
|
call ale#Set('awk_gawk_options', '')
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ function! ale_linters#cpp#clangtidy#GetCommand(buffer, output) abort
|
|||||||
|
|
||||||
" Tell clang-tidy a .h header with a C++ filetype in Vim is a C++ file
|
" Tell clang-tidy a .h header with a C++ filetype in Vim is a C++ file
|
||||||
" only when compile-commands.json file is not there. Adding these
|
" only when compile-commands.json file is not there. Adding these
|
||||||
" flags makes clang-tidy completely ignore compile commmands.
|
" flags makes clang-tidy completely ignore compile commands.
|
||||||
if expand('#' . a:buffer) =~# '\.h$'
|
if expand('#' . a:buffer) =~# '\.h$'
|
||||||
let l:options .= !empty(l:options) ? ' -x c++' : '-x c++'
|
let l:options .= !empty(l:options) ? ' -x c++' : '-x c++'
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function! ale_linters#matlab#mlint#Handle(buffer, lines) abort
|
|||||||
let l:code = l:match[3]
|
let l:code = l:match[3]
|
||||||
let l:text = l:match[4]
|
let l:text = l:match[4]
|
||||||
|
|
||||||
" Suppress erroneous waring about filename
|
" Suppress erroneous warning about filename
|
||||||
" TODO: Enable this error when copying filename is supported
|
" TODO: Enable this error when copying filename is supported
|
||||||
if l:code is# 'FNDEF'
|
if l:code is# 'FNDEF'
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ function! ale_linters#powershell#psscriptanalyzer#GetExecutable(buffer) abort
|
|||||||
return ale#Var(a:buffer, 'powershell_psscriptanalyzer_executable')
|
return ale#Var(a:buffer, 'powershell_psscriptanalyzer_executable')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Run Invoke-ScriptAnalyzer and output each linting message as 4 seperate lines
|
" Run Invoke-ScriptAnalyzer and output each linting message as 4 separate lines
|
||||||
" for each parsing
|
" for each parsing
|
||||||
function! ale_linters#powershell#psscriptanalyzer#GetCommand(buffer) abort
|
function! ale_linters#powershell#psscriptanalyzer#GetCommand(buffer) abort
|
||||||
let l:exclude_option = ale#Var(
|
let l:exclude_option = ale#Var(
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ function! ale_linters#tex#lacheck#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)
|
||||||
" lacheck follows `\input{}` commands. If the cwd is not the same as the
|
" lacheck follows `\input{}` commands. If the cwd is not the same as the
|
||||||
" file in the buffer then it will fail to find the inputed items. We do not
|
" file in the buffer then it will fail to find the inputted items. We do not
|
||||||
" want warnings from those items anyway
|
" want warnings from those items anyway
|
||||||
if !empty(matchstr(l:match[3], '^Could not open ".\+"$'))
|
if !empty(matchstr(l:match[3], '^Could not open ".\+"$'))
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ function! s:UpdateCursor(cursor, start, end, offset) abort
|
|||||||
" to the end of the changes
|
" to the end of the changes
|
||||||
let l:cur_line = l:end_line + l:line_offset
|
let l:cur_line = l:end_line + l:line_offset
|
||||||
let l:cur_column = l:end_column + l:column_offset
|
let l:cur_column = l:end_column + l:column_offset
|
||||||
" else is not necesary, it means modifications are happening
|
" else is not necessary, it means modifications are happening
|
||||||
" after the cursor so no cursor updates need to be done
|
" after the cursor so no cursor updates need to be done
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ function! ale#handlers#hdl_checker#IsDotGit(path) abort
|
|||||||
return ! empty(a:path) && isdirectory(a:path)
|
return ! empty(a:path) && isdirectory(a:path)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Sould return (in order of preference)
|
" Should return (in order of preference)
|
||||||
" 1. Nearest config file
|
" 1. Nearest config file
|
||||||
" 2. Nearest .git directory
|
" 2. Nearest .git directory
|
||||||
" 3. The current path
|
" 3. The current path
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
" Author: Horacio Sanson https://github.com/hsanson
|
" Author: Horacio Sanson https://github.com/hsanson
|
||||||
" Description: Functions for integrating with Java tools
|
" Description: Functions for integrating with Java tools
|
||||||
|
|
||||||
" Find the nearest dir contining a gradle or pom file and asume it
|
" Find the nearest dir contining a gradle or pom file and assume it
|
||||||
" the root of a java app.
|
" the root of a java app.
|
||||||
function! ale#java#FindProjectRoot(buffer) abort
|
function! ale#java#FindProjectRoot(buffer) abort
|
||||||
let l:gradle_root = ale#gradle#FindProjectRoot(a:buffer)
|
let l:gradle_root = ale#gradle#FindProjectRoot(a:buffer)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ if !exists('s:timer_args')
|
|||||||
let s:timer_args = {}
|
let s:timer_args = {}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Return 1 if there is a buffer with buftype == 'quickfix' in bufffer list
|
" Return 1 if there is a buffer with buftype == 'quickfix' in buffer list
|
||||||
function! ale#list#IsQuickfixOpen() abort
|
function! ale#list#IsQuickfixOpen() abort
|
||||||
let l:res = getqflist({ 'winid' : winnr() })
|
let l:res = getqflist({ 'winid' : winnr() })
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ function! s:RestoreViewIfNeeded(buffer) abort
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Check wether the cursor has moved since linting was actually requested. If
|
" Check whether the cursor has moved since linting was actually requested. If
|
||||||
" the user has indeed moved lines, do nothing
|
" the user has indeed moved lines, do nothing
|
||||||
let l:current_view = winsaveview()
|
let l:current_view = winsaveview()
|
||||||
|
|
||||||
|
|||||||
@@ -434,7 +434,7 @@ function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort
|
|||||||
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,
|
||||||
" unless we are using tsserver, which doesn't use project roots.
|
" unless we are using tsserver, which doesn't use project roots.
|
||||||
call ale#lsp_linter#AddErrorMessage(a:linter.name, "Failed to find project root, language server wont't start.")
|
call ale#lsp_linter#AddErrorMessage(a:linter.name, "Failed to find project root, language server won't start.")
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ g:ale_java_javalsp_config *g:ale_java_javalsp_config*
|
|||||||
Type: |Dictionary|
|
Type: |Dictionary|
|
||||||
Default: `{}`
|
Default: `{}`
|
||||||
|
|
||||||
The javalsp linter automatically detects external depenencies for Maven and
|
The javalsp linter automatically detects external dependencies for Maven and
|
||||||
Gradle projects. In case the javalsp fails to detect some of them, you can
|
Gradle projects. In case the javalsp fails to detect some of them, you can
|
||||||
specify them setting a dictionary to |g:ale_java_javalsp_config| variable.
|
specify them setting a dictionary to |g:ale_java_javalsp_config| variable.
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -979,7 +979,7 @@ g:ale_python_pylsp_options *g:ale_python_pylsp_options
|
|||||||
let g:ale_python_pylsp_executable = 'python3'
|
let g:ale_python_pylsp_executable = 'python3'
|
||||||
let g:ale_python_pylsp_options = '-m pylsp'
|
let g:ale_python_pylsp_options = '-m pylsp'
|
||||||
|
|
||||||
An example stragety for installing `pylsp`:
|
An example strategy for installing `pylsp`:
|
||||||
`python3 -m pip install --user pylsp`
|
`python3 -m pip install --user pylsp`
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ g:ale_deno_lsp_project_root *g:ale_deno_lsp_project_root*
|
|||||||
executing the following steps in the given order:
|
executing the following steps in the given order:
|
||||||
|
|
||||||
1. Find an ancestor directory containing a tsconfig.json.
|
1. Find an ancestor directory containing a tsconfig.json.
|
||||||
2. Find an ancestory directory containing a .git folder.
|
2. Find an ancestor directory containing a .git folder.
|
||||||
3. Use the directory of the current buffer (if the buffer was opened from
|
3. Use the directory of the current buffer (if the buffer was opened from
|
||||||
a file).
|
a file).
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ g:ale_verilog_yosys_options *g:ale_verilog_yosys_options*
|
|||||||
Default: `'-Q -T -p ''read_verilog %s'''`
|
Default: `'-Q -T -p ''read_verilog %s'''`
|
||||||
|
|
||||||
This variable can be changed to modify the flags/options passed to 'yosys'.
|
This variable can be changed to modify the flags/options passed to 'yosys'.
|
||||||
By default, Yosys is an interative program. To obtain linting functionality,
|
By default, Yosys is an interactive program. To obtain linting functionality,
|
||||||
the `'read_verilog'` command is used.
|
the `'read_verilog'` command is used.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4558,7 +4558,7 @@ ALEFixPost *ALEFixPost-autocmd*
|
|||||||
These |User| autocommands are triggered before and after every lint or fix
|
These |User| autocommands are triggered before and after every lint or fix
|
||||||
cycle. They can be used to update statuslines, send notifications, etc.
|
cycle. They can be used to update statuslines, send notifications, etc.
|
||||||
The autocmd commands are run with |:silent|, so |:unsilent| is required for
|
The autocmd commands are run with |:silent|, so |:unsilent| is required for
|
||||||
echoing messges.
|
echoing messages.
|
||||||
|
|
||||||
For example to change the color of the statusline while the linter is
|
For example to change the color of the statusline while the linter is
|
||||||
running:
|
running:
|
||||||
@@ -4591,7 +4591,7 @@ ALEJobStarted *ALEJobStarted-autocmd*
|
|||||||
ALELSPStarted *ALELSPStarted-autocmd*
|
ALELSPStarted *ALELSPStarted-autocmd*
|
||||||
*ALELSPStarted*
|
*ALELSPStarted*
|
||||||
|
|
||||||
This |User| autocommand is trigged immediately after an LSP connection is
|
This |User| autocommand is triggered immediately after an LSP connection is
|
||||||
successfully initialized. This provides a way to perform any additional
|
successfully initialized. This provides a way to perform any additional
|
||||||
initialization work, such as setting up buffer-level mappings.
|
initialization work, such as setting up buffer-level mappings.
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ Before:
|
|||||||
return [{'lnum': 1, 'col': 1, 'text': 'xxx'}]
|
return [{'lnum': 1, 'col': 1, 'text': 'xxx'}]
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" echo will output a single blank line, and we should ingore it.
|
" echo will output a single blank line, and we should ignore it.
|
||||||
function! IgnoredEmptyOutput(buffer, output)
|
function! IgnoredEmptyOutput(buffer, output)
|
||||||
return {'command': has('win32') ? 'echo(' : 'echo'}
|
return {'command': has('win32') ? 'echo(' : 'echo'}
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ Execute(The ansible-lint handler for version group <5 should handle basic errors
|
|||||||
\ fnamemodify(tempname(), ':h') . '/test_playbook.yml:35: [EANSIBLE0002] Trailing whitespace',
|
\ fnamemodify(tempname(), ':h') . '/test_playbook.yml:35: [EANSIBLE0002] Trailing whitespace',
|
||||||
\ ])
|
\ ])
|
||||||
|
|
||||||
Execute(The ansible-lint handler for version group <5 should supress trailing whitespace output when the option is used):
|
Execute(The ansible-lint handler for version group <5 should suppress trailing whitespace output when the option is used):
|
||||||
let b:ale_warn_about_trailing_whitespace = 0
|
let b:ale_warn_about_trailing_whitespace = 0
|
||||||
|
|
||||||
AssertEqual
|
AssertEqual
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Execute(The atools handler should handle basic errors or warings):
|
|||||||
\ ])
|
\ ])
|
||||||
|
|
||||||
" Regardless of the severity, if the certainty is [P]ossible and not [C]ertain
|
" Regardless of the severity, if the certainty is [P]ossible and not [C]ertain
|
||||||
" or if regardless of the Certainity the Severity is not [I]mportant or [S]erious
|
" or if regardless of the Certainty the Severity is not [I]mportant or [S]erious
|
||||||
" then it must be a [W]arning
|
" then it must be a [W]arning
|
||||||
Execute(If we are not Certain or Importantly Serious, be a Warning):
|
Execute(If we are not Certain or Importantly Serious, be a Warning):
|
||||||
AssertEqual
|
AssertEqual
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ Execute(Parsing checkmake errors should work):
|
|||||||
\ }
|
\ }
|
||||||
\ ],
|
\ ],
|
||||||
\ ale_linters#make#checkmake#Handle(42, [
|
\ ale_linters#make#checkmake#Handle(42, [
|
||||||
\ 'This shouldnt match',
|
\ "This shouldn't match",
|
||||||
\ '1:woops:an error has occurred',
|
\ '1:woops:an error has occurred',
|
||||||
\ ])
|
\ ])
|
||||||
|
|||||||
@@ -7,16 +7,16 @@ Execute(The ghc handler should handle hdevtools output):
|
|||||||
\ 'lnum': 147,
|
\ 'lnum': 147,
|
||||||
\ 'type': 'W',
|
\ 'type': 'W',
|
||||||
\ 'col': 62,
|
\ 'col': 62,
|
||||||
\ 'text': '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’ Expected type: [T.Text]',
|
\ 'text': "• Couldn't match type ‘a -> T.Text’ with ‘T.Text’ Expected type: [T.Text]",
|
||||||
\ 'detail': join([
|
\ 'detail': join([
|
||||||
\ '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’',
|
\ "• Couldn't match type ‘a -> T.Text’ with ‘T.Text’",
|
||||||
\ ' Expected type: [T.Text]',
|
\ ' Expected type: [T.Text]',
|
||||||
\ ], "\n"),
|
\ ], "\n"),
|
||||||
\ },
|
\ },
|
||||||
\ ],
|
\ ],
|
||||||
\ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
|
\ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
|
||||||
\ 'foo.hs:147:62: warning:',
|
\ 'foo.hs:147:62: warning:',
|
||||||
\ '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’',
|
\ "• Couldn't match type ‘a -> T.Text’ with ‘T.Text’",
|
||||||
\ ' Expected type: [T.Text]',
|
\ ' Expected type: [T.Text]',
|
||||||
\ ])
|
\ ])
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ Execute(The openscad handler should handle sca2d output):
|
|||||||
\ ' - * HASH',
|
\ ' - * HASH',
|
||||||
\ ' - * INTERSECTION_FOR',
|
\ ' - * INTERSECTION_FOR',
|
||||||
\ ' - ',
|
\ ' - ',
|
||||||
\ 'If you belive this is a bug in SCA2D please report it to us.',
|
\ 'If you believe this is a bug in SCA2D please report it to us.',
|
||||||
\ '',
|
\ '',
|
||||||
\ '',
|
\ '',
|
||||||
\ 'SCA2D message summary',
|
\ 'SCA2D message summary',
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Before:
|
|||||||
After:
|
After:
|
||||||
call ale#linter#Reset()
|
call ale#linter#Reset()
|
||||||
|
|
||||||
Execute(The tfsec handler should handle empty outout):
|
Execute(The tfsec handler should handle empty output):
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [],
|
\ [],
|
||||||
\ ale_linters#terraform#tfsec#Handle(bufnr(''), ['{"results": null}'])
|
\ ale_linters#terraform#tfsec#Handle(bufnr(''), ['{"results": null}'])
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ Execute(The tslint handler should not report no-implicit-dependencies errors):
|
|||||||
\ }])])
|
\ }])])
|
||||||
|
|
||||||
Execute(The tslint handler should set filename keys for temporary files):
|
Execute(The tslint handler should set filename keys for temporary files):
|
||||||
" The temporay filename below is hacked into being a relative path so we can
|
" The temporary filename below is hacked into being a relative path so we can
|
||||||
" test that we resolve the temporary filename first.
|
" test that we resolve the temporary filename first.
|
||||||
let b:relative_to_root = substitute(expand('%:p'), '\v[^/\\]*([/\\])[^/\\]*', '../', 'g')
|
let b:relative_to_root = substitute(expand('%:p'), '\v[^/\\]*([/\\])[^/\\]*', '../', 'g')
|
||||||
let b:tempname_suffix = substitute(tempname(), '^\v([A-Z]:)?[/\\]', '', '')
|
let b:tempname_suffix = substitute(tempname(), '^\v([A-Z]:)?[/\\]', '', '')
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Execute(Additional flawfinder options should be configurable):
|
|||||||
AssertLinter 'flawfinder',
|
AssertLinter 'flawfinder',
|
||||||
\ ale#Escape('flawfinder') . ' -CDQS --foobar --minlevel=1 %t'
|
\ ale#Escape('flawfinder') . ' -CDQS --foobar --minlevel=1 %t'
|
||||||
|
|
||||||
Execute(The flawfinder exectable should be configurable):
|
Execute(The flawfinder executable should be configurable):
|
||||||
let b:ale_c_flawfinder_executable = 'foo/bar'
|
let b:ale_c_flawfinder_executable = 'foo/bar'
|
||||||
|
|
||||||
AssertLinter 'foo/bar', ale#Escape('foo/bar') . ' -CDQS --minlevel=1 %t'
|
AssertLinter 'foo/bar', ale#Escape('foo/bar') . ' -CDQS --minlevel=1 %t'
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Execute(Additional flawfinder options should be configurable):
|
|||||||
AssertLinter 'flawfinder',
|
AssertLinter 'flawfinder',
|
||||||
\ ale#Escape('flawfinder') . ' -CDQS --foobar --minlevel=1 %t'
|
\ ale#Escape('flawfinder') . ' -CDQS --foobar --minlevel=1 %t'
|
||||||
|
|
||||||
Execute(The flawfinder exectable should be configurable):
|
Execute(The flawfinder executable should be configurable):
|
||||||
let b:ale_cpp_flawfinder_executable = 'foo/bar'
|
let b:ale_cpp_flawfinder_executable = 'foo/bar'
|
||||||
|
|
||||||
AssertLinter 'foo/bar', ale#Escape('foo/bar') . ' -CDQS --minlevel=1 %t'
|
AssertLinter 'foo/bar', ale#Escape('foo/bar') . ' -CDQS --minlevel=1 %t'
|
||||||
|
|||||||
@@ -13,13 +13,13 @@ Execute(The options should be be used in the command):
|
|||||||
|
|
||||||
AssertLinter 'csc', 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs')
|
AssertLinter 'csc', 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs')
|
||||||
|
|
||||||
Execute(The souce path should be be used in the command):
|
Execute(The source path should be be used in the command):
|
||||||
let g:ale_cs_csc_source = '../foo/bar'
|
let g:ale_cs_csc_source = '../foo/bar'
|
||||||
|
|
||||||
AssertLinterCwd '../foo/bar'
|
AssertLinterCwd '../foo/bar'
|
||||||
AssertLinter 'csc', 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs')
|
AssertLinter 'csc', 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs')
|
||||||
|
|
||||||
Execute(The list of search pathes for assemblies should be be used in the command if not empty):
|
Execute(The list of search paths for assemblies should be be used in the command if not empty):
|
||||||
let g:ale_cs_csc_assembly_path = ['/usr/lib/mono', '../foo/bar']
|
let g:ale_cs_csc_assembly_path = ['/usr/lib/mono', '../foo/bar']
|
||||||
|
|
||||||
AssertLinter 'csc', 'csc /unsafe'
|
AssertLinter 'csc', 'csc /unsafe'
|
||||||
|
|||||||
@@ -13,13 +13,13 @@ Execute(The options should be be used in the command):
|
|||||||
|
|
||||||
AssertLinter 'mcs', 'mcs -unsafe -pkg:dotnet -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')
|
AssertLinter 'mcs', 'mcs -unsafe -pkg:dotnet -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')
|
||||||
|
|
||||||
Execute(The souce path should be be used in the command):
|
Execute(The source path should be be used in the command):
|
||||||
let g:ale_cs_mcsc_source = '../foo/bar'
|
let g:ale_cs_mcsc_source = '../foo/bar'
|
||||||
|
|
||||||
AssertLinterCwd '../foo/bar'
|
AssertLinterCwd '../foo/bar'
|
||||||
AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')
|
AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')
|
||||||
|
|
||||||
Execute(The list of search pathes for assemblies should be be used in the command if not empty):
|
Execute(The list of search paths for assemblies should be be used in the command if not empty):
|
||||||
let g:ale_cs_mcsc_assembly_path = ['/usr/lib/mono', '../foo/bar']
|
let g:ale_cs_mcsc_assembly_path = ['/usr/lib/mono', '../foo/bar']
|
||||||
|
|
||||||
AssertLinter 'mcs', 'mcs -unsafe'
|
AssertLinter 'mcs', 'mcs -unsafe'
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Execute(The default command should be correct):
|
|||||||
AssertLinter g:node_executable,
|
AssertLinter g:node_executable,
|
||||||
\ ale#Escape(g:node_executable) . ' --format=unix %t'
|
\ ale#Escape(g:node_executable) . ' --format=unix %t'
|
||||||
|
|
||||||
Execute(The global executable should be uesd if the option is set):
|
Execute(The global executable should be used if the option is set):
|
||||||
let g:ale_html_htmlhint_executable = 'foo'
|
let g:ale_html_htmlhint_executable = 'foo'
|
||||||
let g:ale_html_htmlhint_use_global = 1
|
let g:ale_html_htmlhint_use_global = 1
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ Execute(The local executable should be used when available):
|
|||||||
AssertLinter ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server'),
|
AssertLinter ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server'),
|
||||||
\ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server')) . ' --stdio'
|
\ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server')) . ' --stdio'
|
||||||
|
|
||||||
Execute(The gloabl executable should always be used when use_global is set):
|
Execute(The global executable should always be used when use_global is set):
|
||||||
let g:ale_ocaml_ols_use_global = 1
|
let g:ale_ocaml_ols_use_global = 1
|
||||||
call ale#test#SetFilename('../test-files/ols/file.ml')
|
call ale#test#SetFilename('../test-files/ols/file.ml')
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ Execute(virtualenv paths should be set in configuration by default):
|
|||||||
\ },
|
\ },
|
||||||
\}
|
\}
|
||||||
|
|
||||||
Execute(The pythonPath should be set based on whatever the ovveride for the venvPath is set to):
|
Execute(The pythonPath should be set based on whatever the override for the venvPath is set to):
|
||||||
call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py')
|
call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py')
|
||||||
|
|
||||||
" This overrides the default detection of the path.
|
" This overrides the default detection of the path.
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Execute(The local executable should be used when available):
|
|||||||
\ ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server'),
|
\ ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server'),
|
||||||
\ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server')) . ' --stdio'
|
\ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server')) . ' --stdio'
|
||||||
|
|
||||||
Execute(The gloabl executable should always be used when use_global is set):
|
Execute(The global executable should always be used when use_global is set):
|
||||||
let g:ale_reason_ols_use_global = 1
|
let g:ale_reason_ols_use_global = 1
|
||||||
call ale#test#SetFilename('../test-files/ols/file.re')
|
call ale#test#SetFilename('../test-files/ols/file.re')
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Execute(The default command should be correct):
|
|||||||
AssertLinter 'opa',
|
AssertLinter 'opa',
|
||||||
\ ale#Escape('opa') . ' check %s --format json '
|
\ ale#Escape('opa') . ' check %s --format json '
|
||||||
|
|
||||||
Execute(The default command should be overriden):
|
Execute(The default command should be overridden):
|
||||||
let b:ale_rego_opacheck_executable = '/bin/other/opa'
|
let b:ale_rego_opacheck_executable = '/bin/other/opa'
|
||||||
AssertLinter '/bin/other/opa',
|
AssertLinter '/bin/other/opa',
|
||||||
\ ale#Escape('/bin/other/opa') . ' check %s --format json '
|
\ ale#Escape('/bin/other/opa') . ' check %s --format json '
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Execute(The local executable from .bin should be used if available):
|
|||||||
\ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/remark_lint/with_bin_path/node_modules/.bin/remark'))
|
\ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/remark_lint/with_bin_path/node_modules/.bin/remark'))
|
||||||
\ . ' --no-stdout --no-color'
|
\ . ' --no-stdout --no-color'
|
||||||
|
|
||||||
Execute(The global executable should be uesd if the option is set):
|
Execute(The global executable should be used if the option is set):
|
||||||
let b:ale_markdown_remark_lint_use_global = 1
|
let b:ale_markdown_remark_lint_use_global = 1
|
||||||
call ale#test#SetFilename('../test-files/remark_lint/with_bin_path/foo.md')
|
call ale#test#SetFilename('../test-files/remark_lint/with_bin_path/foo.md')
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Execute(The toolchain should be configurable):
|
|||||||
|
|
||||||
AssertLinter 'rls', ale#Escape('rls') . ' +' . ale#Escape('stable')
|
AssertLinter 'rls', ale#Escape('rls') . ' +' . ale#Escape('stable')
|
||||||
|
|
||||||
Execute(The toolchain should be ommitted if not given):
|
Execute(The toolchain should be omitted if not given):
|
||||||
let g:ale_rust_rls_toolchain = ''
|
let g:ale_rust_rls_toolchain = ''
|
||||||
|
|
||||||
AssertLinter 'rls', ale#Escape('rls')
|
AssertLinter 'rls', ale#Escape('rls')
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Execute(The default command should be correct):
|
|||||||
AssertLinter 'terraform',
|
AssertLinter 'terraform',
|
||||||
\ ale#Escape('terraform') . ' validate -no-color -json '
|
\ ale#Escape('terraform') . ' validate -no-color -json '
|
||||||
|
|
||||||
Execute(The default command should be overriden):
|
Execute(The default command should be overridden):
|
||||||
let b:ale_terraform_terraform_executable = '/bin/other/terraform'
|
let b:ale_terraform_terraform_executable = '/bin/other/terraform'
|
||||||
AssertLinter '/bin/other/terraform',
|
AssertLinter '/bin/other/terraform',
|
||||||
\ ale#Escape('/bin/other/terraform') . ' validate -no-color -json '
|
\ ale#Escape('/bin/other/terraform') . ' validate -no-color -json '
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Execute(The options should be configurable):
|
|||||||
|
|
||||||
AssertLinter 'texlab', ale#Escape('texlab') . ' ' . b:ale_tex_texlab_options
|
AssertLinter 'texlab', ale#Escape('texlab') . ' ' . b:ale_tex_texlab_options
|
||||||
|
|
||||||
Execute(Should accpet configuration settings):
|
Execute(Should accept configuration settings):
|
||||||
AssertLSPConfig {}
|
AssertLSPConfig {}
|
||||||
let b:ale_tex_texlab_config = {'build':{'onSave':v:true}}
|
let b:ale_tex_texlab_config = {'build':{'onSave':v:true}}
|
||||||
AssertLSPConfig {'build':{'onSave':v:true}}
|
AssertLSPConfig {'build':{'onSave':v:true}}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ Before:
|
|||||||
Save g:ale_pattern_options_enabled
|
Save g:ale_pattern_options_enabled
|
||||||
Save g:ale_hover_cursor
|
Save g:ale_hover_cursor
|
||||||
|
|
||||||
" Turn everything on by defaul for these tests.
|
" Turn everything on by default for these tests.
|
||||||
let g:ale_completion_enabled = 1
|
let g:ale_completion_enabled = 1
|
||||||
let g:ale_echo_cursor = 1
|
let g:ale_echo_cursor = 1
|
||||||
let g:ale_enabled = 1
|
let g:ale_enabled = 1
|
||||||
@@ -118,7 +118,7 @@ Execute (Only the required events should be bound even if various settings are o
|
|||||||
\ ],
|
\ ],
|
||||||
\ CheckAutocmd('ALEEvents')
|
\ CheckAutocmd('ALEEvents')
|
||||||
|
|
||||||
Execute (The cursor hoever event should be enabled with g:ale_hover_cursor = 1):
|
Execute (The cursor hover event should be enabled with g:ale_hover_cursor = 1):
|
||||||
let g:ale_enabled = 1
|
let g:ale_enabled = 1
|
||||||
let g:ale_completion_enabled = 0
|
let g:ale_completion_enabled = 0
|
||||||
let g:ale_echo_cursor = 0
|
let g:ale_echo_cursor = 0
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ Execute(FormatCommand should apply regular cwd paths):
|
|||||||
\ 'cd ' . (has('unix') ? '' : '/d ') . ale#Escape('/foo /bar') . ' && abc',
|
\ 'cd ' . (has('unix') ? '' : '/d ') . ale#Escape('/foo /bar') . ' && abc',
|
||||||
\ ale#command#FormatCommand(bufnr('%'), '', 'abc', 0, v:null, '/foo /bar', [])[1]
|
\ ale#command#FormatCommand(bufnr('%'), '', 'abc', 0, v:null, '/foo /bar', [])[1]
|
||||||
\
|
\
|
||||||
Execute(FormatCommand should apply cwd subsitution and formatting):
|
Execute(FormatCommand should apply cwd substitution and formatting):
|
||||||
call ale#test#SetFilename('foo.txt')
|
call ale#test#SetFilename('foo.txt')
|
||||||
|
|
||||||
AssertEqual
|
AssertEqual
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ Execute(Only ALE highlights should be restored when buffers are restored):
|
|||||||
\ sort(GetMatchesWithoutIDs(), {m1, m2 -> m1.group < m2.group ? -1 : 1})
|
\ sort(GetMatchesWithoutIDs(), {m1, m2 -> m1.group < m2.group ? -1 : 1})
|
||||||
endif
|
endif
|
||||||
|
|
||||||
Execute(Higlight end columns should set an appropriate size):
|
Execute(Highlight end columns should set an appropriate size):
|
||||||
call ale#highlight#SetHighlights(bufnr('%'), [
|
call ale#highlight#SetHighlights(bufnr('%'), [
|
||||||
\ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2, 'end_col': 5},
|
\ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2, 'end_col': 5},
|
||||||
\ {'bufnr': bufnr('%'), 'type': 'W', 'lnum': 4, 'col': 1, 'end_col': 5},
|
\ {'bufnr': bufnr('%'), 'type': 'W', 'lnum': 4, 'col': 1, 'end_col': 5},
|
||||||
@@ -274,7 +274,7 @@ Execute(Higlight end columns should set an appropriate size):
|
|||||||
\ ],
|
\ ],
|
||||||
\ GetMatchesWithoutIDs()
|
\ GetMatchesWithoutIDs()
|
||||||
|
|
||||||
Execute(Higlight end columns should set an appropriate size):
|
Execute(Highlight end columns should set an appropriate size):
|
||||||
call ale#highlight#SetHighlights(bufnr('%'), [
|
call ale#highlight#SetHighlights(bufnr('%'), [
|
||||||
\ {'bufnr': bufnr('%') - 1, 'type': 'E', 'lnum': 1, 'col': 1},
|
\ {'bufnr': bufnr('%') - 1, 'type': 'E', 'lnum': 1, 'col': 1},
|
||||||
\ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 1, 'col': 1},
|
\ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 1, 'col': 1},
|
||||||
@@ -424,7 +424,7 @@ Execute(Highlights should be cleared when ALE is disabled):
|
|||||||
|
|
||||||
Execute(Line highlights should be set when signs are disabled):
|
Execute(Line highlights should be set when signs are disabled):
|
||||||
" This will mess with your settings, but it needs to be tested.
|
" This will mess with your settings, but it needs to be tested.
|
||||||
" We need to match highlights case-insenstive when removing them.
|
" We need to match highlights case-insensitively when removing them.
|
||||||
hi link aleerrorline spellbad
|
hi link aleerrorline spellbad
|
||||||
|
|
||||||
let g:ale_set_signs = 0
|
let g:ale_set_signs = 0
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ Execute(StartChecking should mark a buffer as being actively checked):
|
|||||||
|
|
||||||
Assert ale#engine#IsCheckingBuffer(bufnr(''))
|
Assert ale#engine#IsCheckingBuffer(bufnr(''))
|
||||||
|
|
||||||
Execute(ShowResults sould make a buffer inactive):
|
Execute(ShowResults should make a buffer inactive):
|
||||||
call ale#other_source#StartChecking(bufnr(''), 'other-source-linter')
|
call ale#other_source#StartChecking(bufnr(''), 'other-source-linter')
|
||||||
call ale#other_source#StartChecking(bufnr(''), 'second-other-source-linter')
|
call ale#other_source#StartChecking(bufnr(''), 'second-other-source-linter')
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Execute(The command wrapper should work with a nice command with an explicit mar
|
|||||||
|
|
||||||
call TestCommand('nice -n 5 foo bar', 'foo bar')
|
call TestCommand('nice -n 5 foo bar', 'foo bar')
|
||||||
|
|
||||||
Execute(Wrappers with spread arguments in the middle should be suppported):
|
Execute(Wrappers with spread arguments in the middle should be supported):
|
||||||
let b:ale_command_wrapper = 'wrap %* --'
|
let b:ale_command_wrapper = 'wrap %* --'
|
||||||
|
|
||||||
call TestCommand('wrap foo bar --', 'foo bar')
|
call TestCommand('wrap foo bar --', 'foo bar')
|
||||||
|
|||||||
Reference in New Issue
Block a user