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

bears.go.GoVetBear   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %
Metric Value
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 5 1
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