From a67dc2976f495569f67b3ca1f85877a39fe2a7bd Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sat, 30 Sep 2023 19:43:29 +0200 Subject: [PATCH] make: model style/lint for Mask/MaskPerItem --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 81ad70035..0ac359ba4 100644 --- a/Makefile +++ b/Makefile @@ -382,6 +382,9 @@ lint-model: (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; \ + (xmllint $${MODEL} --xpath '//*[@type="CSVListField" and Mask and (not(MaskPerItem) or MaskPerItem=N)]' 2> /dev/null | grep '^<' || true) | while read LINE; do \ + echo "$${MODEL}: $${LINE} uses Mask regex with MaskPerItem=N"; \ + done; \ done SCRIPTDIRS!= find ${.CURDIR}/src/opnsense/scripts -type d -depth 1 @@ -447,6 +450,7 @@ style-model: perl -i -pe 's/(.*?)<\/default>/$$1<\/Default>/g' $${MODEL}; \ perl -i -pe 's/(.*?)<\/multiple>/$$1<\/Multiple>/g' $${MODEL}; \ perl -i -pe 's/(.*?)<\/required>/$$1<\/Required>/g' $${MODEL}; \ + perl -i -pe 's/(.*?)<\/mask>/$$1<\/Mask>/g' $${MODEL}; \ done style: style-python style-php