diff options
author | 2021-03-05 02:53:52 -0700 | |
---|---|---|
committer | 2021-03-05 02:54:50 -0700 | |
commit | c6282a2fc77e5a8fb44fb81282dc0d99b8834530 (patch) | |
tree | 9bb6cd138d80398b7467644415d14c0a640a774f /data | |
parent | coverage: minor config simplification (diff) | |
download | pkgcheck-c6282a2fc77e5a8fb44fb81282dc0d99b8834530.tar.gz pkgcheck-c6282a2fc77e5a8fb44fb81282dc0d99b8834530.tar.bz2 pkgcheck-c6282a2fc77e5a8fb44fb81282dc0d99b8834530.zip |
data: replace ci script with version written in python
Diffstat (limited to 'data')
-rwxr-xr-x | data/ci.py | 15 | ||||
-rwxr-xr-x | data/ci.sh | 13 | ||||
-rw-r--r-- | data/pkgcheck.conf | 4 |
3 files changed, 17 insertions, 15 deletions
diff --git a/data/ci.py b/data/ci.py new file mode 100755 index 00000000..c9f438cd --- /dev/null +++ b/data/ci.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import json +import urllib.request + +JSON_URL = 'https://raw.githubusercontent.com/mgorny/pkgcheck2html/master/pkgcheck2html.conf.json' + +with urllib.request.urlopen(JSON_URL) as f: + ci_data = json.loads(f.read()) + +with open('pkgcheck.conf', 'w') as f: + f.write('[CHECKSETS]\nGentooCI =\n') + for k, v in sorted(ci_data.items()): + if v == 'err': + f.write(f' {k}\n') diff --git a/data/ci.sh b/data/ci.sh deleted file mode 100755 index 5a0baa21..00000000 --- a/data/ci.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Output the current list of Gentoo CI keyword errors. -# Requires bash, curl, and jq installed. - -# pull latest CI keyword errors -JSON_URL="https://raw.githubusercontent.com/mgorny/pkgcheck2html/master/pkgcheck2html.conf.json" -keywords=$(curl -s ${JSON_URL} | jq -r 'to_entries | .[] | select(.value == "err") | .key' | sort) - -# replace checkset in bundled config -cat << EOF > pkgcheck.conf -[CHECKSETS] -GentooCI =$(printf '\n %s' ${keywords[@]}) -EOF diff --git a/data/pkgcheck.conf b/data/pkgcheck.conf index 012d7975..2d592458 100644 --- a/data/pkgcheck.conf +++ b/data/pkgcheck.conf @@ -14,16 +14,16 @@ GentooCI = InvalidEapi InvalidLicense InvalidManifest - InvalidPdepend InvalidPN + InvalidPdepend InvalidProperties InvalidRdepend InvalidRequiredUse InvalidRestrict InvalidSlot InvalidSrcUri - InvalidUseFlags InvalidUTF8 + InvalidUseFlags MissingLicense MissingManifest MissingSlash |