From 69ac3ce299c7cea5deb3807bf4859be1686b942b Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 31 Aug 2023 12:49:34 +0200 Subject: [PATCH] make: work around destructive replacement pattern in style-model Add a lint-model check for this so it's avoided in the future. --- Makefile | 3 +++ src/opnsense/mvc/app/models/OPNsense/IDS/IDS.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d74c4e9cb..4c1ca14f6 100644 --- a/Makefile +++ b/Makefile @@ -378,6 +378,9 @@ lint-model: (xmllint $${MODEL} --xpath '//*[@type and not(@type="ArrayField") and BlankDesc and Multiple="Y"]' 2> /dev/null | grep '^<' || true) | while read LINE; do \ echo "$${MODEL}: $${LINE} blank description not applicable on multiple field"; \ done; \ + (xmllint $${MODEL} --xpath '//*[@type and not(@type="ArrayField") and OptionValues[default[not(@value)] or multiple[not(@value)] or required[not(@value)]]]' 2> /dev/null | grep '^<' || true) | while read LINE; do \ + echo "$${MODEL}: $${LINE} option element default/multiple/required without value attribute"; \ + done; \ done SCRIPTDIRS!= find ${.CURDIR}/src/opnsense/scripts -type d -depth 1 diff --git a/src/opnsense/mvc/app/models/OPNsense/IDS/IDS.xml b/src/opnsense/mvc/app/models/OPNsense/IDS/IDS.xml index bbe81be7f..735124e59 100644 --- a/src/opnsense/mvc/app/models/OPNsense/IDS/IDS.xml +++ b/src/opnsense/mvc/app/models/OPNsense/IDS/IDS.xml @@ -66,7 +66,7 @@ Y alert - Default + Default Alert Drop Disable