Fix check_jobs_documented linter

If autoroles is used to document all roles - which is not the
case in this repo but in opendev/base-jobs, the linter would complain
about missing roles. Fix the linter to not complain.

This change is here to sync the two variants and avoid others that copy
it to run into the problem.

Change-Id: I25411157ff18858e4f4c121a6d3f0ba6ec793be0
This commit is contained in:
Andreas Jaeger 2020-04-10 19:07:25 +02:00
parent a4cf5ca07e
commit 38902dbba8

View File

@ -132,10 +132,11 @@ r = Roles()
d = Docs()
ret = 0
for role in r.roles:
if role not in d.roles:
print("Role %s not included in document tree" % (role,))
ret = 1
if not d.autoroles:
for role in r.roles:
if role not in d.roles:
print("Role %s not included in document tree" % (role,))
ret = 1
for job in [x['name'] for x in z.layout.jobs]:
if job not in d.jobs:
print("Job %s not included in document tree" % (job,))