mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-10 05:22:31 +08:00
linter/cypher: add cypher-lint
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('cypher', 'cypher_lint')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The default command and executable should be correct):
|
||||
AssertLinter 'cypher-lint', 'cypher-lint %s'
|
||||
21
test/handler/test_cypher_lint_handler.vader
Normal file
21
test/handler/test_cypher_lint_handler.vader
Normal file
@@ -0,0 +1,21 @@
|
||||
Before:
|
||||
runtime ale_linters/cypher/cypher_lint.vim
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(The cypher-lint handler should handle errors for the current file correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 1,
|
||||
\ 'col': 75,
|
||||
\ 'type': 'E',
|
||||
\ 'text': "Invalid input ',': expected an identifier, shortestPath, allShortestPaths or '('",
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#cypher#cypher_lint#Handle(bufnr(''), [
|
||||
\ "shakespeare.cql:1:75: Invalid input ',': expected an identifier, shortestPath, allShortestPaths or '('",
|
||||
\ "CREATE (shakespeare:Author {firstname:'William', lastname:'Shakespeare'}),,",
|
||||
\ " ^",
|
||||
\ ])
|
||||
Reference in New Issue
Block a user