--- a/incoming.py Sun Jun 19 16:22:28 2016 +0800
+++ b/incoming.py Sun Jun 19 22:03:36 2016 +0800
if line.startswith(meta_prefix):
rest = line[len(meta_prefix):]
m = re.match('^task: (\w+)$', rest)
m = re.match('^job failed$', rest)
# https://pep8.readthedocs.io/en/latest/intro.html#error-codes
if re.match(r'^E9\d{2}', rest) is not None:
elif re.match(r'^[EWFCN]\d{3}', rest) is not None:
+ item['cls'] = 'warning'
elif re.match(r'^\[error\]', rest) is not None:
elif re.match(r'^\[warning\]', rest) is not None:
+ item['cls'] = 'warning'
elif re.match(r'^\(E\d{3}\)', rest) is not None:
elif re.match(r'^\(W\d{3}\)', rest) is not None:
+ item['cls'] = 'warning'
+ item['cls'] = 'warning'
- result.append((cls, line))
domain, user, name = parse_project_url(url)
--- a/templates/check.html Sun Jun 19 16:22:28 2016 +0800
+++ b/templates/check.html Sun Jun 19 22:03:36 2016 +0800
<pre class="check-log">{#
- #}{% for number, (cls, line) in enumerate(lines, 1) %}{#
- #}<div id="l{{ number }}"{% if cls %} class="{{ cls }}"{% end %}>{#
+ #}{% for number, line in enumerate(lines, 1) %}{#
+ #}<div id="l{{ number }}"{% if 'cls' in line %} class="{{ line['cls'] }}"{% end %}>{#
#}<a href="#l{{ number }}" class="lineno" data-line-number="{{ number }}"></a>{#