-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow only non-empty brackets/braces
We'd like to disallow brackets and braces in our YAML, but there's a catch: the only way to describe an empty array or hash in YAML is to supply an empty one (`[]` or `{}`). Otherwise, the value will be null. This commit adds a `non-empty` option to `forbid` for brackets and braces. When it is set, all flow and sequence mappings will cause errors _except_ for empty ones.
- Loading branch information
1 parent
22335b2
commit ee4d163
Showing
4 changed files
with
95 additions
and
6 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