Skip to content

Commit b7cd1c2

Browse files
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.
1 parent ad3d230 commit b7cd1c2

File tree

7 files changed

+3344
-799
lines changed

7 files changed

+3344
-799
lines changed

AUTHORS.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ Contributors
1414
* Ivan Poluyanov <i.poluyanov@icloud.com> `@poluyanov <https://github.com/poluyanov>`_
1515
* Raymond Lau <raymond.lau.ca@gmail.com> `@Raymond26 <https://github.com/Raymond26>`_
1616
* Luca Comellini <luca.com@gmail.com> `@lucacome <https://github.com/lucacome>`_
17-
* Ron Vider <viderron@gmail.com> `@RonVider <https://github.com/RonVider>`_
17+
* Ron Vider <viderron@gmail.com> `@RonVider <https://github.com/RonVider>`_
18+
* Chris Novakovic <chris@chrisn.me.uk> `@chrisnovakovic <https://github.com/chrisnovakovic>`_

0 commit comments

Comments
 (0)