mirror of
https://github.com/dense-analysis/ale
synced 2025-01-01 11:22:11 +00:00
Merge pull request #2153 from deltaskelta/gqlint-fix
changed gqlint to lint the file on disk
This commit is contained in:
commit
0e3778e335
@ -1,9 +1,15 @@
|
||||
" Author: Michiel Westerbeek <happylinks@gmail.com>
|
||||
" Description: Linter for GraphQL Schemas
|
||||
|
||||
function! ale_linters#graphql#gqlint#GetCommand(buffer) abort
|
||||
return ale#path#BufferCdString(a:buffer)
|
||||
\ . 'gqlint'
|
||||
\ . ' --reporter=simple %t'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('graphql', {
|
||||
\ 'name': 'gqlint',
|
||||
\ 'executable': 'gqlint',
|
||||
\ 'command': 'gqlint --reporter=simple %t',
|
||||
\ 'command_callback': 'ale_linters#graphql#gqlint#GetCommand',
|
||||
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
||||
\})
|
||||
|
@ -0,0 +1,11 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('graphql', 'gqlint')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The linter should run from the directory of the file in the buffer):
|
||||
AssertLinter 'gqlint',
|
||||
\ ale#path#CdString(expand('%:p:h'))
|
||||
\ . 'gqlint --reporter=simple'
|
||||
\ . ' %t'
|
Loading…
Reference in New Issue
Block a user