Completed
Pull Request — master (#1109)
by Abdeali
01:32
created

bears.natural_language.AlexBear.run()   A

Complexity

Conditions 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 6
rs 9.4286
1
import re
2
3
from coalib.bearlib.abstractions.Lint import Lint
4
from coalib.bears.LocalBear import LocalBear
5
6
7
class AlexBear(LocalBear, Lint):
8
    executable = 'alex'
9
    output_regex = re.compile(
10
        r'\s+(?P<line>\d+):(?P<column>\d+)\-'
11
        r'(?P<end_line>\d+):(?P<end_column>\d+)'
12
        r'\s+(?:(?P<warning>warning))\s+(?P<message>.+)')
13
14
    def run(self, filename, file):
15
        '''
16
        Checks the markdown file with Alex - Catch insensitive,
17
        inconsiderate writing.
18
        '''
19
        return self.lint(filename)
20