Skip to content

Commit

Permalink
Validate ignore checks before returning result
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong committed Jun 27, 2024
1 parent 3b782cb commit ecadb37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cfnlint/rules/_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,10 @@ def is_rule_enabled(self, rule: CloudFormationLintRule):
def run_check(self, check, filename, rule_id, *args):
"""Run a check"""
try:
matches = list(check(*args))
matches = []
for match in check(*args):
if self.is_rule_enabled(match.rule):
matches.append(match)
return matches
except Exception as err: # pylint: disable=W0703
if self.is_rule_enabled(RuleError()):
Expand Down

0 comments on commit ecadb37

Please sign in to comment.