Vimjas / vint

Fast and Highly Extensible Vim script Language Lint implemented in Python.
MIT License
700 stars 33 forks source link

Detect unwanted assigning to global variable at top-level by :for #354

Open tyru opened 4 years ago

tyru commented 4 years ago

I appreciate if vint catches this case.

Should detect

" Implicit assigning to g:i by :for
for i in range(3)
endfor

Should not detect

if !exists('g:myplugin_enable_foo')
  let g:myplugin_enable_foo = 0
endif
tyru commented 4 years ago

Real example: https://github.com/tsuyoshicho/vim-efm-langserver-settings/pull/28