Skip to content

Commit

Permalink
Validate ignore checks before returning result (#3429)
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong authored Jun 27, 2024
1 parent a5e77d5 commit 1e78b4c
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 1e78b4c

Please sign in to comment.