mirror of
https://github.com/keith/swift.vim.git
synced 2025-12-22 12:14:13 +01:00
Update swiftlint syntastic plugin
A while ago I fixed being able to have numbers in env vars in syntastic, so this now works as expected.
This commit is contained in:
@@ -16,11 +16,9 @@ function! SyntaxCheckers_swift_swiftlint_IsAvailable() dict
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_swift_swiftlint_GetLocList() dict
|
function! SyntaxCheckers_swift_swiftlint_GetLocList() dict
|
||||||
let env_vars = 'SCRIPT_INPUT_FILE_COUNT=1 SCRIPT_INPUT_FILE_0=' . syntastic#util#shexpand('%:p')
|
|
||||||
let makeprg = self.makeprgBuild({
|
let makeprg = self.makeprgBuild({
|
||||||
\ 'exe_before': env_vars,
|
\ 'args': 'lint --use-script-input-files',
|
||||||
\ 'fname': '',
|
\ 'fname': '' })
|
||||||
\ 'args': 'lint --use-script-input-files' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%f:%l:%c: %trror: %m,' .
|
\ '%f:%l:%c: %trror: %m,' .
|
||||||
@@ -28,11 +26,10 @@ function! SyntaxCheckers_swift_swiftlint_GetLocList() dict
|
|||||||
\ '%f:%l: %trror: %m,' .
|
\ '%f:%l: %trror: %m,' .
|
||||||
\ '%f:%l: %tarning: %m'
|
\ '%f:%l: %tarning: %m'
|
||||||
|
|
||||||
let env = {}
|
let env = {
|
||||||
" let env = {
|
\ 'SCRIPT_INPUT_FILE_COUNT': 1,
|
||||||
" \ 'SCRIPT_INPUT_FILE_COUNT': 1,
|
\ 'SCRIPT_INPUT_FILE_0': expand('%:p'),
|
||||||
" \ 'SCRIPT_INPUT_FILE_0': syntastic#util#shexpand('%:p'),
|
\ }
|
||||||
" \ }
|
|
||||||
|
|
||||||
return SyntasticMake({
|
return SyntasticMake({
|
||||||
\ 'makeprg': makeprg,
|
\ 'makeprg': makeprg,
|
||||||
|
|||||||
Reference in New Issue
Block a user