Skip to content

Commit 74ad1e1

Browse files
fix lint issues and enable linting for autoload folder (#224)
1 parent 2db2c45 commit 74ad1e1

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ before_script:
2828
- vim --version
2929

3030
script:
31-
- vint plugin ftplugin
31+
- vint autoload ftplugin plugin

autoload/lsp.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,22 @@ endfunction
6565

6666
function! s:server_status(server_name) abort
6767
if !has_key(s:servers, a:server_name)
68-
return "unknown server"
68+
return 'unknown server'
6969
endif
7070
let l:server = s:servers[a:server_name]
7171
if has_key(l:server, 'exited')
72-
return "exited"
72+
return 'exited'
7373
endif
7474
if has_key(l:server, 'init_callbacks')
75-
return "starting"
75+
return 'starting'
7676
endif
7777
if has_key(l:server, 'failed')
78-
return "failed"
78+
return 'failed'
7979
endif
8080
if has_key(l:server, 'init_result')
81-
return "running"
81+
return 'running'
8282
endif
83-
return "not running"
83+
return 'not running'
8484
endfunction
8585

8686
" Returns the current status of all servers (if called with no arguments) or

autoload/lsp/omni.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ function! lsp#omni#get_vim_completion_item(item) abort
162162
let l:abbr = a:item['label']
163163
endif
164164
let l:menu = lsp#omni#get_kind_text(a:item)
165-
let l:completion = { 'word': l:word, 'abbr': l:abbr, 'menu': l:menu, 'info': "", 'icase': 1, 'dup': 1 }
165+
let l:completion = { 'word': l:word, 'abbr': l:abbr, 'menu': l:menu, 'info': '', 'icase': 1, 'dup': 1 }
166166

167167
if has_key(a:item, 'detail')
168-
let l:completion['info'] .= a:item['detail'] . " "
168+
let l:completion['info'] .= a:item['detail'] . ' '
169169
endif
170170

171171
if has_key(a:item, 'documentation')

autoload/lsp/ui/vim/diagnostics/echo.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function! lsp#ui#vim#diagnostics#echo#cursor_moved()
1+
function! lsp#ui#vim#diagnostics#echo#cursor_moved() abort
22
if !g:lsp_diagnostics_echo_cursor
33
return
44
endif

autoload/lsp/ui/vim/output.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ function! s:append(data) abort
4444
elseif type(a:data) == type({}) && has_key(a:data, 'kind')
4545
silent put =a:data.value
4646

47-
return a:data.kind == 'plaintext' ? 'text' : a:data.kind
47+
return a:data.kind ==? 'plaintext' ? 'text' : a:data.kind
4848
endif
4949
endfunction

autoload/lsp/ui/vim/signs.vim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function! lsp#ui#vim#signs#next_error() abort
5656
let l:view.lnum = l:next_line
5757
let l:view.topline = 1
5858
let l:height = winheight(0)
59-
let totalnum = line("$")
59+
let totalnum = line('$')
6060
if totalnum > l:height
6161
let l:half = l:height / 2
6262
if l:totalnum - l:half < l:view.lnum
@@ -91,7 +91,7 @@ function! lsp#ui#vim#signs#previous_error() abort
9191
let l:view.lnum = l:next_line
9292
let l:view.topline = 1
9393
let l:height = winheight(0)
94-
let totalnum = line("$")
94+
let totalnum = line('$')
9595
if totalnum > l:height
9696
let l:half = l:height / 2
9797
if l:totalnum - l:half < l:view.lnum
@@ -178,7 +178,7 @@ function! s:clear_signs(server_name, path) abort
178178
endif
179179

180180
for l:id in s:signs[a:server_name][a:path]
181-
execute ":sign unplace " . l:id . " file=" . a:path
181+
execute ':sign unplace ' . l:id . ' file=' . a:path
182182
endfor
183183

184184
let s:signs[a:server_name][a:path] = []
@@ -194,12 +194,12 @@ function! s:place_signs(server_name, path, diagnostics) abort
194194
let l:name = 'LspError'
195195
if has_key(l:item, 'severity') && !empty(l:item['severity'])
196196
let l:name = get(s:severity_sign_names_mapping, l:item['severity'], 'LspError')
197-
execute ":sign place " . g:lsp_next_sign_id . " name=" . l:name . " line=" . l:line . " file=" . a:path
197+
execute ':sign place ' . g:lsp_next_sign_id . ' name=' . l:name . ' line=' . l:line . ' file=' . a:path
198198
call add(s:signs[a:server_name][a:path], g:lsp_next_sign_id)
199199
call lsp#log('add signs')
200200
let g:lsp_next_sign_id += 1
201201

202-
if l:name == 'LspError'
202+
if l:name ==? 'LspError'
203203
call add(s:err_loc, l:line)
204204
endif
205205
let s:err_loc = sort(s:err_loc)

0 commit comments

Comments
 (0)