[gentoo-commits] proj/qa-scripts:master commit in: /, pkgcheck2html/

2018-07-17 Thread Michał Górny
commit: c2cffc0b424f3afcebc973031519fc3fea4629d6
Author: Michał Górny  gentoo  org>
AuthorDate: Tue Jul 17 15:39:01 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Jul 17 15:40:51 2018 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=c2cffc0b

Convert pkgcheck2html to submodule

 .gitmodules   |   3 +
 pkgcheck2html |   1 +
 pkgcheck2html/jinja2htmlcompress.py   | 150 --
 pkgcheck2html/output.html.jinja   |  79 --
 pkgcheck2html/pkgcheck2html.conf.json |  97 --
 pkgcheck2html/pkgcheck2html.py| 146 -
 6 files changed, 4 insertions(+), 472 deletions(-)

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000..870148a
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "pkgcheck2html"]
+   path = pkgcheck2html
+   url = https://github.com/mgorny/pkgcheck-result-parser

diff --git a/pkgcheck2html b/pkgcheck2html
new file mode 16
index 000..1bfec8e
--- /dev/null
+++ b/pkgcheck2html
@@ -0,0 +1 @@
+Subproject commit 1bfec8e37a2a770e47ed0971c4c3684292073ace

diff --git a/pkgcheck2html/jinja2htmlcompress.py 
b/pkgcheck2html/jinja2htmlcompress.py
deleted file mode 100644
index 5dfb211..000
--- a/pkgcheck2html/jinja2htmlcompress.py
+++ /dev/null
@@ -1,150 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
-jinja2htmlcompress
-~~
-
-A Jinja2 extension that eliminates useless whitespace at template
-compilation time without extra overhead.
-
-:copyright: (c) 2011 by Armin Ronacher.
-:license: BSD, see LICENSE for more details.
-"""
-import re
-from jinja2.ext import Extension
-from jinja2.lexer import Token, describe_token
-from jinja2 import TemplateSyntaxError
-
-
-_tag_re = re.compile(r'(?:<(/?)([a-zA-Z0-9_-]+)\s*|(>\s*))(?s)')
-_ws_normalize_re = re.compile(r'[ \t\r\n]+')
-
-
-class StreamProcessContext(object):
-
-def __init__(self, stream):
-self.stream = stream
-self.token = None
-self.stack = []
-
-def fail(self, message):
-raise TemplateSyntaxError(message, self.token.lineno,
-  self.stream.name, self.stream.filename)
-
-
-def _make_dict_from_listing(listing):
-rv = {}
-for keys, value in listing:
-for key in keys:
-rv[key] = value
-return rv
-
-
-class HTMLCompress(Extension):
-isolated_elements = set(['script', 'style', 'noscript', 'textarea'])
-void_elements = set(['br', 'img', 'area', 'hr', 'param', 'input',
- 'embed', 'col'])
-block_elements = set(['div', 'p', 'form', 'ul', 'ol', 'li', 'table', 'tr',
-  'tbody', 'thead', 'tfoot', 'tr', 'td', 'th', 'dl',
-  'dt', 'dd', 'blockquote', 'h1', 'h2', 'h3', 'h4',
-  'h5', 'h6', 'pre'])
-breaking_rules = _make_dict_from_listing([
-(['p'], set(['#block'])),
-(['li'], set(['li'])),
-(['td', 'th'], set(['td', 'th', 'tr', 'tbody', 'thead', 'tfoot'])),
-(['tr'], set(['tr', 'tbody', 'thead', 'tfoot'])),
-(['thead', 'tbody', 'tfoot'], set(['thead', 'tbody', 'tfoot'])),
-(['dd', 'dt'], set(['dl', 'dt', 'dd']))
-])
-
-def is_isolated(self, stack):
-for tag in reversed(stack):
-if tag in self.isolated_elements:
-return True
-return False
-
-def is_breaking(self, tag, other_tag):
-breaking = self.breaking_rules.get(other_tag)
-return breaking and (tag in breaking or
-('#block' in breaking and tag in self.block_elements))
-
-def enter_tag(self, tag, ctx):
-while ctx.stack and self.is_breaking(tag, ctx.stack[-1]):
-self.leave_tag(ctx.stack[-1], ctx)
-if tag not in self.void_elements:
-ctx.stack.append(tag)
-
-def leave_tag(self, tag, ctx):
-if not ctx.stack:
-ctx.fail('Tried to leave "%s" but something closed '
- 'it already' % tag)
-if tag == ctx.stack[-1]:
-ctx.stack.pop()
-return
-for idx, other_tag in enumerate(reversed(ctx.stack)):
-if other_tag == tag:
-for num in xrange(idx + 1):
-ctx.stack.pop()
-elif not self.breaking_rules.get(other_tag):
-break
-
-def normalize(self, ctx):
-pos = 0
-buffer = []
-def write_data(value):
-if not self.is_isolated(ctx.stack):
-value = _ws_normalize_re.sub(' ', value.strip())
-buffer.append(value)
-
-for match in _tag_re.finditer(ctx.token.value):
-closes, tag, sole = match.groups()
-preamble = ctx.token.value[pos:match.start()]
-write_data(preamble)
-if sole:
-write_data(sole)
- 

[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2018-04-15 Thread Michał Górny
commit: 1e095ee2257a81ded53d72bf2582729eab2f768d
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Apr 15 06:53:37 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Apr 15 06:54:00 2018 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=1e095ee2

pkgcheck: PkgMetadataXmlEmptyElement -> warn

 pkgcheck2html/pkgcheck2html.conf.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index de1a184..99b54bb 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -56,7 +56,7 @@
 "OldPackageUpdate": "warn", 
 "PkgBadlyFormedXml": "warn", 
 "PkgInvalidXml": "warn", 
-"PkgMetadataXmlEmptyElement": "staging", 
+"PkgMetadataXmlEmptyElement": "warn", 
 "PkgMetadataXmlIndentation": "", 
 "PkgMetadataXmlInvalidCatRef": "warn", 
 "PkgMetadataXmlInvalidPkgRef": "warn", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2018-01-06 Thread Michał Górny
commit: 0c0964c51ee0f1bc0bd99369f47aa8e684214afb
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jan  6 19:16:27 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Jan  6 19:16:40 2018 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=0c0964c5

pkgcheck2html: Sync conf

 pkgcheck2html/pkgcheck2html.conf.json | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 83e1f83..de1a184 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -49,6 +49,9 @@
 "NonExistentDeps": "", 
 "NonexistentProfilePath": "err", 
 "NonsolvableDeps": "err", 
+"NonsolvableDepsInDev": "staging",
+"NonsolvableDepsInExp": "staging",
+"NonsolvableDepsInStable": "err",
 "OldMultiMovePackageUpdate": "", 
 "OldPackageUpdate": "warn", 
 "PkgBadlyFormedXml": "warn", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-12-22 Thread Michał Górny
commit: 180dd0ce583d9b927cb5039b17208ea7c1764b0f
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Dec 22 22:27:51 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Dec 22 22:27:51 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=180dd0ce

pkgcheck2html: Sync config

 pkgcheck2html/pkgcheck2html.conf.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 853526e..83e1f83 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -19,7 +19,7 @@
 "DeprecatedChksum": "staging", 
 "DeprecatedEAPI": "", 
 "DeprecatedEclass": "", 
-"DirectorySizeViolation": "staging", 
+"DirectorySizeViolation": "", 
 "DoubleEmptyLine": "warn", 
 "DroppedKeywords": "", 
 "DuplicateFiles": "", 
@@ -62,7 +62,7 @@
 "PortageInternals": "", 
 "RedundantVersion": "", 
 "RequiredUseDefaults": "", 
-"SizeViolation": "staging", 
+"SizeViolation": "", 
 "StaleUnstable": "", 
 "StupidKeywords": "warn", 
 "TrailingEmptyLine": "warn", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-12-18 Thread Michał Górny
commit: 77851020aa3f7d242cd72b8ef5d82545ba1470a1
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Dec 18 15:41:01 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Dec 18 15:41:01 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=77851020

pkgcheck2html: Fix template for errors & warnings

 pkgcheck2html/output.html.jinja | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgcheck2html/output.html.jinja b/pkgcheck2html/output.html.jinja
index 80c5167..a18408c 100644
--- a/pkgcheck2html/output.html.jinja
+++ b/pkgcheck2html/output.html.jinja
@@ -17,13 +17,13 @@
{% for g, pkgs in errors %}
{{ g 
}}
{% for pkg in pkgs %}
-   {{ g|join('/') }}
+   {{ pkg|join('/') }}
{% endfor %}
{% endfor %}
{% for g, pkgs in warnings %}
{{ g 
}}
{% for pkg in pkgs %}
-   {{ g|join('/') }}
+   {{ pkg|join('/') }}
{% endfor %}
{% endfor %}
{% for g, pkgs in staging %}



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/, htdocs/

2017-12-17 Thread Michał Górny
commit: 1d281c78d02de7a55fc918aa414d7e9620d8e101
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Dec 17 16:59:49 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Dec 17 16:59:49 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=1d281c78

pkgcheck2html: Group results by class

 htdocs/pkgcheck2html.css|  8 
 pkgcheck2html/output.html.jinja | 21 +++--
 pkgcheck2html/pkgcheck2html.py  | 14 +-
 3 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/htdocs/pkgcheck2html.css b/htdocs/pkgcheck2html.css
index eb17b19..44862ce 100644
--- a/htdocs/pkgcheck2html.css
+++ b/htdocs/pkgcheck2html.css
@@ -171,6 +171,14 @@ tr.warn td:hover
text-overflow: ellipsis;
 }
 
+li.heading
+{
+   font-size: 125%;
+   color: white;
+   background-color: #463C65;
+   padding-left: .75em;
+}
+
 .warn a
 {
color: orange;

diff --git a/pkgcheck2html/output.html.jinja b/pkgcheck2html/output.html.jinja
index f8d6bf5..80c5167 100644
--- a/pkgcheck2html/output.html.jinja
+++ b/pkgcheck2html/output.html.jinja
@@ -14,14 +14,23 @@
issues
 

-   {% for g in errors %}
-   {{ g|join('/') }}
+   {% for g, pkgs in errors %}
+   {{ g 
}}
+   {% for pkg in pkgs %}
+   {{ g|join('/') }}
+   {% endfor %}
{% endfor %}
-   {% for g in warnings %}
-   {{ g|join('/') }}
+   {% for g, pkgs in warnings %}
+   {{ g 
}}
+   {% for pkg in pkgs %}
+   {{ g|join('/') }}
+   {% endfor %}
{% endfor %}
-   {% for g in staging %}
-   {{ g|join('/') }}
+   {% for g, pkgs in staging %}
+   {{ 
g }}
+   {% for pkg in pkgs %}
+   {{ pkg|join('/') }}
+   {% endfor %}
{% endfor %}



diff --git a/pkgcheck2html/pkgcheck2html.py b/pkgcheck2html/pkgcheck2html.py
index da5dee5..ffdf76a 100755
--- a/pkgcheck2html/pkgcheck2html.py
+++ b/pkgcheck2html/pkgcheck2html.py
@@ -4,6 +4,7 @@
 # 2-clause BSD license
 
 import argparse
+import collections
 import datetime
 import io
 import json
@@ -77,11 +78,14 @@ def deep_group(it, level = 1):
 
 
 def find_of_class(it, cls, level = 2):
+out = collections.defaultdict(set)
+
 for g, r in group_results(it, level):
 for x in r:
 if x.css_class == cls:
-yield g
-break
+out[getattr(x, 'class')].add(g)
+
+return [(k, sorted(v)) for k, v in sorted(out.items())]
 
 
 def get_result_timestamp(paths):
@@ -125,9 +129,9 @@ 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')),
+warnings = find_of_class(results, 'warn'),
+staging = find_of_class(results, 'staging'),
+errors = find_of_class(results, 'err'),
 ts = ts,
 )
 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-12-17 Thread Michał Górny
commit: 89bd414fe8cfb1c469f59dc7bc3f2e161055d22b
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Dec 17 10:50:37 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Dec 17 10:51:06 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=89bd414f

pkgcheck2html: Add DeprecatedChksum

 pkgcheck2html/pkgcheck2html.conf.json | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index deda713..853526e 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -16,6 +16,7 @@
 "CatMissingMetadataXml": "warn", 
 "ConflictingChksums": "err", 
 "CrappyDescription": "warn", 
+"DeprecatedChksum": "staging", 
 "DeprecatedEAPI": "", 
 "DeprecatedEclass": "", 
 "DirectorySizeViolation": "staging", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-12-17 Thread Michał Górny
commit: be3eb21558d0e98ee5400403aeafa3b16a79c581
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Dec 17 09:31:48 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Dec 17 09:31:48 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=be3eb215

pkgcheck2html: DirectorySizeViolation is actually staging

 pkgcheck2html/pkgcheck2html.conf.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 953fbc8..deda713 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -18,7 +18,7 @@
 "CrappyDescription": "warn", 
 "DeprecatedEAPI": "", 
 "DeprecatedEclass": "", 
-"DirectorySizeViolation": "warn", 
+"DirectorySizeViolation": "staging", 
 "DoubleEmptyLine": "warn", 
 "DroppedKeywords": "", 
 "DuplicateFiles": "", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-12-17 Thread Michał Górny
commit: 8e52a5aa69f44a3ebaefec25fd6eb6ce9855285a
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Dec 17 09:30:40 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Dec 17 09:30:40 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=8e52a5aa

Sync pkgcheck2html.conf.json

 pkgcheck2html/pkgcheck2html.conf.json | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 46af4a4..953fbc8 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -18,6 +18,7 @@
 "CrappyDescription": "warn", 
 "DeprecatedEAPI": "", 
 "DeprecatedEclass": "", 
+"DirectorySizeViolation": "warn", 
 "DoubleEmptyLine": "warn", 
 "DroppedKeywords": "", 
 "DuplicateFiles": "", 
@@ -30,6 +31,7 @@
 "GLEP73Syntax": "warn", 
 "Glep31Violation": "warn", 
 "HttpsAvailable": "", 
+"InvalidKeywords": "err", 
 "InvalidPN": "err", 
 "InvalidUtf8": "err", 
 "LaggingStable": "", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-12-11 Thread Michał Górny
commit: 1c157e943d9c985a5a3d925fe12e71bd8f7eb608
Author: Michał Górny  gentoo  org>
AuthorDate: Tue Dec 12 07:58:18 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Dec 12 07:58:18 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=1c157e94

pkgcheck2html: MissingChksum is staging

 pkgcheck2html/pkgcheck2html.conf.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 91ab448..46af4a4 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -35,7 +35,7 @@
 "LaggingStable": "", 
 "MetadataError": "err", 
 "MismatchedPN": "warn", 
-"MissingChksum": "warn", 
+"MissingChksum": "staging", 
 "MissingLicense": "err", 
 "MissingManifest": "err", 
 "MissingSlotDep": "", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-10-04 Thread Michał Górny
commit: 6967c0eb637b849a20352042da803bdeeaac1600
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Oct  4 08:43:54 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed Oct  4 08:43:57 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=6967c0eb

pkgcheck2html.conf.json: Enable staging for empty metadata.xml els

 pkgcheck2html/pkgcheck2html.conf.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 77f4d8e..91ab448 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -9,7 +9,7 @@
 "BadRestricts": "", 
 "CatBadlyFormedXml": "warn", 
 "CatInvalidXml": "warn", 
-"CatMetadataXmlEmptyElement": "", 
+"CatMetadataXmlEmptyElement": "warn", 
 "CatMetadataXmlIndentation": "", 
 "CatMetadataXmlInvalidCatRef": "warn", 
 "CatMetadataXmlInvalidPkgRef": "warn", 
@@ -50,7 +50,7 @@
 "OldPackageUpdate": "warn", 
 "PkgBadlyFormedXml": "warn", 
 "PkgInvalidXml": "warn", 
-"PkgMetadataXmlEmptyElement": "", 
+"PkgMetadataXmlEmptyElement": "staging", 
 "PkgMetadataXmlIndentation": "", 
 "PkgMetadataXmlInvalidCatRef": "warn", 
 "PkgMetadataXmlInvalidPkgRef": "warn", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-10-02 Thread Michał Górny
commit: 6fff91a8b6c4699527b8555b834b1bb291e32873
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Oct  2 15:26:36 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Oct  2 15:26:36 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=6fff91a8

pkgcheck2html.conf: Update for new pkgcheck version

 pkgcheck2html/pkgcheck2html.conf.json | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 2c9d590..77f4d8e 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -4,10 +4,12 @@
 "BadFilename": "warn", 
 "BadInsIntoDir": "", 
 "BadPackageUpdate": "err", 
+"BadProfileEntry": "", 
 "BadProto": "err", 
 "BadRestricts": "", 
 "CatBadlyFormedXml": "warn", 
 "CatInvalidXml": "warn", 
+"CatMetadataXmlEmptyElement": "", 
 "CatMetadataXmlIndentation": "", 
 "CatMetadataXmlInvalidCatRef": "warn", 
 "CatMetadataXmlInvalidPkgRef": "warn", 
@@ -27,6 +29,7 @@
 "GLEP73SelfConflicting": "warn", 
 "GLEP73Syntax": "warn", 
 "Glep31Violation": "warn", 
+"HttpsAvailable": "", 
 "InvalidPN": "err", 
 "InvalidUtf8": "err", 
 "LaggingStable": "", 
@@ -43,14 +46,17 @@
 "NonExistentDeps": "", 
 "NonexistentProfilePath": "err", 
 "NonsolvableDeps": "err", 
+"OldMultiMovePackageUpdate": "", 
 "OldPackageUpdate": "warn", 
 "PkgBadlyFormedXml": "warn", 
 "PkgInvalidXml": "warn", 
+"PkgMetadataXmlEmptyElement": "", 
 "PkgMetadataXmlIndentation": "", 
 "PkgMetadataXmlInvalidCatRef": "warn", 
 "PkgMetadataXmlInvalidPkgRef": "warn", 
-"PkgMetadataXmlInvalidProjectError": "warn", 
+"PkgMetadataXmlInvalidProject": "warn", 
 "PkgMissingMetadataXml": "warn", 
+"PortageInternals": "", 
 "RedundantVersion": "", 
 "RequiredUseDefaults": "", 
 "SizeViolation": "staging", 
@@ -61,7 +67,10 @@
 "UnknownLicenses": "err", 
 "UnknownManifest": "err", 
 "UnknownProfileArches": "", 
+"UnknownProfilePackageUse": "", 
+"UnknownProfilePackages": "", 
 "UnknownProfileStatus": "", 
+"UnknownProfileUse": "", 
 "UnnecessaryManifest": "warn", 
 "UnstableOnly": "", 
 "UnstatedIUSE": "err", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-10-02 Thread Michał Górny
commit: 7c0ec99f0284de9f6692c93361737697218efda6
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Oct  2 14:48:21 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Oct  2 14:54:33 2017 +
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 @@

QA check results
 
-   {% if errors or warnings %}
+   {% if errors or warnings or staging %}

issues
 
@@ -20,6 +20,9 @@
{% for g in warnings %}
{{ g|join('/') }}
{% endfor %}
+   {% for g in staging %}
+   {{ g|join('/') }}
+   {% endfor %}


{% 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,
 )



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-10-02 Thread Michał Górny
commit: 80c1253392e259e8637ec73677d16c2fca2ea360
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Oct  2 14:48:44 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Oct  2 14:54:33 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=80c12533

pkgcheck2html.conf.json: make SizeViolation staging

 pkgcheck2html/pkgcheck2html.conf.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 8d8aabf..2c9d590 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -53,7 +53,7 @@
 "PkgMissingMetadataXml": "warn", 
 "RedundantVersion": "", 
 "RequiredUseDefaults": "", 
-"SizeViolation": "", 
+"SizeViolation": "staging", 
 "StaleUnstable": "", 
 "StupidKeywords": "warn", 
 "TrailingEmptyLine": "warn", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-09-03 Thread Michał Górny
commit: 6ce52dec95f06fc49ebd863a4b5aa960b228f91f
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Sep  3 20:03:27 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Sep  3 20:04:28 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=6ce52dec

Update results, err/warn on bad package moves

 pkgcheck2html/pkgcheck2html.conf.json | 12 
 1 file changed, 12 insertions(+)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 7e11ace..8d8aabf 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -1,11 +1,14 @@
 {
+"AbsoluteSymlink": "", 
 "ArchesWithoutProfiles": "", 
 "BadFilename": "warn", 
 "BadInsIntoDir": "", 
+"BadPackageUpdate": "err", 
 "BadProto": "err", 
 "BadRestricts": "", 
 "CatBadlyFormedXml": "warn", 
 "CatInvalidXml": "warn", 
+"CatMetadataXmlIndentation": "", 
 "CatMetadataXmlInvalidCatRef": "warn", 
 "CatMetadataXmlInvalidPkgRef": "warn", 
 "CatMissingMetadataXml": "warn", 
@@ -15,6 +18,7 @@
 "DeprecatedEclass": "", 
 "DoubleEmptyLine": "warn", 
 "DroppedKeywords": "", 
+"DuplicateFiles": "", 
 "EmptyFile": "warn", 
 "ExecutableFile": "", 
 "GLEP73BackAlteration": "", 
@@ -33,12 +37,16 @@
 "MissingManifest": "err", 
 "MissingSlotDep": "", 
 "MissingUri": "", 
+"MovedPackageUpdate": "err", 
+"MultiMovePackageUpdate": "warn", 
 "NoFinalNewline": "warn", 
 "NonExistentDeps": "", 
 "NonexistentProfilePath": "err", 
 "NonsolvableDeps": "err", 
+"OldPackageUpdate": "warn", 
 "PkgBadlyFormedXml": "warn", 
 "PkgInvalidXml": "warn", 
+"PkgMetadataXmlIndentation": "", 
 "PkgMetadataXmlInvalidCatRef": "warn", 
 "PkgMetadataXmlInvalidPkgRef": "warn", 
 "PkgMetadataXmlInvalidProjectError": "warn", 
@@ -59,6 +67,10 @@
 "UnstatedIUSE": "err", 
 "UnusedEclasses": "", 
 "UnusedGlobalFlags": "", 
+"UnusedInMastersEclasses": "", 
+"UnusedInMastersGlobalFlags": "", 
+"UnusedInMastersLicenses": "", 
+"UnusedInMastersMirrors": "", 
 "UnusedLicenses": "", 
 "UnusedLocalFlags": "warn", 
 "UnusedMirrors": "", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-08-08 Thread Michał Górny
commit: bbaef4313cbf7c962b957410535e1efadfc65b64
Author: Michał Górny  gentoo  org>
AuthorDate: Tue Aug  8 21:33:03 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Aug  8 21:33:03 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=bbaef431

pkgcheck2html.conf.json: Make GLEP73Immutability a warning

 pkgcheck2html/pkgcheck2html.conf.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index de4384d..7e11ace 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -19,7 +19,7 @@
 "ExecutableFile": "", 
 "GLEP73BackAlteration": "", 
 "GLEP73Conflict": "", 
-"GLEP73Immutability": "", 
+"GLEP73Immutability": "warn", 
 "GLEP73SelfConflicting": "warn", 
 "GLEP73Syntax": "warn", 
 "Glep31Violation": "warn", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-08-04 Thread Michał Górny
commit: fa2a8d953bf059ab933202d58371f91a4d666882
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Aug  4 21:50:07 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Aug  4 21:50:07 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=fa2a8d95

pkgcheck2html: Start enabling GLEP73 warnings

 pkgcheck2html/pkgcheck2html.conf.json | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index ed0fc30..de4384d 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -9,7 +9,6 @@
 "CatMetadataXmlInvalidCatRef": "warn", 
 "CatMetadataXmlInvalidPkgRef": "warn", 
 "CatMissingMetadataXml": "warn", 
-"ComplexRequiredUse": "warn", 
 "ConflictingChksums": "err", 
 "CrappyDescription": "warn", 
 "DeprecatedEAPI": "", 
@@ -18,6 +17,11 @@
 "DroppedKeywords": "", 
 "EmptyFile": "warn", 
 "ExecutableFile": "", 
+"GLEP73BackAlteration": "", 
+"GLEP73Conflict": "", 
+"GLEP73Immutability": "", 
+"GLEP73SelfConflicting": "warn", 
+"GLEP73Syntax": "warn", 
 "Glep31Violation": "warn", 
 "InvalidPN": "err", 
 "InvalidUtf8": "err", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-07-05 Thread Michał Górny
commit: cfcf5be0e34a4d70ed3b81492c12f00621e9272f
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Jul  5 11:26:46 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed Jul  5 11:28:28 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=cfcf5be0

pkgcheck2html: Degrade metadata.xml issues to warn

 pkgcheck2html/pkgcheck2html.conf.json | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 9b5a705..ed0fc30 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -4,10 +4,10 @@
 "BadInsIntoDir": "", 
 "BadProto": "err", 
 "BadRestricts": "", 
-"CatBadlyFormedXml": "err", 
-"CatInvalidXml": "err", 
-"CatMetadataXmlInvalidCatRef": "err", 
-"CatMetadataXmlInvalidPkgRef": "err", 
+"CatBadlyFormedXml": "warn", 
+"CatInvalidXml": "warn", 
+"CatMetadataXmlInvalidCatRef": "warn", 
+"CatMetadataXmlInvalidPkgRef": "warn", 
 "CatMissingMetadataXml": "warn", 
 "ComplexRequiredUse": "warn", 
 "ConflictingChksums": "err", 
@@ -33,12 +33,12 @@
 "NonExistentDeps": "", 
 "NonexistentProfilePath": "err", 
 "NonsolvableDeps": "err", 
-"PkgBadlyFormedXml": "err", 
-"PkgInvalidXml": "err", 
-"PkgMetadataXmlInvalidCatRef": "err", 
-"PkgMetadataXmlInvalidPkgRef": "err", 
-"PkgMetadataXmlInvalidProjectError": "err", 
-"PkgMissingMetadataXml": "err", 
+"PkgBadlyFormedXml": "warn", 
+"PkgInvalidXml": "warn", 
+"PkgMetadataXmlInvalidCatRef": "warn", 
+"PkgMetadataXmlInvalidPkgRef": "warn", 
+"PkgMetadataXmlInvalidProjectError": "warn", 
+"PkgMissingMetadataXml": "warn", 
 "RedundantVersion": "", 
 "RequiredUseDefaults": "", 
 "SizeViolation": "", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-06-19 Thread Michał Górny
commit: 795ad0b4f01bbb95f3e802a1699f4eb02ea3036a
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Jun 19 18:44:33 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Jun 19 18:45:15 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=795ad0b4

conf: Warn about ComplexRequiredUse

 pkgcheck2html/pkgcheck2html.conf.json | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index e68c852..9b5a705 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -9,6 +9,7 @@
 "CatMetadataXmlInvalidCatRef": "err", 
 "CatMetadataXmlInvalidPkgRef": "err", 
 "CatMissingMetadataXml": "warn", 
+"ComplexRequiredUse": "warn", 
 "ConflictingChksums": "err", 
 "CrappyDescription": "warn", 
 "DeprecatedEAPI": "", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-06-19 Thread Michał Górny
commit: 65856dea6ad5fb1d2769ed5e674b7d1420b8bbbd
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Jun 19 16:13:08 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Jun 19 16:14:06 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=65856dea

pkgcheck2html: Enable warning on EmptyFile

 pkgcheck2html/pkgcheck2html.conf.json | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 590c8ff..e68c852 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -15,6 +15,7 @@
 "DeprecatedEclass": "", 
 "DoubleEmptyLine": "warn", 
 "DroppedKeywords": "", 
+"EmptyFile": "warn", 
 "ExecutableFile": "", 
 "Glep31Violation": "warn", 
 "InvalidPN": "err", 



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-05-30 Thread Michał Górny
commit: 9e99bfdf667fb788b1391ccc75c44dc719ef486a
Author: Michał Górny  gentoo  org>
AuthorDate: Tue May 30 21:48:35 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue May 30 21:48:35 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=9e99bfdf

pkgcheck2html: Sync with upstream

 pkgcheck2html/pkgcheck2html.conf.json | 93 +++
 1 file changed, 62 insertions(+), 31 deletions(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 20efb3f..590c8ff 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -1,33 +1,64 @@
 {
-"CatMetadataXmlInvalidPkgRef": "err",
-"VisibleVcsPkg": "err",
-"-- MissingUri": "warn",
-"CatBadlyFormedXml": "err",
-"Glep31Violation": "err",
-"PkgBadlyFormedXml": "err",
-"CatInvalidXml": "err",
-"CatMetadataXmlInvalidCatRef": "err",
-"PkgMetadataXmlInvalidCatRef": "err",
-"ConflictingChksums": "err",
-"MissingChksum": "warn",
-"MissingManifest": "err",
-"CrappyDescription": "warn",
-"PkgMetadataXmlInvalidPkgRef": "err",
-"PkgMetadataXmlInvalidProjectError": "err",
-"PkgInvalidXml": "err",
-"NonsolvableDeps": "err",
-"UnusedLocalFlags": "err",
-"MetadataLoadError": "err",
-"UnknownManifest": "err",
-"NoFinalNewline": "err",
-"UnstatedIUSE": "err",
-"MetadataError": "err",
-"WrongIndentFound": "err",
-"UnknownLicenses": "err",
-"UnnecessaryManifest": "err",
-"MissingLicense": "err",
-"UnknownCategories": "err",
-"PkgMissingMetadataXml": "err",
-"DoubleEmptyLine": "err",
-"TrailingEmptyLine": "err"
+"ArchesWithoutProfiles": "", 
+"BadFilename": "warn", 
+"BadInsIntoDir": "", 
+"BadProto": "err", 
+"BadRestricts": "", 
+"CatBadlyFormedXml": "err", 
+"CatInvalidXml": "err", 
+"CatMetadataXmlInvalidCatRef": "err", 
+"CatMetadataXmlInvalidPkgRef": "err", 
+"CatMissingMetadataXml": "warn", 
+"ConflictingChksums": "err", 
+"CrappyDescription": "warn", 
+"DeprecatedEAPI": "", 
+"DeprecatedEclass": "", 
+"DoubleEmptyLine": "warn", 
+"DroppedKeywords": "", 
+"ExecutableFile": "", 
+"Glep31Violation": "warn", 
+"InvalidPN": "err", 
+"InvalidUtf8": "err", 
+"LaggingStable": "", 
+"MetadataError": "err", 
+"MismatchedPN": "warn", 
+"MissingChksum": "warn", 
+"MissingLicense": "err", 
+"MissingManifest": "err", 
+"MissingSlotDep": "", 
+"MissingUri": "", 
+"NoFinalNewline": "warn", 
+"NonExistentDeps": "", 
+"NonexistentProfilePath": "err", 
+"NonsolvableDeps": "err", 
+"PkgBadlyFormedXml": "err", 
+"PkgInvalidXml": "err", 
+"PkgMetadataXmlInvalidCatRef": "err", 
+"PkgMetadataXmlInvalidPkgRef": "err", 
+"PkgMetadataXmlInvalidProjectError": "err", 
+"PkgMissingMetadataXml": "err", 
+"RedundantVersion": "", 
+"RequiredUseDefaults": "", 
+"SizeViolation": "", 
+"StaleUnstable": "", 
+"StupidKeywords": "warn", 
+"TrailingEmptyLine": "warn", 
+"UnknownCategories": "err", 
+"UnknownLicenses": "err", 
+"UnknownManifest": "err", 
+"UnknownProfileArches": "", 
+"UnknownProfileStatus": "", 
+"UnnecessaryManifest": "warn", 
+"UnstableOnly": "", 
+"UnstatedIUSE": "err", 
+"UnusedEclasses": "", 
+"UnusedGlobalFlags": "", 
+"UnusedLicenses": "", 
+"UnusedLocalFlags": "warn", 
+"UnusedMirrors": "", 
+"UnusedProfileDirs": "", 
+"VisibleVcsPkg": "err", 
+"VulnerablePackage": "", 
+"WhitespaceFound": "", 
+"WrongIndentFound": "warn"
 }



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-05-14 Thread Michał Górny
commit: 40ba8a426a459d3e9e14134d50456f35023f10b5
Author: Michał Górny  gentoo  org>
AuthorDate: Sun May 14 06:51:46 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun May 14 06:53:01 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=40ba8a42

pkgcheck2html.conf: Ignore MissingUri due to false positives

 pkgcheck2html/pkgcheck2html.conf.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 459ed9a..20efb3f 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -1,7 +1,7 @@
 {
 "CatMetadataXmlInvalidPkgRef": "err",
 "VisibleVcsPkg": "err",
-"MissingUri": "warn",
+"-- MissingUri": "warn",
 "CatBadlyFormedXml": "err",
 "Glep31Violation": "err",
 "PkgBadlyFormedXml": "err",



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-05-13 Thread Michał Górny
commit: 966ad972586ef4e18fe1cecab2854e4889e4a303
Author: Michał Górny  gentoo  org>
AuthorDate: Sat May 13 09:53:46 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat May 13 09:53:46 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=966ad972

pkgcheck2html: Make empty line reports fatal

 pkgcheck2html/pkgcheck2html.conf.json | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index 91410a9..459ed9a 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -27,5 +27,7 @@
 "UnnecessaryManifest": "err",
 "MissingLicense": "err",
 "UnknownCategories": "err",
-"PkgMissingMetadataXml": "err"
+"PkgMissingMetadataXml": "err",
+"DoubleEmptyLine": "err",
+"TrailingEmptyLine": "err"
 }



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-05-11 Thread Michał Górny
commit: d3eb0f2aea8396a3d436fb1e96d5c77d7a66e5e7
Author: Michał Górny  gentoo  org>
AuthorDate: Thu May 11 12:12:30 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Thu May 11 12:12:30 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=d3eb0f2a

pkgcheck2html.conf.json: Include more errors

 pkgcheck2html/pkgcheck2html.conf.json | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index d9b7edc..91410a9 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -25,5 +25,7 @@
 "WrongIndentFound": "err",
 "UnknownLicenses": "err",
 "UnnecessaryManifest": "err",
-"MissingLicense": "err"
+"MissingLicense": "err",
+"UnknownCategories": "err",
+"PkgMissingMetadataXml": "err"
 }



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-03-04 Thread Michał Górny
commit: c4ba04673d5eb3fb9db6ca6d72b69b91f4ffce18
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Mar  4 10:24:49 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Mar  4 10:24:49 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=c4ba0467

pkgcheck2html: Make MissingLicense fatal

 pkgcheck2html/pkgcheck2html.conf.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index a701cf9..d9b7edc 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -24,5 +24,6 @@
 "MetadataError": "err",
 "WrongIndentFound": "err",
 "UnknownLicenses": "err",
-"UnnecessaryManifest": "err"
+"UnnecessaryManifest": "err",
+"MissingLicense": "err"
 }



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-01-27 Thread Michał Górny
commit: 367a75c7bfc5c85731436ae4a471b1a46083e31b
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Jan 27 20:09:03 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jan 27 20:09:03 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=367a75c7

pkgcheck: Make UnnecessaryManifest fatal

 pkgcheck2html/pkgcheck2html.conf.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index f05b34f..a701cf9 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -23,5 +23,6 @@
 "UnstatedIUSE": "err",
 "MetadataError": "err",
 "WrongIndentFound": "err",
-"UnknownLicenses": "err"
+"UnknownLicenses": "err",
+"UnnecessaryManifest": "err"
 }



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2017-01-14 Thread Michał Górny
commit: 8c104c01366a741028bfc99d887cbee3c979222a
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jan 14 16:25:22 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Jan 14 16:25:56 2017 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=8c104c01

pkgcheck: Make UnknownLicenses issue fatal

 pkgcheck2html/pkgcheck2html.conf.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkgcheck2html/pkgcheck2html.conf.json 
b/pkgcheck2html/pkgcheck2html.conf.json
index f9c597e..f05b34f 100644
--- a/pkgcheck2html/pkgcheck2html.conf.json
+++ b/pkgcheck2html/pkgcheck2html.conf.json
@@ -22,5 +22,6 @@
 "NoFinalNewline": "err",
 "UnstatedIUSE": "err",
 "MetadataError": "err",
-"WrongIndentFound": "err"
+"WrongIndentFound": "err",
+"UnknownLicenses": "err"
 }



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/, htdocs/

2016-12-04 Thread Michał Górny
commit: f12592f37eacbcf525e9ff8bde379b4822628bf8
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Dec  5 07:34:18 2016 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Dec  5 07:34:18 2016 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=f12592f3

pkgcheck2html: move CSS to htdocs

 pkgcheck2html/output.css => htdocs/pkgcheck2html.css | 0
 pkgcheck2html/output.html.jinja  | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgcheck2html/output.css b/htdocs/pkgcheck2html.css
similarity index 100%
rename from pkgcheck2html/output.css
rename to htdocs/pkgcheck2html.css

diff --git a/pkgcheck2html/output.html.jinja b/pkgcheck2html/output.html.jinja
index 2e44619..e04d27e 100644
--- a/pkgcheck2html/output.html.jinja
+++ b/pkgcheck2html/output.html.jinja
@@ -3,7 +3,7 @@


Gentoo CI - QA check results
-   
+   

 




[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2016-12-04 Thread Michał Górny
commit: 61fc15ef48b0ffdabe101bb90a786600a6d56e1a
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Dec  4 08:53:29 2016 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Dec  4 08:53:29 2016 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=61fc15ef

pkgcheck2html: Add stdin support

 pkgcheck2html/pkgcheck2html.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pkgcheck2html/pkgcheck2html.py b/pkgcheck2html/pkgcheck2html.py
index 466d8c1..44a9c2b 100755
--- a/pkgcheck2html/pkgcheck2html.py
+++ b/pkgcheck2html/pkgcheck2html.py
@@ -34,6 +34,8 @@ def result_sort_key(r):
 
 def get_results(input_paths, class_mapping):
 for input_path in input_paths:
+if input_path == '-':
+input_path = sys.stdin
 checks = xml.etree.ElementTree.parse(input_path).getroot()
 for r in checks:
 yield Result(r, class_mapping)



[gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/

2016-12-04 Thread Michał Górny
commit: cce1dfea834ae526ebbe8506fdad19cc03287730
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Dec  3 20:56:23 2016 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Dec  4 08:49:47 2016 +
URL:https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=cce1dfea

Add pkgcheck XML output to HTML formatter scripts

 pkgcheck2html/jinja2htmlcompress.py   | 150 +++
 pkgcheck2html/output.css  | 184 ++
 pkgcheck2html/output.html.jinja   |  67 +
 pkgcheck2html/pkgcheck2html.conf.json |  26 +
 pkgcheck2html/pkgcheck2html.py| 139 +
 5 files changed, 566 insertions(+)

diff --git a/pkgcheck2html/jinja2htmlcompress.py 
b/pkgcheck2html/jinja2htmlcompress.py
new file mode 100644
index 000..5dfb211
--- /dev/null
+++ b/pkgcheck2html/jinja2htmlcompress.py
@@ -0,0 +1,150 @@
+# -*- coding: utf-8 -*-
+"""
+jinja2htmlcompress
+~~
+
+A Jinja2 extension that eliminates useless whitespace at template
+compilation time without extra overhead.
+
+:copyright: (c) 2011 by Armin Ronacher.
+:license: BSD, see LICENSE for more details.
+"""
+import re
+from jinja2.ext import Extension
+from jinja2.lexer import Token, describe_token
+from jinja2 import TemplateSyntaxError
+
+
+_tag_re = re.compile(r'(?:<(/?)([a-zA-Z0-9_-]+)\s*|(>\s*))(?s)')
+_ws_normalize_re = re.compile(r'[ \t\r\n]+')
+
+
+class StreamProcessContext(object):
+
+def __init__(self, stream):
+self.stream = stream
+self.token = None
+self.stack = []
+
+def fail(self, message):
+raise TemplateSyntaxError(message, self.token.lineno,
+  self.stream.name, self.stream.filename)
+
+
+def _make_dict_from_listing(listing):
+rv = {}
+for keys, value in listing:
+for key in keys:
+rv[key] = value
+return rv
+
+
+class HTMLCompress(Extension):
+isolated_elements = set(['script', 'style', 'noscript', 'textarea'])
+void_elements = set(['br', 'img', 'area', 'hr', 'param', 'input',
+ 'embed', 'col'])
+block_elements = set(['div', 'p', 'form', 'ul', 'ol', 'li', 'table', 'tr',
+  'tbody', 'thead', 'tfoot', 'tr', 'td', 'th', 'dl',
+  'dt', 'dd', 'blockquote', 'h1', 'h2', 'h3', 'h4',
+  'h5', 'h6', 'pre'])
+breaking_rules = _make_dict_from_listing([
+(['p'], set(['#block'])),
+(['li'], set(['li'])),
+(['td', 'th'], set(['td', 'th', 'tr', 'tbody', 'thead', 'tfoot'])),
+(['tr'], set(['tr', 'tbody', 'thead', 'tfoot'])),
+(['thead', 'tbody', 'tfoot'], set(['thead', 'tbody', 'tfoot'])),
+(['dd', 'dt'], set(['dl', 'dt', 'dd']))
+])
+
+def is_isolated(self, stack):
+for tag in reversed(stack):
+if tag in self.isolated_elements:
+return True
+return False
+
+def is_breaking(self, tag, other_tag):
+breaking = self.breaking_rules.get(other_tag)
+return breaking and (tag in breaking or
+('#block' in breaking and tag in self.block_elements))
+
+def enter_tag(self, tag, ctx):
+while ctx.stack and self.is_breaking(tag, ctx.stack[-1]):
+self.leave_tag(ctx.stack[-1], ctx)
+if tag not in self.void_elements:
+ctx.stack.append(tag)
+
+def leave_tag(self, tag, ctx):
+if not ctx.stack:
+ctx.fail('Tried to leave "%s" but something closed '
+ 'it already' % tag)
+if tag == ctx.stack[-1]:
+ctx.stack.pop()
+return
+for idx, other_tag in enumerate(reversed(ctx.stack)):
+if other_tag == tag:
+for num in xrange(idx + 1):
+ctx.stack.pop()
+elif not self.breaking_rules.get(other_tag):
+break
+
+def normalize(self, ctx):
+pos = 0
+buffer = []
+def write_data(value):
+if not self.is_isolated(ctx.stack):
+value = _ws_normalize_re.sub(' ', value.strip())
+buffer.append(value)
+
+for match in _tag_re.finditer(ctx.token.value):
+closes, tag, sole = match.groups()
+preamble = ctx.token.value[pos:match.start()]
+write_data(preamble)
+if sole:
+write_data(sole)
+else:
+buffer.append(match.group())
+(closes and self.leave_tag or self.enter_tag)(tag, ctx)
+pos = match.end()
+
+write_data(ctx.token.value[pos:])
+return u''.join(buffer)
+
+def filter_stream(self, stream):
+ctx = StreamProcessContext(stream)
+for token in stream:
+if token.type != 'data':
+yield token
+continue
+ctx.token = token
+value =