Failed Conditions
Pull Request — master (#1266)
by Udayan
01:47
created

bears.go.GoVetBear.run()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 5
rs 9.4285
1
import re
2
3
from coalib.bearlib.abstractions.Lint import Lint
4
from coalib.bears.LocalBear import LocalBear
5
6
7
class GoVetBear(LocalBear, Lint):
8
    executable = 'go'
9
    arguments = 'vet'
10
    output_regex = re.compile(
11
        r'(?P<file_name>.+):(?P<line>\d+): (?P<message>.*)\n')
12
    use_stderr = True
13
14
    def run(self, filename, file):
15
        '''
16
        Checks the code using `go vet`.
17
        '''
18
        return self.lint(filename)
19