Skip to content

Commit 828fb48

Browse files
authored
Merge pull request #777 from tsuyoshicho/fix/linterror-20211014
fix: lint error suppress
2 parents 9597cc6 + 145086e commit 828fb48

File tree

16 files changed

+51
-4
lines changed

16 files changed

+51
-4
lines changed

autoload/vital/__vital__/Assertion.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ function! s:_define_scriptfunction(fname) abort
6868
endif
6969
endfunction
7070

71-
function! s:_assertion( q_args, local, scriptfilename, about_currline, cmd) abort
71+
" @vimlint(EVL103, 1, a:scriptfilename)
72+
function! s:_assertion(q_args, local, scriptfilename, about_currline, cmd) abort
7273
let s:_local = {}
7374
for s:_local.key in keys(a:local)
7475
execute printf('let %s = %s',s:_local.key,string(a:local[s:_local.key]))
@@ -119,6 +120,7 @@ function! s:_assertion( q_args, local, scriptfilename, about_currline, cmd) abor
119120
\ })
120121
endif
121122
endfunction
123+
" @vimlint(EVL103, 0, a:scriptfilename)
122124

123125
function! s:define(cmd_name,...) abort
124126
if (0 < len(a:000)) ? a:1 : 0
@@ -128,9 +130,11 @@ function! s:define(cmd_name,...) abort
128130
endif
129131
endfunction
130132

133+
" @vimlint(EVL103, 1, a:config)
131134
function! s:set_config(config) abort
132135
" TODO
133136
endfunction
137+
" @vimlint(EVL103, 0, a:config)
134138

135139
let &cpo = s:save_cpo
136140
unlet s:save_cpo

autoload/vital/__vital__/Bitwise.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ endfunction
8787

8888
" setup at module loaded time.
8989
" define inner utility part2 : use defined method
90+
" @vimlint(EVL103, 1, a:V)
9091
function! s:_vital_loaded(V) abort
9192
if has('num64')
9293
let s:mask32bit = 0xFFFFFFFF
@@ -101,6 +102,7 @@ function! s:_vital_loaded(V) abort
101102
\)
102103
endif
103104
endfunction
105+
" @vimlint(EVL103, 0, a:V)
104106

105107
" 32bit/64bit common method part2 : use defined method
106108

@@ -157,13 +159,19 @@ if has('num64')
157159
\ s:rshift(data, 64 - a:bits)))
158160
endfunction
159161
else
162+
" @vimlint(EVL103, 1, a:value)
160163
function! s:uint64(value) abort
161164
call s:_throw('64bit unsupport.')
162165
endfunction
166+
" @vimlint(EVL103, 0, a:value)
163167

168+
" @vimlint(EVL103, 1, a:data)
169+
" @vimlint(EVL103, 1, a:bits)
164170
function! s:rotate64l(data, bits) abort
165171
call s:_throw('64bit unsupport.')
166172
endfunction
173+
" @vimlint(EVL103, 0, a:bits)
174+
" @vimlint(EVL103, 0, a:data)
167175
endif
168176

169177
" When 32bit throw exception.

autoload/vital/__vital__/Data/Base32/Base32.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ function! s:b32encode(bytes, table, is_padding, pad) abort
1717
let b32 = []
1818
for i in range(0, len(a:bytes) - 1, 5)
1919
if 5 <= ((len(a:bytes) - 1) - i)
20+
" @vimlint(EVL108, 1)
2021
let bitstring = ''
2122
\ . printf('%08b', a:bytes[i] )
2223
\ . printf('%08b', get(a:bytes, i + 1, 0))
2324
\ . printf('%08b', get(a:bytes, i + 2, 0))
2425
\ . printf('%08b', get(a:bytes, i + 3, 0))
2526
\ . printf('%08b', get(a:bytes, i + 4, 0))
27+
" @vimlint(EVL108, 0)
2628
else
2729
let length = len(a:bytes) - i
2830
let n = a:bytes[i]

autoload/vital/__vital__/Deprecated/Lua/Prelude.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set cpo&vim
1010

