File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,54 @@ EVLxxx and Exxx: error message by |vim-vimlint|.
92
92
93
93
variable
94
94
EVL101: undefined variable `v ` *EVL101*
95
+ >
96
+ function! Incorrect()
97
+ echo v
98
+ endif
99
+ function! Correct1()
100
+ let v = 1
101
+ echo v
102
+ endif
103
+ " @vimlint(EVL101, 1, l:v)
104
+ function! Correct2()
105
+ let v = 1
106
+ echo v
107
+ endif
108
+ " @vimlint(EVL101, 0, l:v)
109
+ <
95
110
EVL102: unused variable `v ` *EVL102*
111
+ >
112
+ function! Incorrect()
113
+ let a = 1
114
+ let b = 2
115
+ echo b
116
+ endif
117
+ function! Correct1()
118
+ let b = 2
119
+ echo b
120
+ endif
121
+ " @vimlint(EVL102, 1, l:a)
122
+ function! Correct2(v)
123
+ let a = 1
124
+ let b = 2
125
+ echo b
126
+ endif
127
+ " @vimlint(EVL103, 0, l:a)
128
+ <
96
129
EVL103: unused argument `v ` *EVL103*
130
+ >
131
+ function! Incorrect(v)
132
+ return 0
133
+ endif
134
+ function! Correct1()
135
+ return 0
136
+ endif
137
+ " @vimlint(EVL103, 1, a:v)
138
+ function! Correct2(v)
139
+ return 0
140
+ endif
141
+ " @vimlint(EVL103, 0, a:v)
142
+ <
97
143
*EVL104*
98
144
EVL104: variable may not be initialized on some execution path: `v `
99
145
*EVL105*
You can’t perform that action at this time.
0 commit comments