mirror of
https://github.com/lucaspalomodevelop/opnsense-core.git
synced 2026-03-13 08:09:42 +00:00
make: model style/lint for Mask/MaskPerItem
This commit is contained in:
parent
3eeb1193ab
commit
a67dc2976f
4
Makefile
4
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>(.*?)<\/default>/<Default>$$1<\/Default>/g' $${MODEL}; \
|
||||
perl -i -pe 's/<multiple>(.*?)<\/multiple>/<Multiple>$$1<\/Multiple>/g' $${MODEL}; \
|
||||
perl -i -pe 's/<required>(.*?)<\/required>/<Required>$$1<\/Required>/g' $${MODEL}; \
|
||||
perl -i -pe 's/<mask>(.*?)<\/mask>/<Mask>$$1<\/Mask>/g' $${MODEL}; \
|
||||
done
|
||||
|
||||
style: style-python style-php
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user