Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/
Date: Mon, 02 Oct 2017 14:54:46
Message-Id: 1506956073.7c0ec99f0284de9f6692c93361737697218efda6.mgorny@gentoo
1 commit: 7c0ec99f0284de9f6692c93361737697218efda6
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 2 14:48:21 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 2 14:54:33 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=7c0ec99f
7
8 pkgcheck2html: Support staging class warnings
9
10 pkgcheck2html/output.html.jinja | 5 ++++-
11 pkgcheck2html/pkgcheck2html.py | 3 ++-
12 2 files changed, 6 insertions(+), 2 deletions(-)
13
14 diff --git a/pkgcheck2html/output.html.jinja b/pkgcheck2html/output.html.jinja
15 index e04d27e..f8d6bf5 100644
16 --- a/pkgcheck2html/output.html.jinja
17 +++ b/pkgcheck2html/output.html.jinja
18 @@ -9,7 +9,7 @@
19 <body>
20 <h1>QA check results</h1>
21
22 - {% if errors or warnings %}
23 + {% if errors or warnings or staging %}
24 <div class="nav">
25 <h2>issues</h2>
26
27 @@ -20,6 +20,9 @@
28 {% for g in warnings %}
29 <li class="warn"><a href="#{{ g|join('/') }}">{{ g|join('/') }}</a></li>
30 {% endfor %}
31 + {% for g in staging %}
32 + <li class="staging"><a href="#{{ g|join('/') }}">{{ g|join('/') }}</a></li>
33 + {% endfor %}
34 </ul>
35 </div>
36 {% endif %}
37
38 diff --git a/pkgcheck2html/pkgcheck2html.py b/pkgcheck2html/pkgcheck2html.py
39 index 44a9c2b..da5dee5 100755
40 --- a/pkgcheck2html/pkgcheck2html.py
41 +++ b/pkgcheck2html/pkgcheck2html.py
42 @@ -1,6 +1,6 @@
43 #!/usr/bin/env python
44 # vim:se fileencoding=utf8 :
45 -# (c) 2015-2016 Michał Górny
46 +# (c) 2015-2017 Michał Górny
47 # 2-clause BSD license
48
49 import argparse
50 @@ -126,6 +126,7 @@ def main(*args):
51 out = t.render(
52 results = deep_group(results),
53 warnings = list(find_of_class(results, 'warn')),
54 + staging = list(find_of_class(results, 'staging')),
55 errors = list(find_of_class(results, 'err')),
56 ts = ts,
57 )