mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-09 22:14:44 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('dart', 'analysis_server')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The default command should be correct):
|
||||
AssertLinter 'dart', ale#Escape('dart')
|
||||
\ . ' ./snapshots/analysis_server.dart.snapshot --lsp'
|
||||
|
||||
Execute(The executable should be configurable):
|
||||
let g:ale_dart_analysis_server_executable = 'foobar'
|
||||
|
||||
AssertLinter 'foobar', ale#Escape('foobar')
|
||||
\ . ' ./snapshots/analysis_server.dart.snapshot --lsp'
|
||||
@@ -0,0 +1,15 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('openapi', 'ibm_validator')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The yaml ibm-openapi-validator command callback should return the correct default string):
|
||||
AssertLinter 'lint-openapi', ale#Escape('lint-openapi') . ' %t'
|
||||
|
||||
Execute(The yaml ibm-openapi-validator command callback should be configurable):
|
||||
let g:ale_openapi_ibm_validator_executable = '~/.local/bin/lint-openapi'
|
||||
let g:ale_openapi_ibm_validator_options = '-c ~/.config'
|
||||
|
||||
AssertLinter '~/.local/bin/lint-openapi', ale#Escape('~/.local/bin/lint-openapi')
|
||||
\ . ' -c ~/.config %t'
|
||||
@@ -1,8 +1,11 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('typescript', 'xo')
|
||||
call ale#test#SetFilename('testfile.ts')
|
||||
call ale#assert#SetUpLinterTest('javascript', 'xo')
|
||||
call ale#test#SetFilename('testfile.jsx')
|
||||
unlet! b:executable
|
||||
|
||||
set filetype=javascriptreact
|
||||
runtime autoload/ale/handlers/xo.vim
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
@@ -10,11 +13,11 @@ Execute(The XO executable should be called):
|
||||
AssertLinter 'xo', ale#Escape('xo') . ' --reporter json --stdin --stdin-filename %s'
|
||||
|
||||
Execute(The XO executable should be configurable):
|
||||
let b:ale_typescript_xo_executable = 'foobar'
|
||||
let b:ale_javascript_xo_executable = 'foobar'
|
||||
|
||||
AssertLinter 'foobar', ale#Escape('foobar') . ' --reporter json --stdin --stdin-filename %s'
|
||||
|
||||
Execute(The XO options should be configurable):
|
||||
let b:ale_typescript_xo_options = '--wat'
|
||||
let b:ale_javascript_xo_options = '--wat'
|
||||
|
||||
AssertLinter 'xo', ale#Escape('xo') . ' --wat --reporter json --stdin --stdin-filename %s'
|
||||
|
||||
23
test/command_callback/test_xots_command_callback.vader
Normal file
23
test/command_callback/test_xots_command_callback.vader
Normal file
@@ -0,0 +1,23 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('typescript', 'xo')
|
||||
call ale#test#SetFilename('testfile.tsx')
|
||||
unlet! b:executable
|
||||
|
||||
set filetype=typescriptreact
|
||||
runtime autoload/ale/handlers/xo.vim
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The XO executable should be called):
|
||||
AssertLinter 'xo', ale#Escape('xo') . ' --reporter json --stdin --stdin-filename %s'
|
||||
|
||||
Execute(The XO executable should be configurable):
|
||||
let b:ale_typescript_xo_executable = 'foobar'
|
||||
|
||||
AssertLinter 'foobar', ale#Escape('foobar') . ' --reporter json --stdin --stdin-filename %s'
|
||||
|
||||
Execute(The XO options should be configurable):
|
||||
let b:ale_typescript_xo_options = '--wat'
|
||||
|
||||
AssertLinter 'xo', ale#Escape('xo') . ' --wat --reporter json --stdin --stdin-filename %s'
|
||||
Reference in New Issue
Block a user