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