1111
let s:sfile = tr(expand('<sfile>:p'), '\', '/')
1212

13+
" @vimlint(EVL103, 1, a:V)
1314
function! s:_vital_loaded(V) abort
1415
if exists('*luaeval')
1516
execute printf('lua vital_context = "%s"', s:sfile)
@@ -20,6 +21,7 @@ function! s:_vital_loaded(V) abort
2021
endif
2122
endif
2223
endfunction
24+
" @vimlint(EVL103, 0, a:V)
2325

2426
function! s:_vital_depends() abort
2527
return {

autoload/vital/__vital__/Locale/Message.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ function! s:Message.load(lang) abort
4242
let self.data = data
4343
endfunction
4444
let s:Message._ = s:Message.get
45+
" @vimlint(EVL103, 1, a:text)
4546
function! s:Message.missing(text) abort
4647
endfunction
48+
" @vimlint(EVL103, 0, a:text)
4749

4850
let &cpo = s:save_cpo
4951
unlet s:save_cpo

autoload/vital/__vital__/OptionParser.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ function! s:_vital_depends() abort
1515
endfunction
1616

1717
let s:_PRESET_COMPLETER = {}
18+
" @vimlint(EVL103, 1, a:cmdline)
19+
" @vimlint(EVL103, 1, a:cursorpos)
1820
function! s:_PRESET_COMPLETER.file(optlead, cmdline, cursorpos) abort
1921
let candidates = glob(a:optlead . '*', 0, 1)
2022
if a:optlead =~# '^\~'
@@ -24,6 +26,8 @@ function! s:_PRESET_COMPLETER.file(optlead, cmdline, cursorpos) abort
2426
call map(candidates, "escape(isdirectory(v:val) ? v:val.'/' : v:val, ' \\')")
2527
return candidates
2628
endfunction
29+
" @vimlint(EVL103, 0, a:cursorpos)
30+
" @vimlint(EVL103, 0, a:cmdline)
2731

2832
function! s:_make_option_description_for_help(opt) abort
2933
let extra = ''

autoload/vital/__vital__/Stream.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,8 @@ function! s:_plus(a, b) abort
761761
return a:a + a:b
762762
endfunction
763763

764-
" @vimlint(EVL102, 1, a:1)
764+
" TODO vimlint a:N workaround
765+
" @vimlint(EVL101, 1, a:1)
765766
function! s:Stream.to_dict(key_mapper, value_mapper, ...) abort
766767
let l:Result = {}
767768
if a:0
@@ -791,7 +792,7 @@ function! s:Stream.to_dict(key_mapper, value_mapper, ...) abort
791792
endif
792793
return l:Result
793794
endfunction
794-
" @vimlint(EVL102, 0, a:1)
795+
" @vimlint(EVL101, 0, a:1)
795796

796797
function! s:Stream.count(...) abort
797798
if self.__has_characteristic__(s:SIZED)

autoload/vital/__vital__/System/Cache/Base.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ function! s:cache.cache_key(obj) abort
1818
let cache_key = s:Prelude.is_string(a:obj) ? a:obj : string(a:obj)
1919
return cache_key
2020
endfunction
21+
" @vimlint(EVL103, 1, a:name)
22+
" @vimlint(EVL103, 1, a:value)
2123
function! s:cache.has(name) abort
2224
throw 'vital: System.Cache.Base: has({name}) is not implemented'
2325
endfunction
@@ -36,6 +38,8 @@ endfunction
3638
function! s:cache.clear() abort
3739
throw 'vital: System.Cache.Base: clear() is not implemented'
3840
endfunction
41+
" @vimlint(EVL103, 0, a:value)
42+
" @vimlint(EVL103, 0, a:name)
3943
function! s:cache.on_changed() abort
4044
" A user defined hook function
4145
endfunction

autoload/vital/__vital__/System/Cache/Dummy.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ function! s:new(...) abort
1818
\)
1919
endfunction
2020

21+
" @vimlint(EVL103, 1, a:name)
22+
" @vimlint(EVL103, 1, a:value)
2123
function! s:cache.has(name) abort
2224
return 0
2325
endfunction
@@ -36,6 +38,8 @@ endfunction
3638
function! s:cache.clear() abort
3739
" do nothing
3840
endfunction
41+
" @vimlint(EVL103, 0, a:value)
42+
" @vimlint(EVL103, 0, a:name)
3943

4044
let &cpo = s:save_cpo
4145
unlet s:save_cpo

autoload/vital/__vital__/System/Process/Mock.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ function! s:is_available() abort
55
return 1
66
endfunction
77

8+
" @vimlint(EVL103, 1, a:options)
89
function! s:is_supported(options) abort
910
return 1
1011
endfunction
12+
" @vimlint(EVL103, 0, a:options)
1113

1214
function! s:execute(args, options) abort
1315
if a:options.debug > 0

0 commit comments

Comments
 (0)