mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
Merge pull request #2268 from m-pilia/alex
Add settings for the Alex linter
This commit is contained in:
0
test/command_callback/alex-node-modules-2/node_modules/alex/cli.js
generated
vendored
Normal file
0
test/command_callback/alex-node-modules-2/node_modules/alex/cli.js
generated
vendored
Normal file
0
test/command_callback/alex-node-modules/node_modules/.bin/alex
generated
vendored
Normal file
0
test/command_callback/alex-node-modules/node_modules/.bin/alex
generated
vendored
Normal file
34
test/command_callback/test_alex_command_callback.vader
Normal file
34
test/command_callback/test_alex_command_callback.vader
Normal file
@@ -0,0 +1,34 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('tex', 'alex')
|
||||
call ale#test#SetFilename('test_file.tex')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The global executable should be used when the local one cannot be found):
|
||||
AssertLinter 'alex',
|
||||
\ ale#Escape('alex') . ' %s --text',
|
||||
|
||||
Execute(Should use the node_modules/.bin executable, if available):
|
||||
call ale#test#SetFilename('alex-node-modules/test_file.tex')
|
||||
|
||||
AssertLinter ale#path#Simplify(g:dir . '/alex-node-modules/node_modules/.bin/alex'),
|
||||
\ ale#Escape(ale#path#Simplify(g:dir . '/alex-node-modules/node_modules/.bin/alex'))
|
||||
\ . ' %s --text',
|
||||
|
||||
Execute(Should use the node_modules/alex executable, if available):
|
||||
call ale#test#SetFilename('alex-node-modules-2/test_file.tex')
|
||||
|
||||
AssertLinter ale#path#Simplify(g:dir . '/alex-node-modules-2/node_modules/alex/cli.js'),
|
||||
\ (has('win32') ? 'node.exe ' : '')
|
||||
\ . ale#Escape(ale#path#Simplify(g:dir . '/alex-node-modules-2/node_modules/alex/cli.js'))
|
||||
\ . ' %s --text',
|
||||
|
||||
Execute(Should let users configure a global executable and override local paths):
|
||||
call ale#test#SetFilename('write-good-node-modules-2/test_file.tex')
|
||||
|
||||
let g:ale_alex_executable = '/path/to/custom/alex'
|
||||
let g:ale_alex_use_global = 1
|
||||
|
||||
AssertLinter '/path/to/custom/alex',
|
||||
\ ale#Escape('/path/to/custom/alex') . ' %s --text'
|
||||
Reference in New Issue
Block a user