aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2020-01-16 04:26:56 -0700
committerTim Harder <radhermit@gmail.com>2020-01-16 04:26:56 -0700
commitfefc26f89f6b6ef85be28d709ae34bc84edddc46 (patch)
tree9ad533bbed26961174d4135a74e827c9ffe64754 /doc
parentgit: note that --commits generates targets from committed changes (diff)
downloadpkgcheck-fefc26f89f6b6ef85be28d709ae34bc84edddc46.tar.gz
pkgcheck-fefc26f89f6b6ef85be28d709ae34bc84edddc46.tar.bz2
pkgcheck-fefc26f89f6b6ef85be28d709ae34bc84edddc46.zip
doc: add gentoo repo specific notes for relevant keyword/check output
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/generate/pkgcheck/checks.py3
-rwxr-xr-xdoc/generate/pkgcheck/keywords.py9
2 files changed, 9 insertions, 3 deletions
diff --git a/doc/generate/pkgcheck/checks.py b/doc/generate/pkgcheck/checks.py
index 5d62ee2d..da671b2a 100755
--- a/doc/generate/pkgcheck/checks.py
+++ b/doc/generate/pkgcheck/checks.py
@@ -21,6 +21,7 @@ from textwrap import dedent, TextWrapper
from snakeoil.strings import pluralism as _pl
from pkgcheck import base, const
+from pkgcheck.checks import GentooRepoCheck
def main(f=sys.stdout, **kwargs):
@@ -59,6 +60,8 @@ def main(f=sys.stdout, **kwargs):
if explanation:
explanation = '\n'.join(dedent(explanation).strip().split('\n'))
out('\n' + explanation)
+ if issubclass(check, GentooRepoCheck):
+ out(f'\n- Gentoo repo specific')
known_results = ', '.join(
f'`{r.__name__}`_' for r in
sorted(check.known_results, key=attrgetter('__name__')))
diff --git a/doc/generate/pkgcheck/keywords.py b/doc/generate/pkgcheck/keywords.py
index 816ec604..03b66890 100755
--- a/doc/generate/pkgcheck/keywords.py
+++ b/doc/generate/pkgcheck/keywords.py
@@ -16,6 +16,7 @@ from textwrap import dedent
from snakeoil.strings import pluralism as _pl
from pkgcheck import base, const
+from pkgcheck.checks import GentooRepoCheck
def main(f=sys.stdout, **kwargs):
@@ -35,7 +36,7 @@ def main(f=sys.stdout, **kwargs):
related_checks = defaultdict(set)
for check in const.CHECKS.values():
for keyword in check.known_results:
- related_checks[keyword].add(check.__name__)
+ related_checks[keyword].add(check)
for scope in base.scopes.values():
_rst_header('-', scope.desc.capitalize() + ' scope')
@@ -57,9 +58,11 @@ def main(f=sys.stdout, **kwargs):
if explanation:
explanation = '\n'.join(dedent(explanation).strip().split('\n'))
out('\n' + explanation)
- checks = ', '.join(
- f'`{c}`_' for c in sorted(related_checks[keyword]))
+ if all(issubclass(x, GentooRepoCheck) for x in related_checks[keyword]):
+ out(f'- Gentoo repo specific')
out('\n' + f'- level: {keyword.level}')
+ checks = ', '.join(sorted(
+ f'`{c.__name__}`_' for c in related_checks[keyword]))
out(f'- related check{_pl(related_checks[keyword])}: {checks}')