summaryrefslogtreecommitdiff
path: root/ale_linters/fortran
diff options
context:
space:
mode:
authorBjorn Neergaard <bjorn@neersighted.com>2016-10-10 18:43:45 -0500
committerBjorn Neergaard <bjorn@neersighted.com>2016-10-11 06:14:26 -0500
commitfb4b797dd22b2ec225542c97e5c0c4195edf037e (patch)
treebe6bc337e1403aaded57cfaaf0ce506e73cfb225 /ale_linters/fortran
parentca4badfb3a0ae73d4fcac3512c8cfae2a6a94f03 (diff)
downloadale-fb4b797dd22b2ec225542c97e5c0c4195edf037e.zip
Use explicit scope in all ale_linters
vint -s is now clean
Diffstat (limited to 'ale_linters/fortran')
-rw-r--r--ale_linters/fortran/gcc.vim34
1 files changed, 17 insertions, 17 deletions
diff --git a/ale_linters/fortran/gcc.vim b/ale_linters/fortran/gcc.vim
index fecaf39a..c0a8974a 100644
--- a/ale_linters/fortran/gcc.vim
+++ b/ale_linters/fortran/gcc.vim
@@ -18,33 +18,33 @@ function! ale_linters#fortran#gcc#Handle(buffer, lines)
"
" :21.34:
" Error: Expected comma in I/O list at (1)
- let line_marker_pattern = '^:\(\d\+\)\.\(\d\+\):$'
- let message_pattern = '^\(Error\|Warning\): \(.\+\)$'
- let looking_for_message = 0
- let last_loclist_obj = {}
+ let l:line_marker_pattern = '^:\(\d\+\)\.\(\d\+\):$'
+ let l:message_pattern = '^\(Error\|Warning\): \(.\+\)$'
+ let l:looking_for_message = 0
+ let l:last_loclist_obj = {}
- let output = []
+ let l:output = []
- for line in a:lines
- if looking_for_message
- let l:match = matchlist(line, message_pattern)
+ for l:line in a:lines
+ if l:looking_for_message
+ let l:match = matchlist(l:line, l:message_pattern)
else
- let l:match = matchlist(line, line_marker_pattern)
+ let l:match = matchlist(l:line, l:line_marker_pattern)
endif
if len(l:match) == 0
continue
endif
- if looking_for_message
- let looking_for_message = 0
+ if l:looking_for_message
+ let l:looking_for_message = 0
" Now we have the text, we can set it and add the error.
- let last_loclist_obj.text = l:match[2]
- let last_loclist_obj.type = l:match[1] ==# 'Warning' ? 'W' : 'E'
- call add(output, last_loclist_obj)
+ let l:last_loclist_obj.text = l:match[2]
+ let l:last_loclist_obj.type = l:match[1] ==# 'Warning' ? 'W' : 'E'
+ call add(l:output, l:last_loclist_obj)
else
- let last_loclist_obj = {
+ let l:last_loclist_obj = {
\ 'bufnr': a:buffer,
\ 'lnum': l:match[1] + 0,
\ 'vcol': 0,
@@ -53,11 +53,11 @@ function! ale_linters#fortran#gcc#Handle(buffer, lines)
\}
" Start looking for the message and error type.
- let looking_for_message = 1
+ let l:looking_for_message = 1
endif
endfor
- return output
+ return l:output
endfunction
call ale#linter#Define('fortran', {