| Conditions | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | from coalib.results.Result import Result, RESULT_SEVERITY |
||
| 39 | def check_line_for_keyword(self, line, filename, line_number, keyword): |
||
| 40 | pos = line.find(keyword) |
||
| 41 | if pos != -1: |
||
| 42 | return [Result.from_values( |
||
| 43 | origin=self, |
||
| 44 | message="The line contains the keyword `{}`." |
||
| 45 | .format(keyword), |
||
| 46 | file=filename, |
||
| 47 | line=line_number+1, |
||
| 48 | column=pos+1, |
||
| 49 | end_line=line_number+1, |
||
| 50 | end_column=pos+len(keyword)+1, |
||
| 51 | severity=RESULT_SEVERITY.INFO)] |
||
| 52 | |||
| 53 | return [] |
||
| 54 |