make: work around destructive replacement pattern in style-model

Add a lint-model check for this so it's avoided in the future.
This commit is contained in:
Franco Fichtner 2023-08-31 12:49:34 +02:00
parent 821eeb4ab9
commit 69ac3ce299
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -66,7 +66,7 @@
<Required>Y</Required>
<default>alert</default>
<OptionValues>
<default>Default</default>
<default value="default">Default</default>
<alert>Alert</alert>
<drop>Drop</drop>
<disable>Disable</disable>