Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
map
and types
directives analysable
The `map` directive (from ngx_http_map_module and ngx_stream_map_module) and `types` directive (from ngx_http_core_module) are distinct from other directives, in that their child directives may be arbitrary strings that aren't known to Nginx. This causes crossplane to report unrecognised/misused directive errors when analysing them with `strict` or `check_ctx` enabled; it also means that no meaningful analysis can be be performed when `check_args` is enabled because the arity of child directives is unknown. Add support for `map`'s special directives (`default`, `hostnames`, and `volatile`) to the analyser. Recognise that arbitrary directive names inside a `map` or `types` block are valid and that they accept either one argument (if used in `map`) or one or more arguments (if used in `types`). Fixes nginxinc#101 and nginxinc#103.
- Loading branch information