summaryrefslogtreecommitdiffstats
path: root/Doc/tools/rstlint.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-01-03 21:11:58 (GMT)
committerGeorg Brandl <georg@python.org>2009-01-03 21:11:58 (GMT)
commit3b62c2ff690143d9c6119c27478c243baa1b140c (patch)
tree7aacd3bb9e0f657d995fc49f10d312b427a67ee6 /Doc/tools/rstlint.py
parent7044b11818cb81d1df0573b3cfe8d9b90befce9b (diff)
downloadcpython-3b62c2ff690143d9c6119c27478c243baa1b140c.zip
cpython-3b62c2ff690143d9c6119c27478c243baa1b140c.tar.gz
cpython-3b62c2ff690143d9c6119c27478c243baa1b140c.tar.bz2
Disable the line length checker by default.
Diffstat (limited to 'Doc/tools/rstlint.py')
-rwxr-xr-xDoc/tools/rstlint.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Doc/tools/rstlint.py b/Doc/tools/rstlint.py
index 7e73942..0846d2a 100755
--- a/Doc/tools/rstlint.py
+++ b/Doc/tools/rstlint.py
@@ -91,7 +91,6 @@ def check_suspicious_constructs(fn, lines):
@checker('.py', '.rst')
def check_whitespace(fn, lines):
"""Check for whitespace and line length issues."""
- lasti = 0
for lno, line in enumerate(lines):
if '\r' in line:
yield lno+1, '\\r in line'
@@ -99,7 +98,13 @@ def check_whitespace(fn, lines):
yield lno+1, 'OMG TABS!!!1'
if line[:-1].rstrip(' \t') != line[:-1]:
yield lno+1, 'trailing whitespace'
- if len(line) > 86:
+
+
+@checker('.rst', severity=0)
+def check_line_length(fn, lines):
+ """Check for line length; this checker is not run by default."""
+ for lno, line in enumerate(lines):
+ if len(line) > 81:
# don't complain about tables, links and function signatures
if line.lstrip()[0] not in '+|' and \
'http://' not in line and \