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