fix: regression in CheckScmInSrc rule (#610)

This commit is contained in:
Robert Kaussow 2023-05-29 14:51:52 +02:00 committed by GitHub
parent adc1801724
commit 15e3909660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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