-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlinter.py
57 lines (48 loc) · 1.48 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from SublimeLinter.lint import Linter
class xvlog(Linter):
name = 'xvlog'
cmd = ['xvlog', '${args}', '${temp_file}']
tempfile_suffix = 'verilog'
multiline = False
on_stderr = None
defaults = {
'selector': 'source.verilog',
'-i +': [],
}
regex = (
r'((?P<error>ERROR)|(?P<warning>WARNING)): '
r'((.*ignored due to previous errors)|(?P<message>([^"\'\n]*(?P<quote>["\'])(?P<near>[^"\']+)(?P=quote))?.*)) '
r'\[(?P<file>.*):'
r'(?P<line>\d+)\]'
)
class xvlog_sv(Linter):
name = 'xvlog_sv'
cmd = ['xvlog', '${args}', '--sv', '${temp_file}']
tempfile_suffix = 'systemverilog'
multiline = False
on_stderr = None
defaults = {
'selector': 'source.systemverilog',
'-i +': [],
}
regex = (
r'((?P<error>ERROR)|(?P<warning>WARNING)): '
r'((.*ignored due to previous errors)|(?P<message>([^"\'\n]*(?P<quote>["\'])(?P<near>[^"\']+)(?P=quote))?.*)) '
r'\[(?P<file>.*):'
r'(?P<line>\d+)\]'
)
class xvhdl(Linter):
name = 'xvhdl'
cmd = ['xvhdl', '${args}', '${temp_file}']
tempfile_suffix = 'vhdl'
multiline = False
on_stderr = None
defaults = {
'selector': 'source.vhdl'
}
regex = (
r'((?P<error>ERROR)|(?P<warning>WARNING)): '
r'((.*ignored due to previous errors)|(?P<message>([^"\'\n]*(?P<quote>["\'])(?P<near>[^"\']+)(?P=quote))?.*)) '
r'\[(?P<file>.*):'
r'(?P<line>\d+)\]'
)