summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-08-25 04:39:55 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-08-25 04:39:55 (GMT)
commite41d4c8ec9b837bd85a1c108b778bed81a86a0db (patch)
treea3c60cf73436212b82c30dc55b895bb3398e81ad /Tools/scripts
parent999b57c872fe3bf3b5df347c21bcf42bb393a186 (diff)
downloadcpython-e41d4c8ec9b837bd85a1c108b778bed81a86a0db.zip
cpython-e41d4c8ec9b837bd85a1c108b778bed81a86a0db.tar.gz
cpython-e41d4c8ec9b837bd85a1c108b778bed81a86a0db.tar.bz2
Added doubled word warnings.
Diffstat (limited to 'Tools/scripts')
-rw-r--r--Tools/scripts/texcheck.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tools/scripts/texcheck.py b/Tools/scripts/texcheck.py
index 6da4370..68be451 100644
--- a/Tools/scripts/texcheck.py
+++ b/Tools/scripts/texcheck.py
@@ -98,6 +98,7 @@ def checkit(source, opts, morecmds=[]):
delimiters = re.compile(r'\\(begin|end){([_a-zA-Z]+)}|([()\[\]])')
braces = re.compile(r'({)|(})')
+ doubledwords = re.compile(r'(\b[A-za-z]+\b) \b\1\b')
openers = [] # Stack of pending open delimiters
bracestack = [] # Stack of pending open braces
@@ -175,6 +176,8 @@ def checkit(source, opts, morecmds=[]):
if 'e.g.' in line or 'i.e.' in line:
print r'Style warning, avoid use of i.e or e.g. on line %d' % (lineno,)
+ for dw in doubledwords.findall(line):
+ print r'Doubled word warning. "%s" on line %d' % (dw, lineno)
lastline = lineno
for lineno, symbol in openers: