mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Implement support for SQL linter sqlfluff (#4361)
This commit is contained in:
25
test/linter/test_sql_sqlfluff.vader
Normal file
25
test/linter/test_sql_sqlfluff.vader
Normal file
@@ -0,0 +1,25 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('sql', 'sqlfluff')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The default command should be correct):
|
||||
AssertLinter 'sqlfluff',
|
||||
\ ale#Escape('sqlfluff')
|
||||
\ . ' lint --dialect ansi --format json %t'
|
||||
|
||||
Execute(The executable should be configurable):
|
||||
let g:ale_sql_sqlfluff_executable = 'foobar'
|
||||
|
||||
AssertLinter 'foobar',
|
||||
\ ale#Escape('foobar')
|
||||
\ . ' lint --dialect ansi --format json %t'
|
||||
|
||||
Execute(Overriding options should work):
|
||||
let g:ale_sql_sqlfluff_executable = 'foobar'
|
||||
let g:ale_sql_sqlfluff_options = '--whatever'
|
||||
|
||||
AssertLinter 'foobar',
|
||||
\ ale#Escape('foobar')
|
||||
\ . ' lint --dialect ansi --format json --whatever %t'
|
||||
Reference in New Issue
Block a user