From ee39608cdf56242d92ca684c24fd7a2c63a5685e Mon Sep 17 00:00:00 2001 From: Roald Nefs Date: Wed, 3 Jan 2024 19:01:16 +0100 Subject: [PATCH] feat: simplify YamlHasOctalValueRule rule Signed-off-by: Roald Nefs --- saltlint/rules/YamlHasOctalValueRule.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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