Use this rule to control that the YAML documents do not contain a key. Key names can be defined as a regular expression. The location of the key can be defined with two ancestor regular expressions.
:) and always start with an implicit <root> parent.
So, the ancestor string for a connectionTimeout key could be: <root>:spring:datasource:hikari.
If the includedAncestors regex matches the ancestor string of the key, the key is checked.
The start and end line markers ^ and $ are implicit, just like the key regex.
Leave empty for no included ancestor matching.^ and $ are implicit, just like the key regex.
Leave empty for no excluded ancestor matching.With key-name = [tT]e.*t
the following code snippet would PASS:
Test1: value
tesT: {key1: 4, key2: 8}
the following code snippets would FAIL:
test: value
tesT: {Test: 4, key2: 8}
With key-name = waitInterval.*|wait-interval.* and includedAncestors = .*:circuitbreaker
the following code snippet would PASS:
uisa:
circuitbreaker:
failure-rate-threshold-percentage: 70
wait-duration-in-open-state-millis: 1500
the following code snippets would FAIL:
uisa:
circuitbreaker:
failure-rate-threshold-percentage: 70
wait-interval: 1500