| 1 |
"""Too much yelling. |
| 2 |
|
| 3 |
--- |
| 4 |
layout: post |
| 5 |
source: ??? |
| 6 |
source_url: ??? |
| 7 |
title: yelling |
| 8 |
date: 2014-06-10 12:31:19 |
| 9 |
categories: writing |
| 10 |
--- |
| 11 |
|
| 12 |
Never use the phrase 'all hell broke loose'. |
| 13 |
|
| 14 |
""" |
| 15 |
from proselint.tools import existence_check, max_errors, memoize |
| 16 |
|
| 17 |
|
| 18 |
@max_errors(1) |
| 19 |
@memoize |
| 20 |
def check_repeated_exclamations(text): |
| 21 |
"""Check the text.""" |
| 22 |
err = "leonard.hell" |
| 23 |
msg = "Never use the words 'all hell broke loose'." |
| 24 |
|
| 25 |
regex = r"all hell broke loose" |
| 26 |
|
| 27 |
return existence_check(text, [regex], err, msg) |