Skip to content

Commit 06ece0e

Browse files
committed
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.
1 parent 080a5cd commit 06ece0e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

syntax_checkers/swift/swiftlint.vim

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,20 @@ function! SyntaxCheckers_swift_swiftlint_IsAvailable() dict
1616
endfunction
1717

1818
function! SyntaxCheckers_swift_swiftlint_GetLocList() dict
19-
let env_vars = 'SCRIPT_INPUT_FILE_COUNT=1 SCRIPT_INPUT_FILE_0=' . syntastic#util#shexpand('%:p')
2019
let makeprg = self.makeprgBuild({
21-
\ 'exe_before': env_vars,
22-
\ 'fname': '',
23-
\ 'args': 'lint --use-script-input-files' })
20+
\ 'args': 'lint --use-script-input-files',
21+
\ 'fname': '' })
2422

2523
let errorformat =
2624
\ '%f:%l:%c: %trror: %m,' .
2725
\ '%f:%l:%c: %tarning: %m,' .
2826
\ '%f:%l: %trror: %m,' .
2927
\ '%f:%l: %tarning: %m'
3028

31-
let env = {}
32-
" let env = {
33-
" \ 'SCRIPT_INPUT_FILE_COUNT': 1,
34-
" \ 'SCRIPT_INPUT_FILE_0': syntastic#util#shexpand('%:p'),
35-
" \ }
29+
let env = {
30+
\ 'SCRIPT_INPUT_FILE_COUNT': 1,
31+
\ 'SCRIPT_INPUT_FILE_0': expand('%:p'),
32+
\ }
3633

3734
return SyntasticMake({
3835
\ 'makeprg': makeprg,

0 commit comments

Comments
 (0)