mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Framework: add more model linting
This commit is contained in:
@@ -388,6 +388,17 @@ 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; \
|
||||
for TYPE in .\\AliasesField .\\DomainIPField HostnameField IPPortField NetworkField MacAddressField .\\RangeAddressField; do \
|
||||
(xmllint $${MODEL} --xpath '//*[@type="'$${TYPE}'" and FieldSeparator=","]' 2> /dev/null | grep '^<' || true) | while read LINE; do \
|
||||
echo "$${MODEL}: $${LINE} FieldSeparator=, is the default"; \
|
||||
done; \
|
||||
(xmllint $${MODEL} --xpath '//*[@type="'$${TYPE}'" and AsList="N"]' 2> /dev/null | grep '^<' || true) | while read LINE; do \
|
||||
echo "$${MODEL}: $${LINE} AsList=N is the default"; \
|
||||
done; \
|
||||
done; \
|
||||
done; fi
|
||||
|
||||
ACLBIN?= ${.CURDIR}/../../../core/Scripts/dashboard-acl.sh
|
||||
|
||||
Reference in New Issue
Block a user