Total Complexity | 1 |
Total Lines | 13 |
Duplicated Lines | 0 % |
1 | import re |
||
8 | class LatexLintBear(LocalBear, Lint): |
||
9 | executable = 'chktex' |
||
10 | output_regex = re.compile(r'(?P<severity>Error|Warning) (?P<num>[0-9]+)' |
||
11 | r' in (?P<file_name>\S+) line (?P<line>[0-9]+)' |
||
12 | r': (?P<message>.*)') |
||
13 | severity_map = {'Warning': RESULT_SEVERITY.NORMAL, |
||
14 | 'Error': RESULT_SEVERITY.MAJOR} |
||
15 | |||
16 | def run(self, filename, file): |
||
17 | ''' |
||
18 | Checks the code with `chktex`. |
||
19 | ''' |
||
20 | return self.lint(filename) |
||
21 |