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

bears.go.GofmtBear   A

Complexity

Total Complexity 2

Size/Duplication

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 6 2
1
from coalib.bearlib.abstractions.CorrectionBasedBear import CorrectionBasedBear
2
3
4
class GofmtBear(CorrectionBasedBear):
5
    executable = 'gofmt'
6
    RESULT_MESSAGE = "Formatting can be improved."
7
8
    def run(self, filename, file):
9
        """
10
        Proposes corrections of Go code using gofmt.
11
        """
12
        for result in self.retrieve_results(filename, file, cli_options=''):
13
            yield result
14