e55d07cf6f
- added a cd into the direcotry containing the file in the buffer in order to properly check for a config file - added command_callback tests for graphql
15 lines
476 B
VimL
15 lines
476 B
VimL
" 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_callback': 'ale_linters#graphql#gqlint#GetCommand',
|
|
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
|
\})
|