commit:     7c0ec99f0284de9f6692c93361737697218efda6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  2 14:48:21 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Oct  2 14:54:33 2017 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=7c0ec99f

pkgcheck2html: Support staging class warnings

 pkgcheck2html/output.html.jinja | 5 ++++-
 pkgcheck2html/pkgcheck2html.py  | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/pkgcheck2html/output.html.jinja b/pkgcheck2html/output.html.jinja
index e04d27e..f8d6bf5 100644
--- a/pkgcheck2html/output.html.jinja
+++ b/pkgcheck2html/output.html.jinja
@@ -9,7 +9,7 @@
        <body>
                <h1>QA check results</h1>
 
-               {% if errors or warnings %}
+               {% if errors or warnings or staging %}
                        <div class="nav">
                                <h2>issues</h2>
 
@@ -20,6 +20,9 @@
                                        {% for g in warnings %}
                                                <li class="warn"><a href="#{{ 
g|join('/') }}">{{ g|join('/') }}</a></li>
                                        {% endfor %}
+                                       {% for g in staging %}
+                                               <li class="staging"><a 
href="#{{ g|join('/') }}">{{ g|join('/') }}</a></li>
+                                       {% endfor %}
                                </ul>
                        </div>
                {% endif %}

diff --git a/pkgcheck2html/pkgcheck2html.py b/pkgcheck2html/pkgcheck2html.py
index 44a9c2b..da5dee5 100755
--- a/pkgcheck2html/pkgcheck2html.py
+++ b/pkgcheck2html/pkgcheck2html.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # vim:se fileencoding=utf8 :
-# (c) 2015-2016 Michał Górny
+# (c) 2015-2017 Michał Górny
 # 2-clause BSD license
 
 import argparse
@@ -126,6 +126,7 @@ def main(*args):
     out = t.render(
         results = deep_group(results),
         warnings = list(find_of_class(results, 'warn')),
+        staging = list(find_of_class(results, 'staging')),
         errors = list(find_of_class(results, 'err')),
         ts = ts,
     )

Reply via email to