forked from idrabenia/SublimeLinter-contrib-solhint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
linter.py
29 lines (25 loc) · 815 Bytes
/
linter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""This module exports the Solhint plugin class."""
from SublimeLinter.lint import NodeLinter, util
class Solhint(NodeLinter):
"""Solhint class delegate call to solhint tool and return result back."""
syntax = 'solidity'
cmd = 'solhint -f visualstudio @'
executable = None
version_args = '--version'
version_re = r'(?P<version>\d+\.\d+\.\d+)'
version_requirement = '>= 1.0'
regex = (
r'^.+?\((?P<line>\d+),(?P<col>\d+)\): '
r'(.?(?P<warning>warning)|(?P<error>error)).+?'
r':(?P<message>.+)'
)
multiline = True
line_col_base = (1, 1)
tempfile_suffix = 'solidity'
error_stream = util.STREAM_BOTH
selectors = {}
word_re = None
defaults = {}
inline_settings = None
inline_overrides = None
comment_re = r'\s*/[/*]'