summaryrefslogtreecommitdiff
path: root/utils/check_sources.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/check_sources.py')
-rwxr-xr-xutils/check_sources.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/utils/check_sources.py b/utils/check_sources.py
index ad808883e..7fe0cbb7d 100755
--- a/utils/check_sources.py
+++ b/utils/check_sources.py
@@ -30,7 +30,7 @@ def checker(*suffixes, **kwds):
name_mail_re = r'[\w ]+(<.*?>)?'
-copyright_re = re.compile(r'^ :copyright: Copyright 200\d(-200\d)?'
+copyright_re = re.compile(r'^ :copyright: Copyright 200\d(-200\d)? '
r'by %s(, %s)*[,.]$' %
(name_mail_re, name_mail_re))
license_re = re.compile(r" :license: (.*?).\n")
@@ -56,7 +56,7 @@ def check_syntax(fn, lines):
def check_style_and_encoding(fn, lines):
encoding = 'ascii'
for lno, line in enumerate(lines):
- if len(line) > 90:
+ if len(line) > 81:
yield lno+1, "line too long"
if lno < 2:
co = coding_re.search(line)
@@ -64,9 +64,9 @@ def check_style_and_encoding(fn, lines):
encoding = co.group(1)
if line.strip().startswith('#'):
continue
- m = not_ix_re.search(line)
- if m:
- yield lno+1, '"' + m.group() + '"'
+ #m = not_ix_re.search(line)
+ #if m:
+ # yield lno+1, '"' + m.group() + '"'
if is_const_re.search(line):
yield lno+1, 'using == None/True/False'
try:
@@ -142,7 +142,7 @@ def check_fileheader(fn, lines):
yield 0, "no correct copyright info"
-@checker('.py', '.html')
+@checker('.py', '.html', '.rst')
def check_whitespace_and_spelling(fn, lines):
for lno, line in enumerate(lines):
if "\t" in line:
@@ -154,7 +154,7 @@ def check_whitespace_and_spelling(fn, lines):
yield lno+1, '"%s" used' % word
-bad_tags = ('<b>', '<i>', '<u>', '<s>', '<strike>'
+bad_tags = ('<u>', '<s>', '<strike>'
'<center>', '<big>', '<small>', '<font')
@checker('.html')