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

bears.go.GofmtBear.run()   A

Complexity

Conditions 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 2
dl 0
loc 6
rs 9.4285
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