diff --git a/saltlint/rules/YamlHasOctalValueRule.py b/saltlint/rules/YamlHasOctalValueRule.py index 389b96d..6207251 100644 --- a/saltlint/rules/YamlHasOctalValueRule.py +++ b/saltlint/rules/YamlHasOctalValueRule.py @@ -24,7 +24,7 @@ class YamlHasOctalValueRule(Rule): def match(self, file, line): found = self.bracket_regex.search(line) if found: - exc = self.exclude_regex.search(found.group(0)) - if exc: + # Skip false positive result if the exclude_regex matches. + if self.exclude_regex.search(found.group(0)): return None return found