You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added ignore_checks metadata at the template root level. Running CLI with "-i W" against the file but the error listed under ignore_checks still shows up even though template metadata has higher precedence over CLI parameter. The error does get suppressed if I run it without "-i W" parameter. Adding ignore_checks at the resource level works as intended.
Expected behavior
The ignore_checks metadata at the template root level should get suppressed even when running CLI with "-i W"
May have to update the docs for this one. I went back and reread it and I believe its just wrong or misleading. The CLI takes precedence since that configuration is used for just that one run. We tried to go from broad to specific. So a cfnlintrc is considered more generic and will overwritten by the CLI and the template matadata. Then the metadata is overwritten by the CLI since that configuration was supplied just for that run.
This logic seems to have held from v0 to v1 so I think this is a documentation issue.
Also there is an option called --merge-configs that can merge together lists across different levels of configuration. cfn-lint --merge-configs -i W -- local/issue/3816.yaml will result in 0 issues.
@kddejong If CLI has higher precedence, then why would putting metadata at the resource level suppress the error? I can work with --merge-configs in the mean time. Thanks!
CloudFormation Lint Version
cfn-lint 1.18.4
What operating system are you using?
Windows 11
Describe the bug
Added
ignore_checks
metadata at the template root level. Running CLI with "-i W" against the file but the error listed underignore_checks
still shows up even though template metadata has higher precedence over CLI parameter. The error does get suppressed if I run it without "-i W" parameter. Addingignore_checks
at the resource level works as intended.Expected behavior
The
ignore_checks
metadata at the template root level should get suppressed even when running CLI with "-i W"Reproduction template
The text was updated successfully, but these errors were encountered: