fix: regression in CheckScmInSrc rule

This commit is contained in:
Robert Kaussow 2023-05-29 14:26:21 +02:00
parent adc1801724
commit d4bab3fd44
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0

View File

@ -16,8 +16,10 @@ class CheckScmInSrc(StandardBase):
if not errors: if not errors:
for role in roles: for role in roles:
src = role.get("src") if (
if isinstance(role, AnsibleMapping) and bool(src) and "+" in src: isinstance(role, AnsibleMapping) and bool(role.get("src"))
and "+" in role.get("src")
):
errors.append(self.Error(role["__line__"], self.helptext)) errors.append(self.Error(role["__line__"], self.helptext))
return self.Result(candidate.path, errors) return self.Result(candidate.path, errors)