-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: Allow comments and new lines in custom rules file (#2757)
* 🐛 Add a check for comments and new lines in custom rules In the documentation, comments are allowed to start with `#`. Currently, cfn-lint throws an error of `not in supported operators` which means the comment is being parsed as a custom error. This is now fixed to allow any amount of comments anywhere in the custom rules file. New lines are now allowed just for readability. Currently, cfn-lint throws a traceback error of `UnboundLocalError: cannot access local variable 'operator' where it is not associated with a value` which is not an intuitive error message just for a blank new line. This is now fixed to allow new lines anywhere in the custom rules file. * ✅ Add unit tests for comments and whitespace in custom rules. * ✏️ Update docs for custom rules to allow new lines and comments.
- Loading branch information
Showing
3 changed files
with
78 additions
and
69 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