The current validation of a map block would check that all parameters had exactly 1 argument. This would cause parse errors on valid configs with other "map-like" directives and "special parameters". For example, the volatile parameter can be used without any additional arguments inside the map directive.
Different directives also have different constraints on how many arguments a parameter can have, for example, parameter's in match can have 1 or more arguments.
http {
match check {
require $variable ...;
}
}
This improves the previous rudimentary validation to use the bit masks, so each directive can be customized so their bodies can have different validation checks.
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Proposed changes
The current validation of a map block would check that all parameters had exactly 1 argument. This would cause parse errors on valid configs with other "map-like" directives and "special parameters". For example, the
volatile
parameter can be used without any additional arguments inside themap
directive. Different directives also have different constraints on how many arguments a parameter can have, for example, parameter's inmatch
can have 1 or more arguments.This improves the previous rudimentary validation to use the bit masks, so each directive can be customized so their bodies can have different validation checks.
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentREADME.md
)