-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathGlobalFinder.py
More file actions
20 lines (17 loc) · 827 Bytes
/
GlobalFinder.py
File metadata and controls
20 lines (17 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from SublimeLinter.lint import Linter
class GlobalFinder(Linter):
cmd = 'luacheck - --formatter=plain --std none --only [111,112,113] --no-unused --no-redefined --no-unused-args --no-unused-secondaries --no-self --no-max-line-length --no-max-code-line-length --no-max-string-line-length --no-max-comment-line-length --codes --ranges --filename @'
regex = (
r'^.+:(?P<line>\d+):(?P<col>\d+)\-(?P<col_end>\d+): '
r'\((?:(?P<error>E\d+)|(?P<warning>W\d+))\) '
r'(?P<message>.+)'
)
defaults = {
#'selector': 'source.lua - meta.tag.xml - comment.block.xml'
'selector': 'source.lua'
}
def split_match(self, match):
match, line, col, error, warning, msg, near = super().split_match(match)
col_end = int(match.group(3))
token_len = col_end - col
return match, line, col, error, warning, msg, "." * token_len