-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail gracefully if no templates match wildcard
*Description of changes:* `cfn-lint` currently fails if there are no Cloudformation templates that match the pattern specified either via CLI arguments or via config file. ``` $ cfn-lint "cfn/**/*.y*ml" 2024-08-16 13:41:38,381 - cfnlint.decode.decode - ERROR - Template file not found: cfn/**/*.y*ml E0000 Template file not found: cfn/**/*.y*ml cfn/**/*.y*ml:1:1 $ echo $? 2 ``` It appears that when the glob pattern matching does not find any match, the actual string is appended as a template file. This PR improves the handling of wildcard templates by ensuring only matched templates are added to be linted by `cfn-lint` and would gracefully exit without an output message. If run with debug switch, it lists the Cloudformation templates found by the glob. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
- Loading branch information
1 parent
df3f505
commit 66a59a8
Showing
5 changed files
with
68 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters