CORD-2247: Write basic static checker for xproto
Change-Id: I63a96972e16fd8dd62d4dec840eede66cbb26368
diff --git a/lib/xos-genx/xosgenx/checkers/service_options.xchecker b/lib/xos-genx/xosgenx/checkers/service_options.xchecker
new file mode 100644
index 0000000..383cdbd
--- /dev/null
+++ b/lib/xos-genx/xosgenx/checkers/service_options.xchecker
@@ -0,0 +1,12 @@
+{% set required_options = ['name','verbose_name','app_label'] %}
+
+{% for m in proto.messages %}
+{% for o in required_options %}
+{% if not options[o] and not m.options[o] %}
+504 Required option {{ o }} is missing from model {{ m.name }}
+{% endif %}
+
+{% set required_field_options = ['tosca_key'] %}
+
+{% endfor %}
+{% endfor %}