proselint/checks/inprogress/example_check.py
raw| 1 | """First line is always wrong. |
| 2 | |
| 3 | --- |
| 4 | layout: post |
| 5 | source: Nobody |
| 6 | source_url: ??? |
| 7 | title: Firse line is always wrong. |
| 8 | date: 2014-06-10 12:31:19 |
| 9 | categories: writing |
| 10 | --- |
| 11 | |
| 12 | The first line always is always wrong. |
| 13 | |
| 14 | """ |
| 15 | from proselint.tools import reverse |
| 16 | |
| 17 | |
| 18 | def check(text): |
| 19 | """Check the text.""" |
| 20 | error_code = "example.first" |
| 21 | msg = "First line always has an error." |
| 22 | |
| 23 | reverse(text) |
| 24 | |
| 25 | return [(1, 1, error_code, msg)] |