Total Complexity | 1 |
Total Lines | 11 |
Duplicated Lines | 0 % |
1 | from coalib.bears.LocalBear import LocalBear |
||
6 | class LineCountTestBear(LocalBear): |
||
7 | |||
8 | def run(self, filename, file): |
||
9 | ''' |
||
10 | Counts the lines of each file. |
||
11 | ''' |
||
12 | yield Result.from_values( |
||
13 | origin=self, |
||
14 | message="This file has {count} lines.".format(count=len(file)), |
||
15 | severity=RESULT_SEVERITY.INFO, |
||
16 | file=filename) |
||
17 |