Closed kimsappi closed 5 days ago
Taking a look into this. My first note would be around using the API as we have tried to make some of these integrations easier for you. The API will build the rules for you, decode the file, etc.
data = """
AWSTemplateFormatVersion: 2010-09-09
Resources:
ECSCluster:
Type: AWS::ECS::Cluster
Properties:
NonExistentProperty: value
"""
config = cfnlint.config.ManualArgs(
regions=["us-east-1"],
ignore_checks=["E3002"],
)
matches = cfnlint.api.lint(data, config=config)
Yes, we found the new API as well. Looks like you've already fixed the problem anyway (I tested my example code with the change in place, and it works).
CloudFormation Lint Version
1.3.7
What operating system are you using?
Debian
Describe the bug
Even though error codes (e.g.
["E3002"]
) are set to be ignored, the errors are still caught. The rule is disabled inRulesCollection
. Ignoring checks works correctly with the CLI client.Here is example code to reproduce the behaviour:
The above provides different output with cfn-lint 1.37.7 and 0.87.7:
Expected behavior
Error codes provided to
cfnlint.core.get_rules()
should not result in lint errors.Reproduction template