Skip to content

Commit

Permalink
Ignore_bad_template and E0000 based ignore checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong committed May 9, 2024
1 parent 01a5424 commit 67a4479
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/cfnlint/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,12 @@ def get_template_rules(

if errors:
_build_rule_cache(args)
if len(errors) == 1 and ignore_bad_template and errors[0].rule.id == "E0000":
return (template, __CACHED_RULES, [])
return (template, __CACHED_RULES, errors)
if ignore_bad_template or any("E0000".startswith(x) for x in args.ignore_checks):
errors = [err for err in errors if err.rule.id != "E0000"]
if errors:
return (template, __CACHED_RULES, errors)
else:
return (template, __CACHED_RULES, errors)

args.template_args = template

Expand Down

0 comments on commit 67a4479

Please sign in to comment.